diff options
-rw-r--r-- | libbb/Kbuild | 22 | ||||
-rw-r--r-- | libbb/lineedit.c | 5 |
2 files changed, 18 insertions, 9 deletions
diff --git a/libbb/Kbuild b/libbb/Kbuild index efd04e322..8c7a189b4 100644 --- a/libbb/Kbuild +++ b/libbb/Kbuild | |||
@@ -116,30 +116,36 @@ lib-y += xgethostbyname.o | |||
116 | lib-y += xreadlink.o | 116 | lib-y += xreadlink.o |
117 | lib-y += xrealloc_vector.o | 117 | lib-y += xrealloc_vector.o |
118 | 118 | ||
119 | # conditionally compiled objects: | 119 | # A mix of optimizations (why build stuff we know won't be used) |
120 | lib-$(CONFIG_FEATURE_MOUNT_LOOP) += loop.o | 120 | # and objects which may fail to build (SELinux on selinux-less system) |
121 | lib-$(CONFIG_LOSETUP) += loop.o | 121 | lib-$(CONFIG_SELINUX) += selinux_common.o |
122 | lib-$(CONFIG_FEATURE_MTAB_SUPPORT) += mtab.o | 122 | lib-$(CONFIG_FEATURE_MTAB_SUPPORT) += mtab.o |
123 | lib-$(CONFIG_FEATURE_ASSUME_UNICODE) += unicode.o | ||
124 | lib-$(CONFIG_FEATURE_CHECK_NAMES) += die_if_bad_username.o | ||
125 | |||
126 | lib-$(CONFIG_LOSETUP) += loop.o | ||
127 | lib-$(CONFIG_FEATURE_MOUNT_LOOP) += loop.o | ||
128 | |||
123 | lib-$(CONFIG_ADDGROUP) += update_passwd.o | 129 | lib-$(CONFIG_ADDGROUP) += update_passwd.o |
124 | lib-$(CONFIG_ADDUSER) += update_passwd.o | 130 | lib-$(CONFIG_ADDUSER) += update_passwd.o |
125 | lib-$(CONFIG_DELGROUP) += update_passwd.o | 131 | lib-$(CONFIG_DELGROUP) += update_passwd.o |
126 | lib-$(CONFIG_DELUSER) += update_passwd.o | 132 | lib-$(CONFIG_DELUSER) += update_passwd.o |
133 | |||
127 | lib-$(CONFIG_PASSWD) += pw_encrypt.o update_passwd.o | 134 | lib-$(CONFIG_PASSWD) += pw_encrypt.o update_passwd.o |
128 | lib-$(CONFIG_CHPASSWD) += pw_encrypt.o update_passwd.o | 135 | lib-$(CONFIG_CHPASSWD) += pw_encrypt.o update_passwd.o |
129 | lib-$(CONFIG_CRYPTPW) += pw_encrypt.o | 136 | lib-$(CONFIG_CRYPTPW) += pw_encrypt.o |
130 | lib-$(CONFIG_SULOGIN) += pw_encrypt.o | 137 | lib-$(CONFIG_SULOGIN) += pw_encrypt.o |
131 | lib-$(CONFIG_FEATURE_HTTPD_AUTH_MD5) += pw_encrypt.o | ||
132 | lib-$(CONFIG_VLOCK) += pw_encrypt.o correct_password.o | 138 | lib-$(CONFIG_VLOCK) += pw_encrypt.o correct_password.o |
133 | lib-$(CONFIG_SU) += pw_encrypt.o correct_password.o | 139 | lib-$(CONFIG_SU) += pw_encrypt.o correct_password.o |
134 | lib-$(CONFIG_LOGIN) += pw_encrypt.o correct_password.o | 140 | lib-$(CONFIG_LOGIN) += pw_encrypt.o correct_password.o |
141 | lib-$(CONFIG_FEATURE_HTTPD_AUTH_MD5) += pw_encrypt.o | ||
142 | |||
135 | lib-$(CONFIG_DF) += find_mount_point.o | 143 | lib-$(CONFIG_DF) += find_mount_point.o |
136 | lib-$(CONFIG_MKFS_MINIX) += find_mount_point.o | 144 | lib-$(CONFIG_MKFS_MINIX) += find_mount_point.o |
137 | lib-$(CONFIG_SELINUX) += selinux_common.o | 145 | lib-$(CONFIG_FSCK_MINIX) += find_mount_point.o |
146 | |||
138 | lib-$(CONFIG_HWCLOCK) += rtc.o | 147 | lib-$(CONFIG_HWCLOCK) += rtc.o |
139 | lib-$(CONFIG_RTCWAKE) += rtc.o | 148 | lib-$(CONFIG_RTCWAKE) += rtc.o |
140 | lib-$(CONFIG_FEATURE_CHECK_NAMES) += die_if_bad_username.o | ||
141 | |||
142 | lib-$(CONFIG_FEATURE_ASSUME_UNICODE) += unicode.o | ||
143 | 149 | ||
144 | # We shouldn't build xregcomp.c if we don't need it - this ensures we don't | 150 | # We shouldn't build xregcomp.c if we don't need it - this ensures we don't |
145 | # require regex.h to be in the include dir even if we don't need it thereby | 151 | # require regex.h to be in the include dir even if we don't need it thereby |
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 8b7ff4f8e..5ebea70d6 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -233,11 +233,13 @@ static size_t load_string(const char *src, int maxsize) | |||
233 | safe_strncpy(command_ps, src, maxsize); | 233 | safe_strncpy(command_ps, src, maxsize); |
234 | return strlen(command_ps); | 234 | return strlen(command_ps); |
235 | } | 235 | } |
236 | # if ENABLE_FEATURE_TAB_COMPLETION | ||
236 | static void save_string(char *dst, int maxsize) | 237 | static void save_string(char *dst, int maxsize) |
237 | { | 238 | { |
238 | safe_strncpy(dst, command_ps, maxsize); | 239 | safe_strncpy(dst, command_ps, maxsize); |
239 | } | 240 | } |
240 | #define BB_PUTCHAR(c) bb_putchar(c) | 241 | # endif |
242 | # define BB_PUTCHAR(c) bb_putchar(c) | ||
241 | #endif | 243 | #endif |
242 | 244 | ||
243 | 245 | ||
@@ -683,6 +685,7 @@ static void exe_n_cwd_tab_completion(char *command, int type) | |||
683 | #undef dirbuf | 685 | #undef dirbuf |
684 | } | 686 | } |
685 | 687 | ||
688 | //FIXME: HUH??? How about Unicode? | ||
686 | #define QUOT (UCHAR_MAX+1) | 689 | #define QUOT (UCHAR_MAX+1) |
687 | 690 | ||
688 | #define collapse_pos(is, in) do { \ | 691 | #define collapse_pos(is, in) do { \ |