aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-08-13 10:36:25 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-08-13 10:36:25 +0000
commite324184c0509cc0db168ce29546e1b52800a79c6 (patch)
tree9d4f18b3cc1ab715b6ff91cc9e3e942d11dfc51f
parent5f1b149d541ebba7cab841cb647f113248f9fb8f (diff)
downloadbusybox-w32-e324184c0509cc0db168ce29546e1b52800a79c6.tar.gz
busybox-w32-e324184c0509cc0db168ce29546e1b52800a79c6.tar.bz2
busybox-w32-e324184c0509cc0db168ce29546e1b52800a79c6.zip
s/#ifdef CONFIG_/#if ENABLE_/g
-rw-r--r--archival/bbunzip.c2
-rw-r--r--archival/dpkg.c8
-rw-r--r--archival/dpkg_deb.c4
-rw-r--r--archival/libunarchive/decompress_unlzma.c8
-rw-r--r--archival/libunarchive/filter_accept_list_reassign.c4
-rw-r--r--archival/libunarchive/seek_by_jump.c2
-rw-r--r--coreutils/df.c8
-rw-r--r--coreutils/wc.c2
-rw-r--r--docs/style-guide.txt6
-rw-r--r--include/libbb.h2
-rw-r--r--include/usage.h8
-rw-r--r--libbb/create_icmp6_socket.c8
-rw-r--r--libbb/create_icmp_socket.c6
-rw-r--r--libbb/inet_common.c2
-rw-r--r--libbb/xgethostbyname.c2
-rw-r--r--miscutils/makedevs.c7
-rw-r--r--modutils/lsmod.c6
-rw-r--r--modutils/rmmod.c2
-rw-r--r--networking/ipcalc.c2
-rw-r--r--util-linux/fbset.c14
-rw-r--r--util-linux/hwclock.c2
-rw-r--r--util-linux/ipcrm.c11
22 files changed, 60 insertions, 56 deletions
diff --git a/archival/bbunzip.c b/archival/bbunzip.c
index bd1526b20..f842d458b 100644
--- a/archival/bbunzip.c
+++ b/archival/bbunzip.c
@@ -212,7 +212,7 @@ char* make_new_name_gunzip(char *filename)
212 212
213 extension++; 213 extension++;
214 if (strcmp(extension, "tgz" + 1) == 0 214 if (strcmp(extension, "tgz" + 1) == 0
215#ifdef CONFIG_FEATURE_GUNZIP_UNCOMPRESS 215#if ENABLE_FEATURE_GUNZIP_UNCOMPRESS
216 || strcmp(extension, "Z") == 0 216 || strcmp(extension, "Z") == 0
217#endif 217#endif
218 ) { 218 ) {
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 0c1f96fc9..caa50f90d 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -1412,10 +1412,10 @@ static void init_archive_deb_control(archive_handle_t *ar_handle)
1412 tar_handle->src_fd = ar_handle->src_fd; 1412 tar_handle->src_fd = ar_handle->src_fd;
1413 1413
1414 /* We don't care about data.tar.* or debian-binary, just control.tar.* */ 1414 /* We don't care about data.tar.* or debian-binary, just control.tar.* */
1415#ifdef CONFIG_FEATURE_DEB_TAR_GZ 1415#if ENABLE_FEATURE_DEB_TAR_GZ
1416 llist_add_to(&(ar_handle->accept), (char*)"control.tar.gz"); 1416 llist_add_to(&(ar_handle->accept), (char*)"control.tar.gz");
1417#endif 1417#endif
1418#ifdef CONFIG_FEATURE_DEB_TAR_BZ2 1418#if ENABLE_FEATURE_DEB_TAR_BZ2
1419 llist_add_to(&(ar_handle->accept), (char*)"control.tar.bz2"); 1419 llist_add_to(&(ar_handle->accept), (char*)"control.tar.bz2");
1420#endif 1420#endif
1421 1421
@@ -1432,10 +1432,10 @@ static void init_archive_deb_data(archive_handle_t *ar_handle)
1432 tar_handle->src_fd = ar_handle->src_fd; 1432 tar_handle->src_fd = ar_handle->src_fd;
1433 1433
1434 /* We don't care about control.tar.* or debian-binary, just data.tar.* */ 1434 /* We don't care about control.tar.* or debian-binary, just data.tar.* */
1435#ifdef CONFIG_FEATURE_DEB_TAR_GZ 1435#if ENABLE_FEATURE_DEB_TAR_GZ
1436 llist_add_to(&(ar_handle->accept), (char*)"data.tar.gz"); 1436 llist_add_to(&(ar_handle->accept), (char*)"data.tar.gz");
1437#endif 1437#endif
1438#ifdef CONFIG_FEATURE_DEB_TAR_BZ2 1438#if ENABLE_FEATURE_DEB_TAR_BZ2
1439 llist_add_to(&(ar_handle->accept), (char*)"data.tar.bz2"); 1439 llist_add_to(&(ar_handle->accept), (char*)"data.tar.bz2");
1440#endif 1440#endif
1441 1441
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c
index 138caff39..6dd817101 100644
--- a/archival/dpkg_deb.c
+++ b/archival/dpkg_deb.c
@@ -31,12 +31,12 @@ int dpkg_deb_main(int argc, char **argv)
31 ar_archive->sub_archive = tar_archive; 31 ar_archive->sub_archive = tar_archive;
32 ar_archive->filter = filter_accept_list_reassign; 32 ar_archive->filter = filter_accept_list_reassign;
33 33
34#ifdef CONFIG_FEATURE_DEB_TAR_GZ 34#if ENABLE_FEATURE_DEB_TAR_GZ
35 llist_add_to(&(ar_archive->accept), (char*)"data.tar.gz"); 35 llist_add_to(&(ar_archive->accept), (char*)"data.tar.gz");
36 llist_add_to(&control_tar_llist, (char*)"control.tar.gz"); 36 llist_add_to(&control_tar_llist, (char*)"control.tar.gz");
37#endif 37#endif
38 38
39#ifdef CONFIG_FEATURE_DEB_TAR_BZ2 39#if ENABLE_FEATURE_DEB_TAR_BZ2
40 llist_add_to(&(ar_archive->accept), (char*)"data.tar.bz2"); 40 llist_add_to(&(ar_archive->accept), (char*)"data.tar.bz2");
41 llist_add_to(&control_tar_llist, (char*)"control.tar.bz2"); 41 llist_add_to(&control_tar_llist, (char*)"control.tar.bz2");
42#endif 42#endif
diff --git a/archival/libunarchive/decompress_unlzma.c b/archival/libunarchive/decompress_unlzma.c
index 2800a7ecd..4f36c060f 100644
--- a/archival/libunarchive/decompress_unlzma.c
+++ b/archival/libunarchive/decompress_unlzma.c
@@ -12,7 +12,7 @@
12#include "libbb.h" 12#include "libbb.h"
13#include "unarchive.h" 13#include "unarchive.h"
14 14
15#ifdef CONFIG_FEATURE_LZMA_FAST 15#if ENABLE_FEATURE_LZMA_FAST
16# define speed_inline ALWAYS_INLINE 16# define speed_inline ALWAYS_INLINE
17#else 17#else
18# define speed_inline 18# define speed_inline
@@ -99,9 +99,11 @@ static ALWAYS_INLINE void rc_normalize(rc_t * rc)
99 } 99 }
100} 100}
101 101
102/* Called 9 times */ 102/* rc_is_bit_0 is called 9 times */
103/* Why rc_is_bit_0_helper exists? 103/* Why rc_is_bit_0_helper exists?
104 * Because we want to always expose (rc->code < rc->bound) to optimizer 104 * Because we want to always expose (rc->code < rc->bound) to optimizer.
105 * Thus rc_is_bit_0 is always inlined, and rc_is_bit_0_helper is inlined
106 * only if we compile for speed.
105 */ 107 */
106static speed_inline uint32_t rc_is_bit_0_helper(rc_t * rc, uint16_t * p) 108static speed_inline uint32_t rc_is_bit_0_helper(rc_t * rc, uint16_t * p)
107{ 109{
diff --git a/archival/libunarchive/filter_accept_list_reassign.c b/archival/libunarchive/filter_accept_list_reassign.c
index 0fb536fad..969dd1e3e 100644
--- a/archival/libunarchive/filter_accept_list_reassign.c
+++ b/archival/libunarchive/filter_accept_list_reassign.c
@@ -23,13 +23,13 @@ char filter_accept_list_reassign(archive_handle_t *archive_handle)
23 name_ptr = strrchr(archive_handle->file_header->name, '.'); 23 name_ptr = strrchr(archive_handle->file_header->name, '.');
24 24
25 /* Modify the subarchive handler based on the extension */ 25 /* Modify the subarchive handler based on the extension */
26#ifdef CONFIG_FEATURE_DEB_TAR_GZ 26#if ENABLE_FEATURE_DEB_TAR_GZ
27 if (strcmp(name_ptr, ".gz") == 0) { 27 if (strcmp(name_ptr, ".gz") == 0) {
28 archive_handle->action_data_subarchive = get_header_tar_gz; 28 archive_handle->action_data_subarchive = get_header_tar_gz;
29 return EXIT_SUCCESS; 29 return EXIT_SUCCESS;
30 } 30 }
31#endif 31#endif
32#ifdef CONFIG_FEATURE_DEB_TAR_BZ2 32#if ENABLE_FEATURE_DEB_TAR_BZ2
33 if (strcmp(name_ptr, ".bz2") == 0) { 33 if (strcmp(name_ptr, ".bz2") == 0) {
34 archive_handle->action_data_subarchive = get_header_tar_bz2; 34 archive_handle->action_data_subarchive = get_header_tar_bz2;
35 return EXIT_SUCCESS; 35 return EXIT_SUCCESS;
diff --git a/archival/libunarchive/seek_by_jump.c b/archival/libunarchive/seek_by_jump.c
index 6cd256418..edbf46b21 100644
--- a/archival/libunarchive/seek_by_jump.c
+++ b/archival/libunarchive/seek_by_jump.c
@@ -9,7 +9,7 @@
9void seek_by_jump(const archive_handle_t *archive_handle, const unsigned int amount) 9void seek_by_jump(const archive_handle_t *archive_handle, const unsigned int amount)
10{ 10{
11 if (lseek(archive_handle->src_fd, (off_t) amount, SEEK_CUR) == (off_t) -1) { 11 if (lseek(archive_handle->src_fd, (off_t) amount, SEEK_CUR) == (off_t) -1) {
12#ifdef CONFIG_FEATURE_UNARCHIVE_TAPE 12#if ENABLE_FEATURE_UNARCHIVE_TAPE
13 if (errno == ESPIPE) { 13 if (errno == ESPIPE) {
14 seek_by_read(archive_handle, amount); 14 seek_by_read(archive_handle, amount);
15 } else 15 } else
diff --git a/coreutils/df.c b/coreutils/df.c
index 5154eeb45..f616398f4 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -22,7 +22,7 @@
22#include <sys/vfs.h> 22#include <sys/vfs.h>
23#include "libbb.h" 23#include "libbb.h"
24 24
25#ifndef CONFIG_FEATURE_HUMAN_READABLE 25#if !ENABLE_FEATURE_HUMAN_READABLE
26static long kscale(long b, long bs) 26static long kscale(long b, long bs)
27{ 27{
28 return ( b * (long long) bs + 1024/2 ) / 1024; 28 return ( b * (long long) bs + 1024/2 ) / 1024;
@@ -34,7 +34,7 @@ int df_main(int argc, char **argv)
34{ 34{
35 long blocks_used; 35 long blocks_used;
36 long blocks_percent_used; 36 long blocks_percent_used;
37#ifdef CONFIG_FEATURE_HUMAN_READABLE 37#if ENABLE_FEATURE_HUMAN_READABLE
38 unsigned long df_disp_hr = 1024; 38 unsigned long df_disp_hr = 1024;
39#endif 39#endif
40 int status = EXIT_SUCCESS; 40 int status = EXIT_SUCCESS;
@@ -46,7 +46,7 @@ int df_main(int argc, char **argv)
46 static const char hdr_1k[] ALIGN1 = "1k-blocks"; 46 static const char hdr_1k[] ALIGN1 = "1k-blocks";
47 const char *disp_units_hdr = hdr_1k; 47 const char *disp_units_hdr = hdr_1k;
48 48
49#ifdef CONFIG_FEATURE_HUMAN_READABLE 49#if ENABLE_FEATURE_HUMAN_READABLE
50 opt_complementary = "h-km:k-hm:m-hk"; 50 opt_complementary = "h-km:k-hm:m-hk";
51 opt = getopt32(argc, argv, "hmk"); 51 opt = getopt32(argc, argv, "hmk");
52 if (opt & 1) { 52 if (opt & 1) {
@@ -125,7 +125,7 @@ int df_main(int argc, char **argv)
125 } 125 }
126 } 126 }
127 127
128#ifdef CONFIG_FEATURE_HUMAN_READABLE 128#if ENABLE_FEATURE_HUMAN_READABLE
129 printf("%-20s %9s ", device, 129 printf("%-20s %9s ", device,
130 make_human_readable_str(s.f_blocks, s.f_bsize, df_disp_hr)); 130 make_human_readable_str(s.f_blocks, s.f_bsize, df_disp_hr));
131 131
diff --git a/coreutils/wc.c b/coreutils/wc.c
index e5353b4cb..e74636578 100644
--- a/coreutils/wc.c
+++ b/coreutils/wc.c
@@ -43,7 +43,7 @@
43 43
44#include "libbb.h" 44#include "libbb.h"
45 45
46#ifdef CONFIG_LOCALE_SUPPORT 46#if ENABLE_LOCALE_SUPPORT
47#define isspace_given_isprint(c) isspace(c) 47#define isspace_given_isprint(c) isspace(c)
48#else 48#else
49#undef isspace 49#undef isspace
diff --git a/docs/style-guide.txt b/docs/style-guide.txt
index 381275a1d..7560d6986 100644
--- a/docs/style-guide.txt
+++ b/docs/style-guide.txt
@@ -377,13 +377,13 @@ used in the code.
377 377
378 (in .h header file) 378 (in .h header file)
379 379
380 #ifdef CONFIG_FEATURE_FUNKY 380 #if ENABLE_FEATURE_FUNKY
381 static inline void maybe_do_funky_stuff (int bar, int baz) 381 static inline void maybe_do_funky_stuff(int bar, int baz)
382 { 382 {
383 /* lotsa code in here */ 383 /* lotsa code in here */
384 } 384 }
385 #else 385 #else
386 static inline void maybe_do_funky_stuff (int bar, int baz) {} 386 static inline void maybe_do_funky_stuff(int bar, int baz) {}
387 #endif 387 #endif
388 388
389 (in the .c source file) 389 (in the .c source file)
diff --git a/include/libbb.h b/include/libbb.h
index a14d6be44..0ea88a623 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1026,7 +1026,7 @@ extern char bb_common_bufsiz1[COMMON_BUFSIZE];
1026/* See docs/keep_data_small.txt */ 1026/* See docs/keep_data_small.txt */
1027struct globals; 1027struct globals;
1028/* '*const' ptr makes gcc optimize code much better. 1028/* '*const' ptr makes gcc optimize code much better.
1029 * Magic prevents ptr_to_globals from going into rodata 1029 * Magic prevents ptr_to_globals from going into rodata.
1030 * If you want to assign a value, use PTR_TO_GLOBALS = xxx */ 1030 * If you want to assign a value, use PTR_TO_GLOBALS = xxx */
1031extern struct globals *const ptr_to_globals; 1031extern struct globals *const ptr_to_globals;
1032#define PTR_TO_GLOBALS (*(struct globals**)&ptr_to_globals) 1032#define PTR_TO_GLOBALS (*(struct globals**)&ptr_to_globals)
diff --git a/include/usage.h b/include/usage.h
index 3f2916006..a1b39368b 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -1946,7 +1946,7 @@
1946#define lsmod_full_usage \ 1946#define lsmod_full_usage \
1947 "List the currently loaded kernel modules" 1947 "List the currently loaded kernel modules"
1948 1948
1949#ifdef CONFIG_FEATURE_MAKEDEVS_LEAF 1949#if ENABLE_FEATURE_MAKEDEVS_LEAF
1950#define makedevs_trivial_usage \ 1950#define makedevs_trivial_usage \
1951 "NAME TYPE MAJOR MINOR FIRST LAST [s]" 1951 "NAME TYPE MAJOR MINOR FIRST LAST [s]"
1952#define makedevs_full_usage \ 1952#define makedevs_full_usage \
@@ -1969,7 +1969,7 @@
1969 "[creates hda,hda1-hda8]\n" 1969 "[creates hda,hda1-hda8]\n"
1970#endif 1970#endif
1971 1971
1972#ifdef CONFIG_FEATURE_MAKEDEVS_TABLE 1972#if ENABLE_FEATURE_MAKEDEVS_TABLE
1973#define makedevs_trivial_usage \ 1973#define makedevs_trivial_usage \
1974 "[-d device_table] rootdir" 1974 "[-d device_table] rootdir"
1975#define makedevs_full_usage \ 1975#define makedevs_full_usage \
@@ -2565,7 +2565,7 @@
2565 USE_FEATURE_PIDOF_OMIT( \ 2565 USE_FEATURE_PIDOF_OMIT( \
2566 "$ pidof /bin/sh -o %PPID\n20351 5950") 2566 "$ pidof /bin/sh -o %PPID\n20351 5950")
2567 2567
2568#ifndef CONFIG_FEATURE_FANCY_PING 2568#if !ENABLE_FEATURE_FANCY_PING
2569#define ping_trivial_usage \ 2569#define ping_trivial_usage \
2570 "host" 2570 "host"
2571#define ping_full_usage \ 2571#define ping_full_usage \
@@ -3430,7 +3430,7 @@ USE_FEATURE_RUN_PARTS_FANCY("\n -l Prints names of all matching files even when
3430 "$ cat /tmp/foo\n" \ 3430 "$ cat /tmp/foo\n" \
3431 "Hello\n" 3431 "Hello\n"
3432 3432
3433#ifdef CONFIG_FEATURE_TELNET_AUTOLOGIN 3433#if ENABLE_FEATURE_TELNET_AUTOLOGIN
3434#define telnet_trivial_usage \ 3434#define telnet_trivial_usage \
3435 "[-a] [-l USER] HOST [PORT]" 3435 "[-a] [-l USER] HOST [PORT]"
3436#define telnet_full_usage \ 3436#define telnet_full_usage \
diff --git a/libbb/create_icmp6_socket.c b/libbb/create_icmp6_socket.c
index b90f3e9fd..51899cdc5 100644
--- a/libbb/create_icmp6_socket.c
+++ b/libbb/create_icmp6_socket.c
@@ -7,12 +7,12 @@
7 * 7 *
8 */ 8 */
9 9
10#include <sys/types.h> 10//#include <sys/types.h>
11#include <netdb.h> 11//#include <netdb.h>
12#include <sys/socket.h> 12//#include <sys/socket.h>
13#include "libbb.h" 13#include "libbb.h"
14 14
15#ifdef CONFIG_FEATURE_IPV6 15#if ENABLE_FEATURE_IPV6
16int create_icmp6_socket(void) 16int create_icmp6_socket(void)
17{ 17{
18 struct protoent *proto; 18 struct protoent *proto;
diff --git a/libbb/create_icmp_socket.c b/libbb/create_icmp_socket.c
index dbd4769f6..3a4655885 100644
--- a/libbb/create_icmp_socket.c
+++ b/libbb/create_icmp_socket.c
@@ -7,9 +7,9 @@
7 * 7 *
8 */ 8 */
9 9
10#include <sys/types.h> 10//#include <sys/types.h>
11#include <netdb.h> 11//#include <netdb.h>
12#include <sys/socket.h> 12//#include <sys/socket.h>
13#include "libbb.h" 13#include "libbb.h"
14 14
15int create_icmp_socket(void) 15int create_icmp_socket(void)
diff --git a/libbb/inet_common.c b/libbb/inet_common.c
index ec3c3f9bb..7e799b5e1 100644
--- a/libbb/inet_common.c
+++ b/libbb/inet_common.c
@@ -164,7 +164,7 @@ char *INET_rresolve(struct sockaddr_in *s_in, int numeric, uint32_t netmask)
164 return name; 164 return name;
165} 165}
166 166
167#ifdef CONFIG_FEATURE_IPV6 167#if ENABLE_FEATURE_IPV6
168 168
169int INET6_resolve(const char *name, struct sockaddr_in6 *sin6) 169int INET6_resolve(const char *name, struct sockaddr_in6 *sin6)
170{ 170{
diff --git a/libbb/xgethostbyname.c b/libbb/xgethostbyname.c
index c3158c339..3bb522d80 100644
--- a/libbb/xgethostbyname.c
+++ b/libbb/xgethostbyname.c
@@ -7,7 +7,7 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
8 */ 8 */
9 9
10#include <netdb.h> 10//#include <netdb.h>
11#include "libbb.h" 11#include "libbb.h"
12 12
13struct hostent *xgethostbyname(const char *name) 13struct hostent *xgethostbyname(const char *name)
diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c
index 0ad12d798..6a3e80883 100644
--- a/miscutils/makedevs.c
+++ b/miscutils/makedevs.c
@@ -9,7 +9,7 @@
9 9
10#include "libbb.h" 10#include "libbb.h"
11 11
12#ifdef CONFIG_FEATURE_MAKEDEVS_LEAF 12#if ENABLE_FEATURE_MAKEDEVS_LEAF
13int makedevs_main(int argc, char **argv); 13int makedevs_main(int argc, char **argv);
14int makedevs_main(int argc, char **argv) 14int makedevs_main(int argc, char **argv)
15{ 15{
@@ -65,7 +65,7 @@ int makedevs_main(int argc, char **argv)
65 return 0; 65 return 0;
66} 66}
67 67
68#elif defined CONFIG_FEATURE_MAKEDEVS_TABLE 68#elif ENABLE_FEATURE_MAKEDEVS_TABLE
69 69
70/* Licensed under the GPL v2 or later, see the file LICENSE in this tarball. */ 70/* Licensed under the GPL v2 or later, see the file LICENSE in this tarball. */
71 71
@@ -162,8 +162,7 @@ int makedevs_main(int argc, char **argv)
162 ret = EXIT_FAILURE; 162 ret = EXIT_FAILURE;
163 goto loop; 163 goto loop;
164 } 164 }
165 } else 165 } else {
166 {
167 dev_t rdev; 166 dev_t rdev;
168 167
169 if (type == 'p') { 168 if (type == 'p') {
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index acca23012..01e1c5539 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -14,7 +14,7 @@
14#include "libbb.h" 14#include "libbb.h"
15 15
16 16
17#ifndef CONFIG_FEATURE_CHECK_TAINTED_MODULE 17#if !ENABLE_FEATURE_CHECK_TAINTED_MODULE
18static void check_tainted(void) { puts(""); } 18static void check_tainted(void) { puts(""); }
19#else 19#else
20#define TAINT_FILENAME "/proc/sys/kernel/tainted" 20#define TAINT_FILENAME "/proc/sys/kernel/tainted"
@@ -44,7 +44,7 @@ static void check_tainted(void)
44} 44}
45#endif 45#endif
46 46
47#ifdef CONFIG_FEATURE_QUERY_MODULE_INTERFACE 47#if ENABLE_FEATURE_QUERY_MODULE_INTERFACE
48 48
49struct module_info 49struct module_info
50{ 50{
@@ -131,7 +131,7 @@ int lsmod_main(int argc, char **argv)
131 puts(""); 131 puts("");
132 } 132 }
133 133
134#ifdef CONFIG_FEATURE_CLEAN_UP 134#if ENABLE_FEATURE_CLEAN_UP
135 free(module_names); 135 free(module_names);
136#endif 136#endif
137 137
diff --git a/modutils/rmmod.c b/modutils/rmmod.c
index 13f5ec20b..26bad7d7e 100644
--- a/modutils/rmmod.c
+++ b/modutils/rmmod.c
@@ -10,7 +10,7 @@
10#include "libbb.h" 10#include "libbb.h"
11#include <sys/syscall.h> 11#include <sys/syscall.h>
12 12
13#ifdef CONFIG_FEATURE_2_6_MODULES 13#if ENABLE_FEATURE_2_6_MODULES
14static inline void filename2modname(char *modname, const char *afterslash) 14static inline void filename2modname(char *modname, const char *afterslash)
15{ 15{
16 unsigned int i; 16 unsigned int i;
diff --git a/networking/ipcalc.c b/networking/ipcalc.c
index 2a099eff0..3f99b7511 100644
--- a/networking/ipcalc.c
+++ b/networking/ipcalc.c
@@ -36,7 +36,7 @@ static unsigned long get_netmask(unsigned long ipaddr)
36 return 0; 36 return 0;
37} 37}
38 38
39#ifdef CONFIG_FEATURE_IPCALC_FANCY 39#if ENABLE_FEATURE_IPCALC_FANCY
40static int get_prefix(unsigned long netmask) 40static int get_prefix(unsigned long netmask)
41{ 41{
42 unsigned long msk = 0x80000000; 42 unsigned long msk = 0x80000000;
diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index 69986df25..a2b8b3800 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -37,7 +37,7 @@ enum {
37 CMD_INFO = 12, 37 CMD_INFO = 12,
38 CMD_CHANGE = 13, 38 CMD_CHANGE = 13,
39 39
40#ifdef CONFIG_FEATURE_FBSET_FANCY 40#if ENABLE_FEATURE_FBSET_FANCY
41 CMD_XRES = 100, 41 CMD_XRES = 100,
42 CMD_YRES = 101, 42 CMD_YRES = 101,
43 CMD_VXRES = 102, 43 CMD_VXRES = 102,
@@ -130,7 +130,7 @@ static const struct cmdoptions_t {
130 { "-laced", 1, CMD_LACED }, 130 { "-laced", 1, CMD_LACED },
131 { "-double", 1, CMD_DOUBLE }, 131 { "-double", 1, CMD_DOUBLE },
132 { "-n", 0, CMD_CHANGE }, 132 { "-n", 0, CMD_CHANGE },
133#ifdef CONFIG_FEATURE_FBSET_FANCY 133#if ENABLE_FEATURE_FBSET_FANCY
134 { "-all", 0, CMD_ALL }, 134 { "-all", 0, CMD_ALL },
135 { "-xres", 1, CMD_XRES }, 135 { "-xres", 1, CMD_XRES },
136 { "-yres", 1, CMD_YRES }, 136 { "-yres", 1, CMD_YRES },
@@ -158,7 +158,7 @@ static const struct cmdoptions_t {
158 { "", 0, 0 } 158 { "", 0, 0 }
159}; 159};
160 160
161#ifdef CONFIG_FEATURE_FBSET_READMODE 161#if ENABLE_FEATURE_FBSET_READMODE
162/* taken from linux/fb.h */ 162/* taken from linux/fb.h */
163enum { 163enum {
164 FB_VMODE_INTERLACED = 1, /* interlaced */ 164 FB_VMODE_INTERLACED = 1, /* interlaced */
@@ -173,7 +173,7 @@ enum {
173static int readmode(struct fb_var_screeninfo *base, const char *fn, 173static int readmode(struct fb_var_screeninfo *base, const char *fn,
174 const char *mode) 174 const char *mode)
175{ 175{
176#ifdef CONFIG_FEATURE_FBSET_READMODE 176#if ENABLE_FEATURE_FBSET_READMODE
177 FILE *f; 177 FILE *f;
178 char buf[256]; 178 char buf[256];
179 char *p = buf; 179 char *p = buf;
@@ -286,7 +286,7 @@ static inline void showmode(struct fb_var_screeninfo *v)
286 vrate = hrate / (v->upper_margin + v->yres + v->lower_margin + v->vsync_len); 286 vrate = hrate / (v->upper_margin + v->yres + v->lower_margin + v->vsync_len);
287 } 287 }
288 printf("\nmode \"%ux%u-%u\"\n" 288 printf("\nmode \"%ux%u-%u\"\n"
289#ifdef CONFIG_FEATURE_FBSET_FANCY 289#if ENABLE_FEATURE_FBSET_FANCY
290 "\t# D: %.3f MHz, H: %.3f kHz, V: %.3f Hz\n" 290 "\t# D: %.3f MHz, H: %.3f kHz, V: %.3f Hz\n"
291#endif 291#endif
292 "\tgeometry %u %u %u %u %u\n" 292 "\tgeometry %u %u %u %u %u\n"
@@ -295,7 +295,7 @@ static inline void showmode(struct fb_var_screeninfo *v)
295 "\trgba %u/%u,%u/%u,%u/%u,%u/%u\n" 295 "\trgba %u/%u,%u/%u,%u/%u,%u/%u\n"
296 "endmode\n\n", 296 "endmode\n\n",
297 v->xres, v->yres, (int) (vrate + 0.5), 297 v->xres, v->yres, (int) (vrate + 0.5),
298#ifdef CONFIG_FEATURE_FBSET_FANCY 298#if ENABLE_FEATURE_FBSET_FANCY
299 drate / 1e6, hrate / 1e3, vrate, 299 drate / 1e6, hrate / 1e3, vrate,
300#endif 300#endif
301 v->xres, v->yres, v->xres_virtual, v->yres_virtual, v->bits_per_pixel, 301 v->xres, v->yres, v->xres_virtual, v->yres_virtual, v->bits_per_pixel,
@@ -360,7 +360,7 @@ int fbset_main(int argc, char **argv)
360 case CMD_CHANGE: 360 case CMD_CHANGE:
361 g_options |= OPT_CHANGE; 361 g_options |= OPT_CHANGE;
362 break; 362 break;
363#ifdef CONFIG_FEATURE_FBSET_FANCY 363#if ENABLE_FEATURE_FBSET_FANCY
364 case CMD_XRES: 364 case CMD_XRES:
365 varset.xres = xatou32(argv[1]); 365 varset.xres = xatou32(argv[1]);
366 break; 366 break;
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c
index 867721482..fcb7308fe 100644
--- a/util-linux/hwclock.c
+++ b/util-linux/hwclock.c
@@ -132,7 +132,7 @@ static void from_sys_clock(int utc)
132 write_rtc(tv.tv_sec, utc); 132 write_rtc(tv.tv_sec, utc);
133} 133}
134 134
135#ifdef CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS 135#if ENABLE_FEATURE_HWCLOCK_ADJTIME_FHS
136# define ADJTIME_PATH "/var/lib/hwclock/adjtime" 136# define ADJTIME_PATH "/var/lib/hwclock/adjtime"
137#else 137#else
138# define ADJTIME_PATH "/etc/adjtime" 138# define ADJTIME_PATH "/etc/adjtime"
diff --git a/util-linux/ipcrm.c b/util-linux/ipcrm.c
index 1e6206217..f49d28ee2 100644
--- a/util-linux/ipcrm.c
+++ b/util-linux/ipcrm.c
@@ -29,7 +29,10 @@ union semun {
29}; 29};
30#endif 30#endif
31 31
32#ifndef CONFIG_IPCRM_DROP_LEGACY 32#define IPCRM_LEGACY 1
33
34
35#if IPCRM_LEGACY
33 36
34typedef enum type_id { 37typedef enum type_id {
35 SHM, 38 SHM,
@@ -70,7 +73,7 @@ static int remove_ids(type_id type, int argc, char **argv)
70 73
71 return nb_errors; 74 return nb_errors;
72} 75}
73#endif /* #ifndef CONFIG_IPCRM_DROP_LEGACY */ 76#endif /* IPCRM_LEGACY */
74 77
75 78
76int ipcrm_main(int argc, char **argv); 79int ipcrm_main(int argc, char **argv);
@@ -82,7 +85,7 @@ int ipcrm_main(int argc, char **argv)
82 /* if the command is executed without parameters, do nothing */ 85 /* if the command is executed without parameters, do nothing */
83 if (argc == 1) 86 if (argc == 1)
84 return 0; 87 return 0;
85#ifndef CONFIG_IPCRM_DROP_LEGACY 88#if IPCRM_LEGACY
86 /* check to see if the command is being invoked in the old way if so 89 /* check to see if the command is being invoked in the old way if so
87 then run the old code. Valid commands are msg, shm, sem. */ 90 then run the old code. Valid commands are msg, shm, sem. */
88 { 91 {
@@ -113,7 +116,7 @@ int ipcrm_main(int argc, char **argv)
113 return 0; 116 return 0;
114 } 117 }
115 } 118 }
116#endif /* #ifndef CONFIG_IPCRM_DROP_LEGACY */ 119#endif /* IPCRM_LEGACY */
117 120
118 /* process new syntax to conform with SYSV ipcrm */ 121 /* process new syntax to conform with SYSV ipcrm */
119 while ((c = getopt(argc, argv, "q:m:s:Q:M:S:h?")) != -1) { 122 while ((c = getopt(argc, argv, "q:m:s:Q:M:S:h?")) != -1) {