summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archival/bbunzip.c16
-rw-r--r--archival/bzip2.c10
-rw-r--r--archival/cpio.c4
-rw-r--r--archival/gzip.c4
-rw-r--r--archival/libunarchive/decompress_bunzip2.c10
-rw-r--r--archival/libunarchive/decompress_uncompress.c12
-rw-r--r--archival/libunarchive/decompress_unlzma.c16
-rw-r--r--archival/libunarchive/decompress_unzip.c16
-rw-r--r--archival/libunarchive/get_header_tar.c12
-rw-r--r--archival/libunarchive/open_transformer.c2
-rw-r--r--archival/rpm.c4
-rw-r--r--archival/tar.c54
-rw-r--r--coreutils/chmod.c8
-rw-r--r--coreutils/chown.c14
-rw-r--r--coreutils/date.c6
-rw-r--r--coreutils/df.c6
-rw-r--r--coreutils/du.c8
-rw-r--r--coreutils/expand.c8
-rw-r--r--coreutils/id.c4
-rw-r--r--coreutils/install.c6
-rw-r--r--coreutils/libcoreutils/getopt_mk_fifo_nod.c2
-rw-r--r--coreutils/ls.c48
-rw-r--r--coreutils/mkdir.c2
-rw-r--r--coreutils/readlink.c4
-rw-r--r--coreutils/stat.c24
-rw-r--r--coreutils/tail.c6
-rw-r--r--coreutils/touch.c4
-rw-r--r--coreutils/tty.c14
-rw-r--r--coreutils/uname.c2
-rw-r--r--debianutils/run_parts.c2
-rw-r--r--debianutils/start_stop_daemon.c10
-rw-r--r--debianutils/which.c4
-rwxr-xr-xdocs/autodocifier.pl4
-rw-r--r--docs/new-applet-HOWTO.txt2
-rw-r--r--editors/cmp.c6
-rw-r--r--editors/diff.c4
-rw-r--r--editors/vi.c16
-rw-r--r--findutils/find.c150
-rw-r--r--findutils/grep.c38
-rw-r--r--findutils/xargs.c20
-rw-r--r--include/applets.h688
-rw-r--r--include/libbb.h20
-rw-r--r--include/unarchive.h18
-rw-r--r--include/usage.h616
-rw-r--r--libbb/appletlib.c16
-rw-r--r--libbb/lineedit.c14
-rw-r--r--libbb/mtab_file.c2
-rw-r--r--libbb/procps.c2
-rw-r--r--libbb/read.c4
-rw-r--r--libbb/xconnect.c10
-rw-r--r--libbb/xfuncs_printf.c2
-rw-r--r--loginutils/chpasswd.c2
-rw-r--r--loginutils/login.c10
-rw-r--r--loginutils/su.c4
-rw-r--r--loginutils/sulogin.c2
-rw-r--r--mailutils/mime.c6
-rw-r--r--mailutils/popmaildir.c4
-rw-r--r--miscutils/crond.c6
-rw-r--r--miscutils/eject.c2
-rw-r--r--miscutils/hdparm.c46
-rw-r--r--miscutils/less.c6
-rw-r--r--modutils/insmod.c2
-rw-r--r--modutils/modprobe-small.c8
-rw-r--r--modutils/modprobe.c2
-rw-r--r--modutils/modutils.h6
-rw-r--r--networking/brctl.c8
-rw-r--r--networking/ftpd.c4
-rw-r--r--networking/httpd.c70
-rw-r--r--networking/ifconfig.c2
-rw-r--r--networking/ifupdown.c2
-rw-r--r--networking/ip.c20
-rw-r--r--networking/ipcalc.c2
-rw-r--r--networking/libiproute/iproute.c4
-rw-r--r--networking/nc.c26
-rw-r--r--networking/nc_bloaty.c8
-rw-r--r--networking/netstat.c18
-rw-r--r--networking/ping.c2
-rw-r--r--networking/telnetd.c10
-rw-r--r--networking/telnetd.ctrlSQ.patch2
-rw-r--r--networking/tftp.c52
-rw-r--r--networking/tunctl.c4
-rw-r--r--networking/udhcp/dhcpc.c26
-rw-r--r--networking/udhcp/dhcpc.h2
-rw-r--r--networking/udhcp/dhcpd.c4
-rw-r--r--networking/udhcp/files.c6
-rw-r--r--networking/wget.c6
-rw-r--r--procps/pidof.c12
-rw-r--r--procps/ps.c14
-rw-r--r--procps/top.c10
-rw-r--r--runit/chpst.c4
-rw-r--r--scripts/basic/fixdep.c30
-rw-r--r--scripts/kconfig/confdata.c20
-rw-r--r--selinux/setfiles.c4
-rw-r--r--shell/ash.c40
-rw-r--r--shell/hush.c22
-rw-r--r--sysklogd/syslogd.c56
-rwxr-xr-xtestsuite/all_sourcecode.tests2
-rw-r--r--util-linux/acpid.c4
-rw-r--r--util-linux/fdisk.c12
-rw-r--r--util-linux/fsck_minix.c2
-rw-r--r--util-linux/hexdump.c2
-rw-r--r--util-linux/mount.c28
102 files changed, 1312 insertions, 1308 deletions
diff --git a/archival/bbunzip.c b/archival/bbunzip.c
index 75489f2..d25f509 100644
--- a/archival/bbunzip.c
+++ b/archival/bbunzip.c
@@ -30,11 +30,11 @@ int open_to_or_warn(int to_fd, const char *filename, int flags, int mode)
int FAST_FUNC bbunpack(char **argv,
char* (*make_new_name)(char *filename),
- USE_DESKTOP(long long) int (*unpacker)(unpack_info_t *info)
+ IF_DESKTOP(long long) int (*unpacker)(unpack_info_t *info)
)
{
struct stat stat_buf;
- USE_DESKTOP(long long) int status;
+ IF_DESKTOP(long long) int status;
char *filename, *new_name;
smallint exitcode = 0;
unpack_info_t info;
@@ -175,7 +175,7 @@ char* make_new_name_bunzip2(char *filename)
}
static
-USE_DESKTOP(long long) int unpack_bunzip2(unpack_info_t *info UNUSED_PARAM)
+IF_DESKTOP(long long) int unpack_bunzip2(unpack_info_t *info UNUSED_PARAM)
{
return unpack_bz2_stream_prime(STDIN_FILENO, STDOUT_FILENO);
}
@@ -251,9 +251,9 @@ char* make_new_name_gunzip(char *filename)
}
static
-USE_DESKTOP(long long) int unpack_gunzip(unpack_info_t *info)
+IF_DESKTOP(long long) int unpack_gunzip(unpack_info_t *info)
{
- USE_DESKTOP(long long) int status = -1;
+ IF_DESKTOP(long long) int status = -1;
/* do the decompression, and cleanup */
if (xread_char(STDIN_FILENO) == 0x1f) {
@@ -325,7 +325,7 @@ char* make_new_name_unlzma(char *filename)
}
static
-USE_DESKTOP(long long) int unpack_unlzma(unpack_info_t *info UNUSED_PARAM)
+IF_DESKTOP(long long) int unpack_unlzma(unpack_info_t *info UNUSED_PARAM)
{
return unpack_lzma_stream(STDIN_FILENO, STDOUT_FILENO);
}
@@ -360,9 +360,9 @@ char* make_new_name_uncompress(char *filename)
}
static
-USE_DESKTOP(long long) int unpack_uncompress(unpack_info_t *info UNUSED_PARAM)
+IF_DESKTOP(long long) int unpack_uncompress(unpack_info_t *info UNUSED_PARAM)
{
- USE_DESKTOP(long long) int status = -1;
+ IF_DESKTOP(long long) int status = -1;
if ((xread_char(STDIN_FILENO) != 0x1f) || (xread_char(STDIN_FILENO) != 0x9d)) {
bb_error_msg("invalid magic");
diff --git a/archival/bzip2.c b/archival/bzip2.c
index 8eb5ca9..bbaf566 100644
--- a/archival/bzip2.c
+++ b/archival/bzip2.c
@@ -64,7 +64,7 @@ static uint8_t level;
* total written bytes so far otherwise
*/
static
-USE_DESKTOP(long long) int bz_write(bz_stream *strm, void* rbuf, ssize_t rlen, void *wbuf)
+IF_DESKTOP(long long) int bz_write(bz_stream *strm, void* rbuf, ssize_t rlen, void *wbuf)
{
int n, n2, ret;
@@ -98,13 +98,13 @@ USE_DESKTOP(long long) int bz_write(bz_stream *strm, void* rbuf, ssize_t rlen, v
if (rlen && strm->avail_in == 0)
break;
}
- return 0 USE_DESKTOP( + strm->total_out );
+ return 0 IF_DESKTOP( + strm->total_out );
}
static
-USE_DESKTOP(long long) int compressStream(unpack_info_t *info UNUSED_PARAM)
+IF_DESKTOP(long long) int compressStream(unpack_info_t *info UNUSED_PARAM)
{
- USE_DESKTOP(long long) int total;
+ IF_DESKTOP(long long) int total;
ssize_t count;
bz_stream bzs; /* it's small */
#define strm (&bzs)
@@ -163,7 +163,7 @@ int bzip2_main(int argc UNUSED_PARAM, char **argv)
opt_complementary = "s2"; /* -s means -2 (compatibility) */
/* Must match bbunzip's constants OPT_STDOUT, OPT_FORCE! */
- opt = getopt32(argv, "cfv" USE_BUNZIP2("dt") "123456789qzs");
+ opt = getopt32(argv, "cfv" IF_BUNZIP2("dt") "123456789qzs");
#if ENABLE_BUNZIP2 /* bunzip2_main may not be visible... */
if (opt & 0x18) // -d and/or -t
return bunzip2_main(argc, argv);
diff --git a/archival/cpio.c b/archival/cpio.c
index 11b22e4..4cf3c2c 100644
--- a/archival/cpio.c
+++ b/archival/cpio.c
@@ -270,7 +270,7 @@ int cpio_main(int argc UNUSED_PARAM, char **argv)
{
archive_handle_t *archive_handle;
char *cpio_filename;
- USE_FEATURE_CPIO_O(const char *cpio_fmt = "";)
+ IF_FEATURE_CPIO_O(const char *cpio_fmt = "";)
unsigned opt;
#if ENABLE_GETOPT_LONG
@@ -295,7 +295,7 @@ int cpio_main(int argc UNUSED_PARAM, char **argv)
#if !ENABLE_FEATURE_CPIO_O
opt = getopt32(argv, OPTION_STR, &cpio_filename);
#else
- opt = getopt32(argv, OPTION_STR "oH:" USE_FEATURE_CPIO_P("p"), &cpio_filename, &cpio_fmt);
+ opt = getopt32(argv, OPTION_STR "oH:" IF_FEATURE_CPIO_P("p"), &cpio_filename, &cpio_fmt);
if (opt & CPIO_OPT_PASSTHROUGH) {
pid_t pid;
struct fd_pair pp;
diff --git a/archival/gzip.c b/archival/gzip.c
index 43804b2..a8f8fa4 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -2015,7 +2015,7 @@ char* make_new_name_gzip(char *filename)
}
static
-USE_DESKTOP(long long) int pack_gzip(unpack_info_t *info UNUSED_PARAM)
+IF_DESKTOP(long long) int pack_gzip(unpack_info_t *info UNUSED_PARAM)
{
struct stat s;
@@ -2050,7 +2050,7 @@ int gzip_main(int argc UNUSED_PARAM, char **argv)
unsigned opt;
/* Must match bbunzip's constants OPT_STDOUT, OPT_FORCE! */
- opt = getopt32(argv, "cfv" USE_GUNZIP("dt") "q123456789n");
+ opt = getopt32(argv, "cfv" IF_GUNZIP("dt") "q123456789n");
#if ENABLE_GUNZIP /* gunzip_main may not be visible... */
if (opt & 0x18) // -d and/or -t
return gunzip_main(argc, argv);
diff --git a/archival/libunarchive/decompress_bunzip2.c b/archival/libunarchive/decompress_bunzip2.c
index b53720f..cd8df08 100644
--- a/archival/libunarchive/decompress_bunzip2.c
+++ b/archival/libunarchive/decompress_bunzip2.c
@@ -648,10 +648,10 @@ void FAST_FUNC dealloc_bunzip(bunzip_data *bd)
/* Decompress src_fd to dst_fd. Stops at end of bzip data, not end of file. */
-USE_DESKTOP(long long) int FAST_FUNC
+IF_DESKTOP(long long) int FAST_FUNC
unpack_bz2_stream(int src_fd, int dst_fd)
{
- USE_DESKTOP(long long total_written = 0;)
+ IF_DESKTOP(long long total_written = 0;)
char *outbuf;
bunzip_data *bd;
int i;
@@ -666,7 +666,7 @@ unpack_bz2_stream(int src_fd, int dst_fd)
i = RETVAL_SHORT_WRITE;
break;
}
- USE_DESKTOP(total_written += i;)
+ IF_DESKTOP(total_written += i;)
}
}
@@ -686,10 +686,10 @@ unpack_bz2_stream(int src_fd, int dst_fd)
dealloc_bunzip(bd);
free(outbuf);
- return i ? i : USE_DESKTOP(total_written) + 0;
+ return i ? i : IF_DESKTOP(total_written) + 0;
}
-USE_DESKTOP(long long) int FAST_FUNC
+IF_DESKTOP(long long) int FAST_FUNC
unpack_bz2_stream_prime(int src_fd, int dst_fd)
{
unsigned char magic[2];
diff --git a/archival/libunarchive/decompress_uncompress.c b/archival/libunarchive/decompress_uncompress.c
index fe1491e..2877c89 100644
--- a/archival/libunarchive/decompress_uncompress.c
+++ b/archival/libunarchive/decompress_uncompress.c
@@ -72,11 +72,11 @@
* be stored in the compressed file.
*/
-USE_DESKTOP(long long) int FAST_FUNC
+IF_DESKTOP(long long) int FAST_FUNC
unpack_Z_stream(int fd_in, int fd_out)
{
- USE_DESKTOP(long long total_written = 0;)
- USE_DESKTOP(long long) int retval = -1;
+ IF_DESKTOP(long long total_written = 0;)
+ IF_DESKTOP(long long) int retval = -1;
unsigned char *stackp;
long code;
int finchar;
@@ -265,7 +265,7 @@ unpack_Z_stream(int fd_in, int fd_out)
if (outpos >= OBUFSIZ) {
full_write(fd_out, outbuf, outpos);
//error check??
- USE_DESKTOP(total_written += outpos;)
+ IF_DESKTOP(total_written += outpos;)
outpos = 0;
}
stackp += i;
@@ -294,10 +294,10 @@ unpack_Z_stream(int fd_in, int fd_out)
if (outpos > 0) {
full_write(fd_out, outbuf, outpos);
//error check??
- USE_DESKTOP(total_written += outpos;)
+ IF_DESKTOP(total_written += outpos;)
}
- retval = USE_DESKTOP(total_written) + 0;
+ retval = IF_DESKTOP(total_written) + 0;
err:
free(inbuf);
free(outbuf);
diff --git a/archival/libunarchive/decompress_unlzma.c b/archival/libunarchive/decompress_unlzma.c
index 2cfcd9b..33e5cd6 100644
--- a/archival/libunarchive/decompress_unlzma.c
+++ b/archival/libunarchive/decompress_unlzma.c
@@ -228,10 +228,10 @@ enum {
};
-USE_DESKTOP(long long) int FAST_FUNC
+IF_DESKTOP(long long) int FAST_FUNC
unpack_lzma_stream(int src_fd, int dst_fd)
{
- USE_DESKTOP(long long total_written = 0;)
+ IF_DESKTOP(long long total_written = 0;)
lzma_header_t header;
int lc, pb, lp;
uint32_t pos_state_mask;
@@ -330,7 +330,7 @@ unpack_lzma_stream(int src_fd, int dst_fd)
global_pos += header.dict_size;
if (full_write(dst_fd, buffer, header.dict_size) != (ssize_t)header.dict_size)
goto bad;
- USE_DESKTOP(total_written += header.dict_size;)
+ IF_DESKTOP(total_written += header.dict_size;)
}
#else
len = 1;
@@ -468,20 +468,20 @@ unpack_lzma_stream(int src_fd, int dst_fd)
}
len += LZMA_MATCH_MIN_LEN;
- SKIP_FEATURE_LZMA_FAST(string:)
+ IF_NOT_FEATURE_LZMA_FAST(string:)
do {
pos = buffer_pos - rep0;
while (pos >= header.dict_size)
pos += header.dict_size;
previous_byte = buffer[pos];
- SKIP_FEATURE_LZMA_FAST(one_byte2:)
+ IF_NOT_FEATURE_LZMA_FAST(one_byte2:)
buffer[buffer_pos++] = previous_byte;
if (buffer_pos == header.dict_size) {
buffer_pos = 0;
global_pos += header.dict_size;
if (full_write(dst_fd, buffer, header.dict_size) != (ssize_t)header.dict_size)
goto bad;
- USE_DESKTOP(total_written += header.dict_size;)
+ IF_DESKTOP(total_written += header.dict_size;)
}
len--;
} while (len != 0 && buffer_pos < header.dst_size);
@@ -489,8 +489,8 @@ unpack_lzma_stream(int src_fd, int dst_fd)
}
{
- SKIP_DESKTOP(int total_written = 0; /* success */)
- USE_DESKTOP(total_written += buffer_pos;)
+ IF_NOT_DESKTOP(int total_written = 0; /* success */)
+ IF_DESKTOP(total_written += buffer_pos;)
if (full_write(dst_fd, buffer, buffer_pos) != (ssize_t)buffer_pos) {
bad:
total_written = -1; /* failure */
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c
index 8696925..b090f26 100644
--- a/archival/libunarchive/decompress_unzip.c
+++ b/archival/libunarchive/decompress_unzip.c
@@ -970,10 +970,10 @@ static int inflate_get_next_window(STATE_PARAM_ONLY)
/* Called from unpack_gz_stream() and inflate_unzip() */
-static USE_DESKTOP(long long) int
+static IF_DESKTOP(long long) int
inflate_unzip_internal(STATE_PARAM int in, int out)
{
- USE_DESKTOP(long long) int n = 0;
+ IF_DESKTOP(long long) int n = 0;
ssize_t nwrote;
/* Allocate all global buffers (for DYN_ALLOC option) */
@@ -1008,7 +1008,7 @@ inflate_unzip_internal(STATE_PARAM int in, int out)
n = -1;
goto ret;
}
- USE_DESKTOP(n += nwrote;)
+ IF_DESKTOP(n += nwrote;)
if (r == 0) break;
}
@@ -1033,10 +1033,10 @@ inflate_unzip_internal(STATE_PARAM int in, int out)
/* For unzip */
-USE_DESKTOP(long long) int FAST_FUNC
+IF_DESKTOP(long long) int FAST_FUNC
inflate_unzip(inflate_unzip_result *res, off_t compr_size, int in, int out)
{
- USE_DESKTOP(long long) int n;
+ IF_DESKTOP(long long) int n;
DECLARE_STATE;
ALLOC_STATE;
@@ -1181,11 +1181,11 @@ static int check_header_gzip(STATE_PARAM unpack_info_t *info)
return 1;
}
-USE_DESKTOP(long long) int FAST_FUNC
+IF_DESKTOP(long long) int FAST_FUNC
unpack_gz_stream_with_info(int in, int out, unpack_info_t *info)
{
uint32_t v32;
- USE_DESKTOP(long long) int n;
+ IF_DESKTOP(long long) int n;
DECLARE_STATE;
n = 0;
@@ -1245,7 +1245,7 @@ unpack_gz_stream_with_info(int in, int out, unpack_info_t *info)
return n;
}
-USE_DESKTOP(long long) int FAST_FUNC
+IF_DESKTOP(long long) int FAST_FUNC
unpack_gz_stream(int in, int out)
{
return unpack_gz_stream_with_info(in, out, NULL);
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c
index 443052f..16e2de4 100644
--- a/archival/libunarchive/get_header_tar.c
+++ b/archival/libunarchive/get_header_tar.c
@@ -144,8 +144,8 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
// if (!archive_handle->ah_priv_inited) {
// archive_handle->ah_priv_inited = 1;
// p_end = 0;
-// USE_FEATURE_TAR_GNU_EXTENSIONS(p_longname = NULL;)
-// USE_FEATURE_TAR_GNU_EXTENSIONS(p_linkname = NULL;)
+// IF_FEATURE_TAR_GNU_EXTENSIONS(p_longname = NULL;)
+// IF_FEATURE_TAR_GNU_EXTENSIONS(p_linkname = NULL;)
// }
if (sizeof(tar) != 512)
@@ -176,7 +176,7 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
bb_error_msg_and_die("short read");
}
if (i != 512) {
- USE_FEATURE_TAR_AUTODETECT(goto autodetect;)
+ IF_FEATURE_TAR_AUTODETECT(goto autodetect;)
goto short_read;
}
@@ -265,14 +265,14 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
#if ENABLE_FEATURE_TAR_OLDGNU_COMPATIBILITY
sum = strtoul(tar.chksum, &cp, 8);
if ((*cp && *cp != ' ')
- || (sum_u != sum USE_FEATURE_TAR_OLDSUN_COMPATIBILITY(&& sum_s != sum))
+ || (sum_u != sum IF_FEATURE_TAR_OLDSUN_COMPATIBILITY(&& sum_s != sum))
) {
bb_error_msg_and_die("invalid tar header checksum");
}
#else
/* This field does not need special treatment (getOctal) */
sum = xstrtoul(tar.chksum, 8);
- if (sum_u != sum USE_FEATURE_TAR_OLDSUN_COMPATIBILITY(&& sum_s != sum)) {
+ if (sum_u != sum IF_FEATURE_TAR_OLDSUN_COMPATIBILITY(&& sum_s != sum)) {
bb_error_msg_and_die("invalid tar header checksum");
}
#endif
@@ -356,7 +356,7 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
file_header->mode |= S_IFBLK;
goto size0;
case '5':
- USE_FEATURE_TAR_OLDGNU_COMPATIBILITY(set_dir:)
+ IF_FEATURE_TAR_OLDGNU_COMPATIBILITY(set_dir:)
file_header->mode |= S_IFDIR;
goto size0;
case '6':
diff --git a/archival/libunarchive/open_transformer.c b/archival/libunarchive/open_transformer.c
index 42fdd96..fae589e 100644
--- a/archival/libunarchive/open_transformer.c
+++ b/archival/libunarchive/open_transformer.c
@@ -12,7 +12,7 @@
* in include/unarchive.h. On NOMMU, transformer is removed.
*/
void FAST_FUNC open_transformer(int fd,
- USE_DESKTOP(long long) int FAST_FUNC (*transformer)(int src_fd, int dst_fd),
+ IF_DESKTOP(long long) int FAST_FUNC (*transformer)(int src_fd, int dst_fd),
const char *transform_prog)
{
struct fd_pair fd_pipe;
diff --git a/archival/rpm.c b/archival/rpm.c
index 4c36067..569bcdd 100644
--- a/archival/rpm.c
+++ b/archival/rpm.c
@@ -190,7 +190,7 @@ static void extract_cpio_gz(int fd)
archive_handle_t *archive_handle;
unsigned char magic[2];
#if BB_MMU
- USE_DESKTOP(long long) int FAST_FUNC (*xformer)(int src_fd, int dst_fd);
+ IF_DESKTOP(long long) int FAST_FUNC (*xformer)(int src_fd, int dst_fd);
enum { xformer_prog = 0 };
#else
enum { xformer = 0 };
@@ -224,7 +224,7 @@ static void extract_cpio_gz(int fd)
|| magic[0] != 'B' || magic[1] != 'Z'
) {
bb_error_msg_and_die("no gzip"
- USE_FEATURE_SEAMLESS_BZ2("/bzip2")
+ IF_FEATURE_SEAMLESS_BZ2("/bzip2")
" magic");
}
#if BB_MMU
diff --git a/archival/tar.c b/archival/tar.c
index 03d66a6..379028b 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -728,14 +728,14 @@ static void handle_SIGCHLD(int status)
enum {
OPTBIT_KEEP_OLD = 7,
- USE_FEATURE_TAR_CREATE( OPTBIT_CREATE ,)
- USE_FEATURE_TAR_CREATE( OPTBIT_DEREFERENCE ,)
- USE_FEATURE_SEAMLESS_BZ2( OPTBIT_BZIP2 ,)
- USE_FEATURE_SEAMLESS_LZMA(OPTBIT_LZMA ,)
- USE_FEATURE_TAR_FROM( OPTBIT_INCLUDE_FROM,)
- USE_FEATURE_TAR_FROM( OPTBIT_EXCLUDE_FROM,)
- USE_FEATURE_SEAMLESS_GZ( OPTBIT_GZIP ,)
- USE_FEATURE_SEAMLESS_Z( OPTBIT_COMPRESS ,)
+ IF_FEATURE_TAR_CREATE( OPTBIT_CREATE ,)
+ IF_FEATURE_TAR_CREATE( OPTBIT_DEREFERENCE ,)
+ IF_FEATURE_SEAMLESS_BZ2( OPTBIT_BZIP2 ,)
+ IF_FEATURE_SEAMLESS_LZMA(OPTBIT_LZMA ,)
+ IF_FEATURE_TAR_FROM( OPTBIT_INCLUDE_FROM,)
+ IF_FEATURE_TAR_FROM( OPTBIT_EXCLUDE_FROM,)
+ IF_FEATURE_SEAMLESS_GZ( OPTBIT_GZIP ,)
+ IF_FEATURE_SEAMLESS_Z( OPTBIT_COMPRESS ,)
OPTBIT_NOPRESERVE_OWN,
OPTBIT_NOPRESERVE_PERM,
OPTBIT_NUMERIC_OWNER,
@@ -747,14 +747,14 @@ enum {
OPT_P = 1 << 5, // p
OPT_VERBOSE = 1 << 6, // v
OPT_KEEP_OLD = 1 << 7, // k
- OPT_CREATE = USE_FEATURE_TAR_CREATE( (1 << OPTBIT_CREATE )) + 0, // c
- OPT_DEREFERENCE = USE_FEATURE_TAR_CREATE( (1 << OPTBIT_DEREFERENCE )) + 0, // h
- OPT_BZIP2 = USE_FEATURE_SEAMLESS_BZ2( (1 << OPTBIT_BZIP2 )) + 0, // j
- OPT_LZMA = USE_FEATURE_SEAMLESS_LZMA((1 << OPTBIT_LZMA )) + 0, // a
- OPT_INCLUDE_FROM = USE_FEATURE_TAR_FROM( (1 << OPTBIT_INCLUDE_FROM)) + 0, // T
- OPT_EXCLUDE_FROM = USE_FEATURE_TAR_FROM( (1 << OPTBIT_EXCLUDE_FROM)) + 0, // X
- OPT_GZIP = USE_FEATURE_SEAMLESS_GZ( (1 << OPTBIT_GZIP )) + 0, // z
- OPT_COMPRESS = USE_FEATURE_SEAMLESS_Z( (1 << OPTBIT_COMPRESS )) + 0, // Z
+ OPT_CREATE = IF_FEATURE_TAR_CREATE( (1 << OPTBIT_CREATE )) + 0, // c
+ OPT_DEREFERENCE = IF_FEATURE_TAR_CREATE( (1 << OPTBIT_DEREFERENCE )) + 0, // h
+ OPT_BZIP2 = IF_FEATURE_SEAMLESS_BZ2( (1 << OPTBIT_BZIP2 )) + 0, // j
+ OPT_LZMA = IF_FEATURE_SEAMLESS_LZMA((1 << OPTBIT_LZMA )) + 0, // a
+ OPT_INCLUDE_FROM = IF_FEATURE_TAR_FROM( (1 << OPTBIT_INCLUDE_FROM)) + 0, // T
+ OPT_EXCLUDE_FROM = IF_FEATURE_TAR_FROM( (1 << OPTBIT_EXCLUDE_FROM)) + 0, // X
+ OPT_GZIP = IF_FEATURE_SEAMLESS_GZ( (1 << OPTBIT_GZIP )) + 0, // z
+ OPT_COMPRESS = IF_FEATURE_SEAMLESS_Z( (1 << OPTBIT_COMPRESS )) + 0, // Z
OPT_NOPRESERVE_OWN = 1 << OPTBIT_NOPRESERVE_OWN , // no-same-owner
OPT_NOPRESERVE_PERM = 1 << OPTBIT_NOPRESERVE_PERM, // no-same-permissions
OPT_NUMERIC_OWNER = 1 << OPTBIT_NUMERIC_OWNER,
@@ -832,24 +832,24 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
#if ENABLE_FEATURE_TAR_LONG_OPTIONS && ENABLE_FEATURE_TAR_FROM
"\xff::" // cumulative lists for --exclude
#endif
- USE_FEATURE_TAR_CREATE("c:") "t:x:" // at least one of these is reqd
- USE_FEATURE_TAR_CREATE("c--tx:t--cx:x--ct") // mutually exclusive
- SKIP_FEATURE_TAR_CREATE("t--x:x--t"); // mutually exclusive
+ IF_FEATURE_TAR_CREATE("c:") "t:x:" // at least one of these is reqd
+ IF_FEATURE_TAR_CREATE("c--tx:t--cx:x--ct") // mutually exclusive
+ IF_NOT_FEATURE_TAR_CREATE("t--x:x--t"); // mutually exclusive
#if ENABLE_FEATURE_TAR_LONG_OPTIONS
applet_long_options = tar_longopts;
#endif
opt = getopt32(argv,
"txC:f:Opvk"
- USE_FEATURE_TAR_CREATE( "ch" )
- USE_FEATURE_SEAMLESS_BZ2( "j" )
- USE_FEATURE_SEAMLESS_LZMA("a" )
- USE_FEATURE_TAR_FROM( "T:X:")
- USE_FEATURE_SEAMLESS_GZ( "z" )
- USE_FEATURE_SEAMLESS_Z( "Z" )
+ IF_FEATURE_TAR_CREATE( "ch" )
+ IF_FEATURE_SEAMLESS_BZ2( "j" )
+ IF_FEATURE_SEAMLESS_LZMA("a" )
+ IF_FEATURE_TAR_FROM( "T:X:")
+ IF_FEATURE_SEAMLESS_GZ( "z" )
+ IF_FEATURE_SEAMLESS_Z( "Z" )
, &base_dir // -C dir
, &tar_filename // -f filename
- USE_FEATURE_TAR_FROM(, &(tar_handle->accept)) // T
- USE_FEATURE_TAR_FROM(, &(tar_handle->reject)) // X
+ IF_FEATURE_TAR_FROM(, &(tar_handle->accept)) // T
+ IF_FEATURE_TAR_FROM(, &(tar_handle->reject)) // X
#if ENABLE_FEATURE_TAR_LONG_OPTIONS && ENABLE_FEATURE_TAR_FROM
, &excludes // --exclude
#endif
diff --git a/coreutils/chmod.c b/coreutils/chmod.c
index 40f681f..9c1c760 100644
--- a/coreutils/chmod.c
+++ b/coreutils/chmod.c
@@ -20,10 +20,10 @@
#define OPT_RECURSE (option_mask32 & 1)
-#define OPT_VERBOSE (USE_DESKTOP(option_mask32 & 2) SKIP_DESKTOP(0))
-#define OPT_CHANGED (USE_DESKTOP(option_mask32 & 4) SKIP_DESKTOP(0))
-#define OPT_QUIET (USE_DESKTOP(option_mask32 & 8) SKIP_DESKTOP(0))
-#define OPT_STR "R" USE_DESKTOP("vcf")
+#define OPT_VERBOSE (IF_DESKTOP(option_mask32 & 2) IF_NOT_DESKTOP(0))
+#define OPT_CHANGED (IF_DESKTOP(option_mask32 & 4) IF_NOT_DESKTOP(0))
+#define OPT_QUIET (IF_DESKTOP(option_mask32 & 8) IF_NOT_DESKTOP(0))
+#define OPT_STR "R" IF_DESKTOP("vcf")
/* coreutils:
* chmod never changes the permissions of symbolic links; the chmod
diff --git a/coreutils/chown.c b/coreutils/chown.c
index 3452492..2d8e556 100644
--- a/coreutils/chown.c
+++ b/coreutils/chown.c
@@ -16,13 +16,13 @@
/* This is a NOEXEC applet. Be very careful! */
-#define OPT_STR ("Rh" USE_DESKTOP("vcfLHP"))
+#define OPT_STR ("Rh" IF_DESKTOP("vcfLHP"))
#define BIT_RECURSE 1
#define OPT_RECURSE (opt & 1)
#define OPT_NODEREF (opt & 2)
-#define OPT_VERBOSE (USE_DESKTOP(opt & 0x04) SKIP_DESKTOP(0))
-#define OPT_CHANGED (USE_DESKTOP(opt & 0x08) SKIP_DESKTOP(0))
-#define OPT_QUIET (USE_DESKTOP(opt & 0x10) SKIP_DESKTOP(0))
+#define OPT_VERBOSE (IF_DESKTOP(opt & 0x04) IF_NOT_DESKTOP(0))
+#define OPT_CHANGED (IF_DESKTOP(opt & 0x08) IF_NOT_DESKTOP(0))
+#define OPT_QUIET (IF_DESKTOP(opt & 0x10) IF_NOT_DESKTOP(0))
/* POSIX options
* -L traverse every symbolic link to a directory encountered
* -H if a command line argument is a symbolic link to a directory, traverse it
@@ -32,10 +32,10 @@
* The last option specified shall determine the behavior of the utility." */
/* -L */
#define BIT_TRAVERSE 0x20
-#define OPT_TRAVERSE (USE_DESKTOP(opt & BIT_TRAVERSE) SKIP_DESKTOP(0))
+#define OPT_TRAVERSE (IF_DESKTOP(opt & BIT_TRAVERSE) IF_NOT_DESKTOP(0))
/* -H or -L */
#define BIT_TRAVERSE_TOP (0x20|0x40)
-#define OPT_TRAVERSE_TOP (USE_DESKTOP(opt & BIT_TRAVERSE_TOP) SKIP_DESKTOP(0))
+#define OPT_TRAVERSE_TOP (IF_DESKTOP(opt & BIT_TRAVERSE_TOP) IF_NOT_DESKTOP(0))
typedef int (*chown_fptr)(const char *, uid_t, gid_t);
@@ -85,7 +85,7 @@ int chown_main(int argc UNUSED_PARAM, char **argv)
/* This matches coreutils behavior (almost - see below) */
if (OPT_NODEREF
/* || (OPT_RECURSE && !OPT_TRAVERSE_TOP): */
- USE_DESKTOP( || (opt & (BIT_RECURSE|BIT_TRAVERSE_TOP)) == BIT_RECURSE)
+ IF_DESKTOP( || (opt & (BIT_RECURSE|BIT_TRAVERSE_TOP)) == BIT_RECURSE)
) {
param.chown_func = lchown;
}
diff --git a/coreutils/date.c b/coreutils/date.c
index 177b7d0..3a536db 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -52,11 +52,11 @@ int date_main(int argc UNUSED_PARAM, char **argv)
char *isofmt_arg = NULL;
opt_complementary = "d--s:s--d"
- USE_FEATURE_DATE_ISOFMT(":R--I:I--R");
+ IF_FEATURE_DATE_ISOFMT(":R--I:I--R");
opt = getopt32(argv, "Rs:ud:r:"
- USE_FEATURE_DATE_ISOFMT("I::D:"),
+ IF_FEATURE_DATE_ISOFMT("I::D:"),
&date_str, &date_str, &filename
- USE_FEATURE_DATE_ISOFMT(, &isofmt_arg, &fmt_str2dt));
+ IF_FEATURE_DATE_ISOFMT(, &isofmt_arg, &fmt_str2dt));
argv += optind;
maybe_set_utc(opt);
diff --git a/coreutils/df.c b/coreutils/df.c
index dfd6e0b..34b0150 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -64,9 +64,9 @@ int df_main(int argc, char **argv)
opt_complementary = "k-m:m-k";
#endif
opt = getopt32(argv, "kP"
- USE_FEATURE_DF_FANCY("aiB:")
- USE_FEATURE_HUMAN_READABLE("hm")
- USE_FEATURE_DF_FANCY(, &chp));
+ IF_FEATURE_DF_FANCY("aiB:")
+ IF_FEATURE_HUMAN_READABLE("hm")
+ IF_FEATURE_DF_FANCY(, &chp));
if (opt & OPT_MEGA)
df_disp_hr = 1024*1024;
diff --git a/coreutils/du.c b/coreutils/du.c
index 16c7732..ec283f8 100644
--- a/coreutils/du.c
+++ b/coreutils/du.c
@@ -155,13 +155,13 @@ int du_main(int argc UNUSED_PARAM, char **argv)
unsigned opt;
#if ENABLE_FEATURE_HUMAN_READABLE
- USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_hr = 1024;)
- SKIP_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_hr = 512;)
+ IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_hr = 1024;)
+ IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_hr = 512;)
if (getenv("POSIXLY_CORRECT")) /* TODO - a new libbb function? */
G.disp_hr = 512;
#else
- USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_k = 1;)
- /* SKIP_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_k = 0;) - G is pre-zeroed */
+ IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_k = 1;)
+ /* IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_k = 0;) - G is pre-zeroed */
#endif
G.max_print_depth = INT_MAX;
diff --git a/coreutils/expand.c b/coreutils/expand.c
index 0967e25..7137c3b 100644
--- a/coreutils/expand.c
+++ b/coreutils/expand.c
@@ -132,10 +132,10 @@ int expand_main(int argc UNUSED_PARAM, char **argv)
#endif
if (ENABLE_EXPAND && (!ENABLE_UNEXPAND || applet_name[0] == 'e')) {
- USE_FEATURE_EXPAND_LONG_OPTIONS(applet_long_options = expand_longopts);
+ IF_FEATURE_EXPAND_LONG_OPTIONS(applet_long_options = expand_longopts);
opt = getopt32(argv, "it:", &opt_t);
} else {
- USE_FEATURE_UNEXPAND_LONG_OPTIONS(applet_long_options = unexpand_longopts);
+ IF_FEATURE_UNEXPAND_LONG_OPTIONS(applet_long_options = unexpand_longopts);
/* -t NUM sets also -a */
opt_complementary = "ta";
opt = getopt32(argv, "ft:a", &opt_t);
@@ -157,9 +157,9 @@ int expand_main(int argc UNUSED_PARAM, char **argv)
}
if (ENABLE_EXPAND && (!ENABLE_UNEXPAND || applet_name[0] == 'e'))
- USE_EXPAND(expand(file, tab_size, opt));
+ IF_EXPAND(expand(file, tab_size, opt));
else
- USE_UNEXPAND(unexpand(file, tab_size, opt));
+ IF_UNEXPAND(unexpand(file, tab_size, opt));
/* Check and close the file */
if (fclose_if_not_stdin(file)) {
diff --git a/coreutils/id.c b/coreutils/id.c
index 43f403f..6022c9f 100644
--- a/coreutils/id.c
+++ b/coreutils/id.c
@@ -119,8 +119,8 @@ int id_main(int argc UNUSED_PARAM, char **argv)
/* Don't allow -n -r -nr -ug -rug -nug -rnug -uZ -gZ -GZ*/
/* Don't allow more than one username */
opt_complementary = "?1:u--g:g--u:G--u:u--G:g--G:G--g:r?ugG:n?ugG"
- USE_SELINUX(":u--Z:Z--u:g--Z:Z--g:G--Z:Z--G");
- opt = getopt32(argv, "rnugG" USE_SELINUX("Z"));
+ IF_SELINUX(":u--Z:Z--u:g--Z:Z--g:G--Z:Z--G");
+ opt = getopt32(argv, "rnugG" IF_SELINUX("Z"));
username = argv[optind];
if (username) {
diff --git a/coreutils/install.c b/coreutils/install.c
index 2b796e2..24fb402 100644
--- a/coreutils/install.c
+++ b/coreutils/install.c
@@ -101,12 +101,12 @@ int install_main(int argc, char **argv)
#if ENABLE_FEATURE_INSTALL_LONG_OPTIONS
applet_long_options = install_longopts;
#endif
- opt_complementary = "s--d:d--s" USE_SELINUX(":Z--\xff:\xff--Z");
+ opt_complementary = "s--d:d--s" IF_SELINUX(":Z--\xff:\xff--Z");
/* -c exists for backwards compatibility, it's needed */
/* -v is ignored ("print name of each created directory") */
/* -b is ignored ("make a backup of each existing destination file") */
- opts = getopt32(argv, "cvb" "Ddpsg:m:o:" USE_SELINUX("Z:"),
- &gid_str, &mode_str, &uid_str USE_SELINUX(, &scontext));
+ opts = getopt32(argv, "cvb" "Ddpsg:m:o:" IF_SELINUX("Z:"),
+ &gid_str, &mode_str, &uid_str IF_SELINUX(, &scontext));
argc -= optind;
argv += optind;
diff --git a/coreutils/libcoreutils/getopt_mk_fifo_nod.c b/coreutils/libcoreutils/getopt_mk_fifo_nod.c
index ba3222e..2227171 100644
--- a/coreutils/libcoreutils/getopt_mk_fifo_nod.c
+++ b/coreutils/libcoreutils/getopt_mk_fifo_nod.c
@@ -31,7 +31,7 @@ mode_t FAST_FUNC getopt_mk_fifo_nod(char **argv)
security_context_t scontext;
#endif
int opt;
- opt = getopt32(argv, "m:" USE_SELINUX("Z:"), &smode USE_SELINUX(,&scontext));
+ opt = getopt32(argv, "m:" IF_SELINUX("Z:"), &smode IF_SELINUX(,&scontext));
if (opt & 1) {
if (bb_parse_mode(smode, &mode))
umask(0);
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 61baa9a..379b0f9 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -46,12 +46,12 @@
*/
# undef CONFIG_FEATURE_LS_TIMESTAMPS
# undef ENABLE_FEATURE_LS_TIMESTAMPS
-# undef USE_FEATURE_LS_TIMESTAMPS
-# undef SKIP_FEATURE_LS_TIMESTAMPS
+# undef IF_FEATURE_LS_TIMESTAMPS
+# undef IF_NOT_FEATURE_LS_TIMESTAMPS
# define CONFIG_FEATURE_LS_TIMESTAMPS 1
# define ENABLE_FEATURE_LS_TIMESTAMPS 1
-# define USE_FEATURE_LS_TIMESTAMPS(...) __VA_ARGS__
-# define SKIP_FEATURE_LS_TIMESTAMPS(...)
+# define IF_FEATURE_LS_TIMESTAMPS(...) __VA_ARGS__
+# define IF_NOT_FEATURE_LS_TIMESTAMPS(...)
#endif
@@ -138,15 +138,15 @@ SPLIT_SUBDIR = 2,
/* "[-]e", I think we made this one up */
static const char ls_options[] ALIGN1 =
"Cadil1gnsxQAk" /* 13 opts, total 13 */
- USE_FEATURE_LS_TIMESTAMPS("cetu") /* 4, 17 */
- USE_FEATURE_LS_SORTFILES("SXrv") /* 4, 21 */
- USE_FEATURE_LS_FILETYPES("Fp") /* 2, 23 */
- USE_FEATURE_LS_FOLLOWLINKS("L") /* 1, 24 */
- USE_FEATURE_LS_RECURSIVE("R") /* 1, 25 */
- USE_FEATURE_HUMAN_READABLE("h") /* 1, 26 */
- USE_SELINUX("K") /* 1, 27 */
- USE_SELINUX("Z") /* 1, 28 */
- USE_FEATURE_AUTOWIDTH("T:w:") /* 2, 30 */
+ IF_FEATURE_LS_TIMESTAMPS("cetu") /* 4, 17 */
+ IF_FEATURE_LS_SORTFILES("SXrv") /* 4, 21 */
+ IF_FEATURE_LS_FILETYPES("Fp") /* 2, 23 */
+ IF_FEATURE_LS_FOLLOWLINKS("L") /* 1, 24 */
+ IF_FEATURE_LS_RECURSIVE("R") /* 1, 25 */
+ IF_FEATURE_HUMAN_READABLE("h") /* 1, 26 */
+ IF_SELINUX("K") /* 1, 27 */
+ IF_SELINUX("Z") /* 1, 28 */
+ IF_FEATURE_AUTOWIDTH("T:w:") /* 2, 30 */
;
enum {
//OPT_C = (1 << 0),
@@ -232,7 +232,7 @@ struct dnode { /* the basic node */
const char *fullname; /* the dir entry name */
int allocated;
struct stat dstat; /* the file stat info */
- USE_SELINUX(security_context_t sid;)
+ IF_SELINUX(security_context_t sid;)
struct dnode *next; /* point at the next node */
};
@@ -277,9 +277,9 @@ enum {
/* memset: we have to zero it out because of NOEXEC */
#define INIT_G() do { \
memset(&G, 0, sizeof(G)); \
- USE_FEATURE_AUTOWIDTH(tabstops = COLUMN_GAP;) \
- USE_FEATURE_AUTOWIDTH(terminal_width = TERMINAL_WIDTH;) \
- USE_FEATURE_LS_TIMESTAMPS(time(&current_time_t);) \
+ IF_FEATURE_AUTOWIDTH(tabstops = COLUMN_GAP;) \
+ IF_FEATURE_AUTOWIDTH(terminal_width = TERMINAL_WIDTH;) \
+ IF_FEATURE_LS_TIMESTAMPS(time(&current_time_t);) \
} while (0)
@@ -302,7 +302,7 @@ static struct dnode *my_stat(const char *fullname, const char *name, int force_f
{
struct stat dstat;
struct dnode *cur;
- USE_SELINUX(security_context_t sid = NULL;)
+ IF_SELINUX(security_context_t sid = NULL;)
if ((all_fmt & FOLLOW_LINKS) || force_follow) {
#if ENABLE_SELINUX
@@ -332,7 +332,7 @@ static struct dnode *my_stat(const char *fullname, const char *name, int force_f
cur->fullname = fullname;
cur->name = name;
cur->dstat = dstat;
- USE_SELINUX(cur->sid = sid;)
+ IF_SELINUX(cur->sid = sid;)
return cur;
}
@@ -570,7 +570,7 @@ static void showfiles(struct dnode **dn, int nfiles)
column_width = len;
}
column_width += tabstops +
- USE_SELINUX( ((all_fmt & LIST_CONTEXT) ? 33 : 0) + )
+ IF_SELINUX( ((all_fmt & LIST_CONTEXT) ? 33 : 0) + )
((all_fmt & LIST_INO) ? 8 : 0) +
((all_fmt & LIST_BLOCKS) ? 5 : 0);
ncols = (int) (terminal_width / column_width);
@@ -912,7 +912,7 @@ int ls_main(int argc UNUSED_PARAM, char **argv)
int dndirs;
int i;
/* need to initialize since --color has _an optional_ argument */
- USE_FEATURE_LS_COLOR(const char *color_opt = "always";)
+ IF_FEATURE_LS_COLOR(const char *color_opt = "always";)
INIT_G();
@@ -927,13 +927,13 @@ int ls_main(int argc UNUSED_PARAM, char **argv)
#endif
/* process options */
- USE_FEATURE_LS_COLOR(applet_long_options = ls_color_opt;)
+ IF_FEATURE_LS_COLOR(applet_long_options = ls_color_opt;)
#if ENABLE_FEATURE_AUTOWIDTH
opt_complementary = "T+:w+"; /* -T N, -w N */
opt = getopt32(argv, ls_options, &tabstops, &terminal_width
- USE_FEATURE_LS_COLOR(, &color_opt));
+ IF_FEATURE_LS_COLOR(, &color_opt));
#else
- opt = getopt32(argv, ls_options USE_FEATURE_LS_COLOR(, &color_opt));
+ opt = getopt32(argv, ls_options IF_FEATURE_LS_COLOR(, &color_opt));
#endif
for (i = 0; opt_flags[i] != (1U<<31); i++) {
if (opt & (1 << i)) {
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c
index 72bd105..a110165 100644
--- a/coreutils/mkdir.c
+++ b/coreutils/mkdir.c
@@ -48,7 +48,7 @@ int mkdir_main(int argc, char **argv)
#if ENABLE_FEATURE_MKDIR_LONG_OPTIONS
applet_long_options = mkdir_longopts;
#endif
- opt = getopt32(argv, "m:p" USE_SELINUX("Z:"), &smode USE_SELINUX(,&scontext));
+ opt = getopt32(argv, "m:p" IF_SELINUX("Z:"), &smode IF_SELINUX(,&scontext));
if (opt & 1) {
mode = 0777;
if (!bb_parse_mode(smode, &mode)) {
diff --git a/coreutils/readlink.c b/coreutils/readlink.c
index 721fd85..8d44562 100644
--- a/coreutils/readlink.c
+++ b/coreutils/readlink.c
@@ -16,14 +16,14 @@ int readlink_main(int argc UNUSED_PARAM, char **argv)
char *fname;
char pathbuf[PATH_MAX];
- USE_FEATURE_READLINK_FOLLOW(
+ IF_FEATURE_READLINK_FOLLOW(
unsigned opt;
/* We need exactly one non-option argument. */
opt_complementary = "=1";
opt = getopt32(argv, "f");
fname = argv[optind];
)
- SKIP_FEATURE_READLINK_FOLLOW(
+ IF_NOT_FEATURE_READLINK_FOLLOW(
const unsigned opt = 0;
if (argc != 2) bb_show_usage();
fname = argv[1];
diff --git a/coreutils/stat.c b/coreutils/stat.c
index 32e8b42..44a03e5 100644
--- a/coreutils/stat.c
+++ b/coreutils/stat.c
@@ -156,7 +156,7 @@ static void printfs(char *pformat, const char *msg)
/* print statfs info */
static void print_statfs(char *pformat, const char m,
const char *const filename, const void *data
- USE_SELINUX(, security_context_t scontext))
+ IF_SELINUX(, security_context_t scontext))
{
const struct statfs *statfsbuf = data;
if (m == 'n') {
@@ -203,7 +203,7 @@ static void print_statfs(char *pformat, const char m,
/* print stat info */
static void print_stat(char *pformat, const char m,
const char *const filename, const void *data
- USE_SELINUX(, security_context_t scontext))
+ IF_SELINUX(, security_context_t scontext))
{
#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
struct stat *statbuf = (struct stat *) data;
@@ -306,9 +306,9 @@ static void print_stat(char *pformat, const char m,
}
static void print_it(const char *masterformat, const char *filename,
- void (*print_func) (char*, char, const char*, const void* USE_SELINUX(, security_context_t scontext)),
+ void (*print_func) (char*, char, const char*, const void* IF_SELINUX(, security_context_t scontext)),
const void *data
- USE_SELINUX(, security_context_t scontext) )
+ IF_SELINUX(, security_context_t scontext) )
{
/* Create a working copy of the format string */
char *format = xstrdup(masterformat);
@@ -347,7 +347,7 @@ static void print_it(const char *masterformat, const char *filename,
break;
default:
/* Completes "%<modifiers>" with specifier and printfs */
- print_func(dest, *p, filename, data USE_SELINUX(,scontext));
+ print_func(dest, *p, filename, data IF_SELINUX(,scontext));
break;
}
}
@@ -416,7 +416,7 @@ static bool do_statfs(const char *filename, const char *format)
);
#endif /* SELINUX */
}
- print_it(format, filename, print_statfs, &statfsbuf USE_SELINUX(, scontext));
+ print_it(format, filename, print_statfs, &statfsbuf IF_SELINUX(, scontext));
#else /* FEATURE_STAT_FORMAT */
format = (option_mask32 & OPT_TERSE
? "%s %llx %lu "
@@ -560,11 +560,11 @@ static bool do_stat(const char *filename, const char *format)
}
#endif
}
- print_it(format, filename, print_stat, &statbuf USE_SELINUX(, scontext));
+ print_it(format, filename, print_stat, &statbuf IF_SELINUX(, scontext));
#else /* FEATURE_STAT_FORMAT */
if (option_mask32 & OPT_TERSE) {
printf("%s %ju %ju %lx %lu %lu %jx %ju %lu %lx %lx %lu %lu %lu %lu"
- SKIP_SELINUX("\n"),
+ IF_NOT_SELINUX("\n"),
filename,
(uintmax_t) (statbuf.st_size),
(uintmax_t) statbuf.st_blocks,
@@ -642,14 +642,14 @@ static bool do_stat(const char *filename, const char *format)
int stat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int stat_main(int argc, char **argv)
{
- USE_FEATURE_STAT_FORMAT(char *format = NULL;)
+ IF_FEATURE_STAT_FORMAT(char *format = NULL;)
int i;
int ok = 1;
statfunc_ptr statfunc = do_stat;
getopt32(argv, "ftL"
- USE_SELINUX("Z")
- USE_FEATURE_STAT_FORMAT("c:", &format)
+ IF_SELINUX("Z")
+ IF_FEATURE_STAT_FORMAT("c:", &format)
);
if (option_mask32 & OPT_FILESYS) /* -f */
@@ -663,7 +663,7 @@ int stat_main(int argc, char **argv)
}
#endif /* ENABLE_SELINUX */
for (i = optind; i < argc; ++i)
- ok &= statfunc(argv[i] USE_FEATURE_STAT_FORMAT(, format));
+ ok &= statfunc(argv[i] IF_FEATURE_STAT_FORMAT(, format));
return (ok ? EXIT_SUCCESS : EXIT_FAILURE);
}
diff --git a/coreutils/tail.c b/coreutils/tail.c
index 5dae2d3..3ce6be0 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -110,9 +110,9 @@ int tail_main(int argc, char **argv)
}
#endif
- USE_FEATURE_FANCY_TAIL(opt_complementary = "s+";) /* -s N */
- opt = getopt32(argv, "fc:n:" USE_FEATURE_FANCY_TAIL("qs:v"),
- &str_c, &str_n USE_FEATURE_FANCY_TAIL(,&sleep_period));
+ IF_FEATURE_FANCY_TAIL(opt_complementary = "s+";) /* -s N */
+ opt = getopt32(argv, "fc:n:" IF_FEATURE_FANCY_TAIL("qs:v"),
+ &str_c, &str_n IF_FEATURE_FANCY_TAIL(,&sleep_period));
#define FOLLOW (opt & 0x1)
#define COUNT_BYTES (opt & 0x2)
//if (opt & 0x1) // -f
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 2019154..1d55417 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -63,9 +63,9 @@ int touch_main(int argc UNUSED_PARAM, char **argv)
applet_long_options = longopts;
#endif
#endif
- opts = getopt32(argv, "c" USE_DESKTOP("r:")
+ opts = getopt32(argv, "c" IF_DESKTOP("r:")
/*ignored:*/ "fma"
- USE_DESKTOP(, &reference_file));
+ IF_DESKTOP(, &reference_file));
opts &= 1; /* only -c bit is left */
argv += optind;
diff --git a/coreutils/tty.c b/coreutils/tty.c
index d49fb50..74a4ea3 100644
--- a/coreutils/tty.c
+++ b/coreutils/tty.c
@@ -13,17 +13,17 @@
#include "libbb.h"
int tty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int tty_main(int argc, char **argv SKIP_INCLUDE_SUSv2(UNUSED_PARAM))
+int tty_main(int argc, char **argv IF_NOT_INCLUDE_SUSv2(UNUSED_PARAM))
{
const char *s;
- USE_INCLUDE_SUSv2(int silent;) /* Note: No longer relevant in SUSv3. */
+ IF_INCLUDE_SUSv2(int silent;) /* Note: No longer relevant in SUSv3. */
int retval;
xfunc_error_retval = 2; /* SUSv3 requires > 1 for error. */
- USE_INCLUDE_SUSv2(silent = getopt32(argv, "s");)
- USE_INCLUDE_SUSv2(argc -= optind;)
- SKIP_INCLUDE_SUSv2(argc -= 1;)
+ IF_INCLUDE_SUSv2(silent = getopt32(argv, "s");)
+ IF_INCLUDE_SUSv2(argc -= optind;)
+ IF_NOT_INCLUDE_SUSv2(argc -= 1;)
/* gnu tty outputs a warning that it is ignoring all args. */
bb_warn_ignoring_args(argc);
@@ -37,8 +37,8 @@ int tty_main(int argc, char **argv SKIP_INCLUDE_SUSv2(UNUSED_PARAM))
s = "not a tty";
retval = 1;
}
- USE_INCLUDE_SUSv2(if (!silent) puts(s);)
- SKIP_INCLUDE_SUSv2(puts(s);)
+ IF_INCLUDE_SUSv2(if (!silent) puts(s);)
+ IF_NOT_INCLUDE_SUSv2(puts(s);)
fflush_stdout_and_exit(retval);
}
diff --git a/coreutils/uname.c b/coreutils/uname.c
index 33d026f..5a790fb 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -97,7 +97,7 @@ int uname_main(int argc UNUSED_PARAM, char **argv)
const unsigned short *delta;
unsigned toprint;
- USE_GETOPT_LONG(applet_long_options = longopts);
+ IF_GETOPT_LONG(applet_long_options = longopts);
toprint = getopt32(argv, options);
if (argv[optind]) { /* coreutils-6.9 compat */
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c
index 7c38fa1..77fdccc 100644
--- a/debianutils/run_parts.c
+++ b/debianutils/run_parts.c
@@ -124,7 +124,7 @@ int run_parts_main(int argc UNUSED_PARAM, char **argv)
/* We require exactly one argument: the directory name */
/* We require exactly one argument: the directory name */
opt_complementary = "=1:a::";
- getopt32(argv, "ra:u:t"USE_FEATURE_RUN_PARTS_FANCY("l"), &arg_list, &umask_p);
+ getopt32(argv, "ra:u:t"IF_FEATURE_RUN_PARTS_FANCY("l"), &arg_list, &umask_p);
umask(xstrtou_range(umask_p, 8, 0, 07777));
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c
index ab607bd..6726fc7 100644
--- a/debianutils/start_stop_daemon.c
+++ b/debianutils/start_stop_daemon.c
@@ -347,13 +347,13 @@ int start_stop_daemon_main(int argc UNUSED_PARAM, char **argv)
/* -xa (at least one) is required if -S is given */
/* -q turns off -v */
opt_complementary = "K:S:K--S:S--K:m?p:K?xpun:S?xa"
- USE_FEATURE_START_STOP_DAEMON_FANCY("q-v");
+ IF_FEATURE_START_STOP_DAEMON_FANCY("q-v");
opt = getopt32(argv, "KSbqtma:n:s:u:c:x:p:"
- USE_FEATURE_START_STOP_DAEMON_FANCY("ovN:R:"),
+ IF_FEATURE_START_STOP_DAEMON_FANCY("ovN:R:"),
&startas, &cmdname, &signame, &userspec, &chuid, &execname, &pidfile
- USE_FEATURE_START_STOP_DAEMON_FANCY(,&opt_N)
+ IF_FEATURE_START_STOP_DAEMON_FANCY(,&opt_N)
/* We accept and ignore -R <param> / --retry <param> */
- USE_FEATURE_START_STOP_DAEMON_FANCY(,NULL)
+ IF_FEATURE_START_STOP_DAEMON_FANCY(,NULL)
);
if (opt & OPT_s) {
@@ -366,7 +366,7 @@ int start_stop_daemon_main(int argc UNUSED_PARAM, char **argv)
if (!execname) /* in case -a is given and -x is not */
execname = startas;
-// USE_FEATURE_START_STOP_DAEMON_FANCY(
+// IF_FEATURE_START_STOP_DAEMON_FANCY(
// if (retry_arg)
// retries = xatoi_u(retry_arg);
// )
diff --git a/debianutils/which.c b/debianutils/which.c
index 748e6dc..1558e5c 100644
--- a/debianutils/which.c
+++ b/debianutils/which.c
@@ -15,13 +15,13 @@
int which_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int which_main(int argc UNUSED_PARAM, char **argv)
{
- USE_DESKTOP(int opt;)
+ IF_DESKTOP(int opt;)
int status = EXIT_SUCCESS;
char *path;
char *p;
opt_complementary = "-1"; /* at least one argument */
- USE_DESKTOP(opt =) getopt32(argv, "a");
+ IF_DESKTOP(opt =) getopt32(argv, "a");
argv += optind;
/* This matches what is seen on e.g. ubuntu.
diff --git a/docs/autodocifier.pl b/docs/autodocifier.pl
index 576e312..e3ba5c9 100755
--- a/docs/autodocifier.pl
+++ b/docs/autodocifier.pl
@@ -24,8 +24,8 @@ sub beautify {
my $text = shift;
for (;;) {
my $text2 = $text;
- $text =~ s/SKIP_\w+\(.*?"\s*\)//sxg;
- $text =~ s/USE_\w+\(\s*?(.*?)"\s*\)/$1"/sxg;
+ $text =~ s/IF_NOT_\w+\(.*?"\s*\)//sxg;
+ $text =~ s/IF_\w+\(\s*?(.*?)"\s*\)/$1"/sxg;
$text =~ s/USAGE_\w+\(\s*?(.*?)"\s*\)/$1"/sxg;
last if ( $text2 eq $text );
}
diff --git a/docs/new-applet-HOWTO.txt b/docs/new-applet-HOWTO.txt
index 6f89cbe..89df7d8 100644
--- a/docs/new-applet-HOWTO.txt
+++ b/docs/new-applet-HOWTO.txt
@@ -162,7 +162,7 @@ algorithm in busybox.c and the Gods of BusyBox smite you. Yea, verily:
Be sure to read the top of applets.h before adding your applet.
/* all programs above here are alphabetically "less than" 'mu' */
- USE_MU(APPLET(mu, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+ IF_MU(APPLET(mu, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
/* all programs below here are alphabetically "greater than" 'mu' */
diff --git a/editors/cmp.c b/editors/cmp.c
index 2e98e6e..a20bb88 100644
--- a/editors/cmp.c
+++ b/editors/cmp.c
@@ -37,7 +37,7 @@ int cmp_main(int argc UNUSED_PARAM, char **argv)
{
FILE *fp1, *fp2, *outfile = stdout;
const char *filename1, *filename2 = "-";
- USE_DESKTOP(off_t skip1 = 0, skip2 = 0;)
+ IF_DESKTOP(off_t skip1 = 0, skip2 = 0;)
off_t char_pos = 0;
int line_pos = 1; /* Hopefully won't overflow... */
const char *fmt;
@@ -48,8 +48,8 @@ int cmp_main(int argc UNUSED_PARAM, char **argv)
xfunc_error_retval = 2; /* 1 is returned if files are different. */
opt_complementary = "-1"
- USE_DESKTOP(":?4")
- SKIP_DESKTOP(":?2")
+ IF_DESKTOP(":?4")
+ IF_NOT_DESKTOP(":?2")
":l--s:s--l";
opt = getopt32(argv, opt_chars);
argv += optind;
diff --git a/editors/diff.c b/editors/diff.c
index 7fce70d..00ecdd8 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -103,8 +103,8 @@ struct globals {
smallint exit_status;
int opt_U_context;
size_t max_context; /* size of context_vec_start */
- USE_FEATURE_DIFF_DIR(int dl_count;)
- USE_FEATURE_DIFF_DIR(char **dl;)
+ IF_FEATURE_DIFF_DIR(int dl_count;)
+ IF_FEATURE_DIFF_DIR(char **dl;)
char *opt_S_start;
const char *label1;
const char *label2;
diff --git a/editors/vi.c b/editors/vi.c
index 0497bc2..ccc53fb 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -271,7 +271,7 @@ struct globals {
SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
last_file_modified = -1; \
/* "" but has space for 2 chars: */ \
- USE_FEATURE_VI_SEARCH(last_search_pattern = xzalloc(2);) \
+ IF_FEATURE_VI_SEARCH(last_search_pattern = xzalloc(2);) \
} while (0)
@@ -426,7 +426,7 @@ int vi_main(int argc, char **argv)
initial_cmds[0] = xstrndup(p, MAX_INPUT_LEN);
}
#endif
- while ((c = getopt(argc, argv, "hCRH" USE_FEATURE_VI_COLON("c:"))) != -1) {
+ while ((c = getopt(argc, argv, "hCRH" IF_FEATURE_VI_COLON("c:"))) != -1) {
switch (c) {
#if ENABLE_FEATURE_VI_CRASHME
case 'C':
@@ -643,8 +643,8 @@ static char *get_one_address(char *p, int *addr) // get colon addr, if present
{
int st;
char *q;
- USE_FEATURE_VI_YANKMARK(char c;)
- USE_FEATURE_VI_SEARCH(char *pat;)
+ IF_FEATURE_VI_YANKMARK(char c;)
+ IF_FEATURE_VI_SEARCH(char *pat;)
*addr = -1; // assume no addr
if (*p == '.') { // the current line
@@ -883,10 +883,10 @@ static void colon(char *buf)
// how many lines in text[]?
li = count_lines(text, end - 1);
status_line("\"%s\"%s"
- USE_FEATURE_VI_READONLY("%s")
+ IF_FEATURE_VI_READONLY("%s")
" %dL, %dC", current_filename,
(file_size(fn) < 0 ? " [New file]" : ""),
- USE_FEATURE_VI_READONLY(
+ IF_FEATURE_VI_READONLY(
((readonly_mode) ? " [Readonly]" : ""),
)
li, ch);
@@ -992,9 +992,9 @@ static void colon(char *buf)
// how many lines in text[]?
li = count_lines(q, q + ch - 1);
status_line("\"%s\""
- USE_FEATURE_VI_READONLY("%s")
+ IF_FEATURE_VI_READONLY("%s")
" %dL, %dC", fn,
- USE_FEATURE_VI_READONLY((readonly_mode ? " [Readonly]" : ""),)
+ IF_FEATURE_VI_READONLY((readonly_mode ? " [Readonly]" : ""),)
li, ch);
if (ch > 0) {
// if the insert is before "dot" then we need to update
diff --git a/findutils/find.c b/findutils/find.c
index df632f2..da024af 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -62,8 +62,8 @@
/* This is a NOEXEC applet. Be very careful! */
-USE_FEATURE_FIND_XDEV(static dev_t *xdev_dev;)
-USE_FEATURE_FIND_XDEV(static int xdev_count;)
+IF_FEATURE_FIND_XDEV(static dev_t *xdev_dev;)
+IF_FEATURE_FIND_XDEV(static int xdev_count;)
typedef int (*action_fp)(const char *fileName, struct stat *statbuf, void *);
@@ -79,23 +79,23 @@ typedef struct {
action_##name* ap UNUSED_PARAM)
ACTS(print)
ACTS(name, const char *pattern; bool iname;)
-USE_FEATURE_FIND_PATH( ACTS(path, const char *pattern;))
-USE_FEATURE_FIND_REGEX( ACTS(regex, regex_t compiled_pattern;))
-USE_FEATURE_FIND_PRINT0( ACTS(print0))
-USE_FEATURE_FIND_TYPE( ACTS(type, int type_mask;))
-USE_FEATURE_FIND_PERM( ACTS(perm, char perm_char; mode_t perm_mask;))
-USE_FEATURE_FIND_MTIME( ACTS(mtime, char mtime_char; unsigned mtime_days;))
-USE_FEATURE_FIND_MMIN( ACTS(mmin, char mmin_char; unsigned mmin_mins;))
-USE_FEATURE_FIND_NEWER( ACTS(newer, time_t newer_mtime;))
-USE_FEATURE_FIND_INUM( ACTS(inum, ino_t inode_num;))
-USE_FEATURE_FIND_USER( ACTS(user, uid_t uid;))
-USE_FEATURE_FIND_SIZE( ACTS(size, char size_char; off_t size;))
-USE_FEATURE_FIND_CONTEXT(ACTS(context, security_context_t context;))
-USE_FEATURE_FIND_PAREN( ACTS(paren, action ***subexpr;))
-USE_FEATURE_FIND_PRUNE( ACTS(prune))
-USE_FEATURE_FIND_DELETE( ACTS(delete))
-USE_FEATURE_FIND_EXEC( ACTS(exec, char **exec_argv; unsigned *subst_count; int exec_argc;))
-USE_FEATURE_FIND_GROUP( ACTS(group, gid_t gid;))
+IF_FEATURE_FIND_PATH( ACTS(path, const char *pattern;))
+IF_FEATURE_FIND_REGEX( ACTS(regex, regex_t compiled_pattern;))
+IF_FEATURE_FIND_PRINT0( ACTS(print0))
+IF_FEATURE_FIND_TYPE( ACTS(type, int type_mask;))
+IF_FEATURE_FIND_PERM( ACTS(perm, char perm_char; mode_t perm_mask;))
+IF_FEATURE_FIND_MTIME( ACTS(mtime, char mtime_char; unsigned mtime_days;))
+IF_FEATURE_FIND_MMIN( ACTS(mmin, char mmin_char; unsigned mmin_mins;))
+IF_FEATURE_FIND_NEWER( ACTS(newer, time_t newer_mtime;))
+IF_FEATURE_FIND_INUM( ACTS(inum, ino_t inode_num;))
+IF_FEATURE_FIND_USER( ACTS(user, uid_t uid;))
+IF_FEATURE_FIND_SIZE( ACTS(size, char size_char; off_t size;))
+IF_FEATURE_FIND_CONTEXT(ACTS(context, security_context_t context;))
+IF_FEATURE_FIND_PAREN( ACTS(paren, action ***subexpr;))
+IF_FEATURE_FIND_PRUNE( ACTS(prune))
+IF_FEATURE_FIND_DELETE( ACTS(delete))
+IF_FEATURE_FIND_EXEC( ACTS(exec, char **exec_argv; unsigned *subst_count; int exec_argc;))
+IF_FEATURE_FIND_GROUP( ACTS(group, gid_t gid;))
static action ***actions;
static bool need_print = 1;
@@ -376,8 +376,8 @@ ACTF(context)
static int FAST_FUNC fileAction(const char *fileName,
struct stat *statbuf,
- void *userData SKIP_FEATURE_FIND_MAXDEPTH(UNUSED_PARAM),
- int depth SKIP_FEATURE_FIND_MAXDEPTH(UNUSED_PARAM))
+ void *userData IF_NOT_FEATURE_FIND_MAXDEPTH(UNUSED_PARAM),
+ int depth IF_NOT_FEATURE_FIND_MAXDEPTH(UNUSED_PARAM))
{
int i;
#if ENABLE_FEATURE_FIND_MAXDEPTH
@@ -451,73 +451,73 @@ static action*** parse_params(char **argv)
enum {
PARM_a ,
PARM_o ,
- USE_FEATURE_FIND_NOT( PARM_char_not ,)
+ IF_FEATURE_FIND_NOT( PARM_char_not ,)
#if ENABLE_DESKTOP
PARM_and ,
PARM_or ,
- USE_FEATURE_FIND_NOT( PARM_not ,)
+ IF_FEATURE_FIND_NOT( PARM_not ,)
#endif
PARM_print ,
- USE_FEATURE_FIND_PRINT0( PARM_print0 ,)
- USE_FEATURE_FIND_DEPTH( PARM_depth ,)
- USE_FEATURE_FIND_PRUNE( PARM_prune ,)
- USE_FEATURE_FIND_DELETE( PARM_delete ,)
- USE_FEATURE_FIND_EXEC( PARM_exec ,)
- USE_FEATURE_FIND_PAREN( PARM_char_brace,)
+ IF_FEATURE_FIND_PRINT0( PARM_print0 ,)
+ IF_FEATURE_FIND_DEPTH( PARM_depth ,)
+ IF_FEATURE_FIND_PRUNE( PARM_prune ,)
+ IF_FEATURE_FIND_DELETE( PARM_delete ,)
+ IF_FEATURE_FIND_EXEC( PARM_exec ,)
+ IF_FEATURE_FIND_PAREN( PARM_char_brace,)
/* All options starting from here require argument */
PARM_name ,
PARM_iname ,
- USE_FEATURE_FIND_PATH( PARM_path ,)
- USE_FEATURE_FIND_REGEX( PARM_regex ,)
- USE_FEATURE_FIND_TYPE( PARM_type ,)
- USE_FEATURE_FIND_PERM( PARM_perm ,)
- USE_FEATURE_FIND_MTIME( PARM_mtime ,)
- USE_FEATURE_FIND_MMIN( PARM_mmin ,)
- USE_FEATURE_FIND_NEWER( PARM_newer ,)
- USE_FEATURE_FIND_INUM( PARM_inum ,)
- USE_FEATURE_FIND_USER( PARM_user ,)
- USE_FEATURE_FIND_GROUP( PARM_group ,)
- USE_FEATURE_FIND_SIZE( PARM_size ,)
- USE_FEATURE_FIND_CONTEXT(PARM_context ,)
+ IF_FEATURE_FIND_PATH( PARM_path ,)
+ IF_FEATURE_FIND_REGEX( PARM_regex ,)
+ IF_FEATURE_FIND_TYPE( PARM_type ,)
+ IF_FEATURE_FIND_PERM( PARM_perm ,)
+ IF_FEATURE_FIND_MTIME( PARM_mtime ,)
+ IF_FEATURE_FIND_MMIN( PARM_mmin ,)
+ IF_FEATURE_FIND_NEWER( PARM_newer ,)
+ IF_FEATURE_FIND_INUM( PARM_inum ,)
+ IF_FEATURE_FIND_USER( PARM_user ,)
+ IF_FEATURE_FIND_GROUP( PARM_group ,)
+ IF_FEATURE_FIND_SIZE( PARM_size ,)
+ IF_FEATURE_FIND_CONTEXT(PARM_context ,)
};
static const char params[] ALIGN1 =
"-a\0"
"-o\0"
- USE_FEATURE_FIND_NOT( "!\0" )
+ IF_FEATURE_FIND_NOT( "!\0" )
#if ENABLE_DESKTOP
"-and\0"
"-or\0"
- USE_FEATURE_FIND_NOT( "-not\0" )
+ IF_FEATURE_FIND_NOT( "-not\0" )
#endif
"-print\0"
- USE_FEATURE_FIND_PRINT0( "-print0\0" )
- USE_FEATURE_FIND_DEPTH( "-depth\0" )
- USE_FEATURE_FIND_PRUNE( "-prune\0" )
- USE_FEATURE_FIND_DELETE( "-delete\0" )
- USE_FEATURE_FIND_EXEC( "-exec\0" )
- USE_FEATURE_FIND_PAREN( "(\0" )
+ IF_FEATURE_FIND_PRINT0( "-print0\0" )
+ IF_FEATURE_FIND_DEPTH( "-depth\0" )
+ IF_FEATURE_FIND_PRUNE( "-prune\0" )
+ IF_FEATURE_FIND_DELETE( "-delete\0" )
+ IF_FEATURE_FIND_EXEC( "-exec\0" )
+ IF_FEATURE_FIND_PAREN( "(\0" )
/* All options starting from here require argument */
"-name\0"
"-iname\0"
- USE_FEATURE_FIND_PATH( "-path\0" )
- USE_FEATURE_FIND_REGEX( "-regex\0" )
- USE_FEATURE_FIND_TYPE( "-type\0" )
- USE_FEATURE_FIND_PERM( "-perm\0" )
- USE_FEATURE_FIND_MTIME( "-mtime\0" )
- USE_FEATURE_FIND_MMIN( "-mmin\0" )
- USE_FEATURE_FIND_NEWER( "-newer\0" )
- USE_FEATURE_FIND_INUM( "-inum\0" )
- USE_FEATURE_FIND_USER( "-user\0" )
- USE_FEATURE_FIND_GROUP( "-group\0" )
- USE_FEATURE_FIND_SIZE( "-size\0" )
- USE_FEATURE_FIND_CONTEXT("-context\0")
+ IF_FEATURE_FIND_PATH( "-path\0" )
+ IF_FEATURE_FIND_REGEX( "-regex\0" )
+ IF_FEATURE_FIND_TYPE( "-type\0" )
+ IF_FEATURE_FIND_PERM( "-perm\0" )
+ IF_FEATURE_FIND_MTIME( "-mtime\0" )
+ IF_FEATURE_FIND_MMIN( "-mmin\0" )
+ IF_FEATURE_FIND_NEWER( "-newer\0" )
+ IF_FEATURE_FIND_INUM( "-inum\0" )
+ IF_FEATURE_FIND_USER( "-user\0" )
+ IF_FEATURE_FIND_GROUP( "-group\0" )
+ IF_FEATURE_FIND_SIZE( "-size\0" )
+ IF_FEATURE_FIND_CONTEXT("-context\0")
;
action*** appp;
unsigned cur_group = 0;
unsigned cur_action = 0;
- USE_FEATURE_FIND_NOT( bool invert_flag = 0; )
+ IF_FEATURE_FIND_NOT( bool invert_flag = 0; )
/* This is the only place in busybox where we use nested function.
* So far more standard alternatives were bigger. */
@@ -530,8 +530,8 @@ static action*** parse_params(char **argv)
appp[cur_group][cur_action++] = ap = xmalloc(sizeof_struct);
appp[cur_group][cur_action] = NULL;
ap->f = f;
- USE_FEATURE_FIND_NOT( ap->invert = invert_flag; )
- USE_FEATURE_FIND_NOT( invert_flag = 0; )
+ IF_FEATURE_FIND_NOT( ap->invert = invert_flag; )
+ IF_FEATURE_FIND_NOT( invert_flag = 0; )
return ap;
}
@@ -569,10 +569,10 @@ static action*** parse_params(char **argv)
* it doesn't give smaller code. Other arches? */
/* --- Operators --- */
- if (parm == PARM_a USE_DESKTOP(|| parm == PARM_and)) {
+ if (parm == PARM_a IF_DESKTOP(|| parm == PARM_and)) {
/* no further special handling required */
}
- else if (parm == PARM_o USE_DESKTOP(|| parm == PARM_or)) {
+ else if (parm == PARM_o IF_DESKTOP(|| parm == PARM_or)) {
/* start new OR group */
cur_group++;
appp = xrealloc(appp, (cur_group+2) * sizeof(*appp));
@@ -581,7 +581,7 @@ static action*** parse_params(char **argv)
cur_action = 0;
}
#if ENABLE_FEATURE_FIND_NOT
- else if (parm == PARM_char_not USE_DESKTOP(|| parm == PARM_not)) {
+ else if (parm == PARM_char_not IF_DESKTOP(|| parm == PARM_not)) {
/* also handles "find ! ! -name 'foo*'" */
invert_flag ^= 1;
}
@@ -591,13 +591,13 @@ static action*** parse_params(char **argv)
else if (parm == PARM_print) {
need_print = 0;
/* GNU find ignores '!' here: "find ! -print" */
- USE_FEATURE_FIND_NOT( invert_flag = 0; )
+ IF_FEATURE_FIND_NOT( invert_flag = 0; )
(void) ALLOC_ACTION(print);
}
#if ENABLE_FEATURE_FIND_PRINT0
else if (parm == PARM_print0) {
need_print = 0;
- USE_FEATURE_FIND_NOT( invert_flag = 0; )
+ IF_FEATURE_FIND_NOT( invert_flag = 0; )
(void) ALLOC_ACTION(print0);
}
#endif
@@ -608,7 +608,7 @@ static action*** parse_params(char **argv)
#endif
#if ENABLE_FEATURE_FIND_PRUNE
else if (parm == PARM_prune) {
- USE_FEATURE_FIND_NOT( invert_flag = 0; )
+ IF_FEATURE_FIND_NOT( invert_flag = 0; )
(void) ALLOC_ACTION(prune);
}
#endif
@@ -624,7 +624,7 @@ static action*** parse_params(char **argv)
int i;
action_exec *ap;
need_print = 0;
- USE_FEATURE_FIND_NOT( invert_flag = 0; )
+ IF_FEATURE_FIND_NOT( invert_flag = 0; )
ap = ALLOC_ACTION(exec);
ap->exec_argv = ++argv; /* first arg after -exec */
ap->exec_argc = 0;
@@ -813,13 +813,13 @@ int find_main(int argc, char **argv)
{
static const char options[] ALIGN1 =
"-follow\0"
-USE_FEATURE_FIND_XDEV( "-xdev\0" )
-USE_FEATURE_FIND_MAXDEPTH("-mindepth\0""-maxdepth\0")
+IF_FEATURE_FIND_XDEV( "-xdev\0" )
+IF_FEATURE_FIND_MAXDEPTH("-mindepth\0""-maxdepth\0")
;
enum {
OPT_FOLLOW,
-USE_FEATURE_FIND_XDEV( OPT_XDEV ,)
-USE_FEATURE_FIND_MAXDEPTH(OPT_MINDEPTH,)
+IF_FEATURE_FIND_XDEV( OPT_XDEV ,)
+IF_FEATURE_FIND_MAXDEPTH(OPT_MINDEPTH,)
};
char *arg;
diff --git a/findutils/grep.c b/findutils/grep.c
index e23f9bc..774f04d 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -25,10 +25,10 @@
/* options */
#define OPTSTR_GREP \
"lnqvscFiHhe:f:Lorm:" \
- USE_FEATURE_GREP_CONTEXT("A:B:C:") \
- USE_FEATURE_GREP_EGREP_ALIAS("E") \
- USE_DESKTOP("w") \
- USE_EXTRA_COMPAT("z") \
+ IF_FEATURE_GREP_CONTEXT("A:B:C:") \
+ IF_FEATURE_GREP_EGREP_ALIAS("E") \
+ IF_DESKTOP("w") \
+ IF_EXTRA_COMPAT("z") \
"aI"
/* ignored: -a "assume all files to be text" */
@@ -51,12 +51,12 @@ enum {
OPTBIT_o, /* show only matching parts of lines */
OPTBIT_r, /* recurse dirs */
OPTBIT_m, /* -m MAX_MATCHES */
- USE_FEATURE_GREP_CONTEXT( OPTBIT_A ,) /* -A NUM: after-match context */
- USE_FEATURE_GREP_CONTEXT( OPTBIT_B ,) /* -B NUM: before-match context */
- USE_FEATURE_GREP_CONTEXT( OPTBIT_C ,) /* -C NUM: -A and -B combined */
- USE_FEATURE_GREP_EGREP_ALIAS(OPTBIT_E ,) /* extended regexp */
- USE_DESKTOP( OPTBIT_w ,) /* whole word match */
- USE_EXTRA_COMPAT( OPTBIT_z ,) /* input is NUL terminated */
+ IF_FEATURE_GREP_CONTEXT( OPTBIT_A ,) /* -A NUM: after-match context */
+ IF_FEATURE_GREP_CONTEXT( OPTBIT_B ,) /* -B NUM: before-match context */
+ IF_FEATURE_GREP_CONTEXT( OPTBIT_C ,) /* -C NUM: -A and -B combined */
+ IF_FEATURE_GREP_EGREP_ALIAS(OPTBIT_E ,) /* extended regexp */
+ IF_DESKTOP( OPTBIT_w ,) /* whole word match */
+ IF_EXTRA_COMPAT( OPTBIT_z ,) /* input is NUL terminated */
OPT_l = 1 << OPTBIT_l,
OPT_n = 1 << OPTBIT_n,
OPT_q = 1 << OPTBIT_q,
@@ -73,12 +73,12 @@ enum {
OPT_o = 1 << OPTBIT_o,
OPT_r = 1 << OPTBIT_r,
OPT_m = 1 << OPTBIT_m,
- OPT_A = USE_FEATURE_GREP_CONTEXT( (1 << OPTBIT_A)) + 0,
- OPT_B = USE_FEATURE_GREP_CONTEXT( (1 << OPTBIT_B)) + 0,
- OPT_C = USE_FEATURE_GREP_CONTEXT( (1 << OPTBIT_C)) + 0,
- OPT_E = USE_FEATURE_GREP_EGREP_ALIAS((1 << OPTBIT_E)) + 0,
- OPT_w = USE_DESKTOP( (1 << OPTBIT_w)) + 0,
- OPT_z = USE_EXTRA_COMPAT( (1 << OPTBIT_z)) + 0,
+ OPT_A = IF_FEATURE_GREP_CONTEXT( (1 << OPTBIT_A)) + 0,
+ OPT_B = IF_FEATURE_GREP_CONTEXT( (1 << OPTBIT_B)) + 0,
+ OPT_C = IF_FEATURE_GREP_CONTEXT( (1 << OPTBIT_C)) + 0,
+ OPT_E = IF_FEATURE_GREP_EGREP_ALIAS((1 << OPTBIT_E)) + 0,
+ OPT_w = IF_DESKTOP( (1 << OPTBIT_w)) + 0,
+ OPT_z = IF_EXTRA_COMPAT( (1 << OPTBIT_z)) + 0,
};
#define PRINT_FILES_WITH_MATCHES (option_mask32 & OPT_l)
@@ -105,7 +105,7 @@ struct globals {
int lines_before;
int lines_after;
char **before_buf;
- USE_EXTRA_COMPAT(size_t *before_buf_size;)
+ IF_EXTRA_COMPAT(size_t *before_buf_size;)
int last_line_printed;
#endif
/* globals used internally */
@@ -400,7 +400,7 @@ static int grep_file(FILE *file)
/* Add the line to the circular 'before' buffer */
free(before_buf[curpos]);
before_buf[curpos] = line;
- USE_EXTRA_COMPAT(before_buf_size[curpos] = line_len;)
+ IF_EXTRA_COMPAT(before_buf_size[curpos] = line_len;)
curpos = (curpos + 1) % lines_before;
/* avoid free(line) - we took the line */
line = NULL;
@@ -544,7 +544,7 @@ int grep_main(int argc, char **argv)
lines_after = 0;
} else if (lines_before > 0) {
before_buf = xzalloc(lines_before * sizeof(before_buf[0]));
- USE_EXTRA_COMPAT(before_buf_size = xzalloc(lines_before * sizeof(before_buf_size[0]));)
+ IF_EXTRA_COMPAT(before_buf_size = xzalloc(lines_before * sizeof(before_buf_size[0]));)
}
#else
/* with auto sanity checks */
diff --git a/findutils/xargs.c b/findutils/xargs.c
index f22d089..76d1d54 100644
--- a/findutils/xargs.c
+++ b/findutils/xargs.c
@@ -356,9 +356,9 @@ enum {
OPTBIT_UPTO_SIZE,
OPTBIT_EOF_STRING,
OPTBIT_EOF_STRING1,
- USE_FEATURE_XARGS_SUPPORT_CONFIRMATION(OPTBIT_INTERACTIVE,)
- USE_FEATURE_XARGS_SUPPORT_TERMOPT( OPTBIT_TERMINATE ,)
- USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( OPTBIT_ZEROTERM ,)
+ IF_FEATURE_XARGS_SUPPORT_CONFIRMATION(OPTBIT_INTERACTIVE,)
+ IF_FEATURE_XARGS_SUPPORT_TERMOPT( OPTBIT_TERMINATE ,)
+ IF_FEATURE_XARGS_SUPPORT_ZERO_TERM( OPTBIT_ZEROTERM ,)
OPT_VERBOSE = 1 << OPTBIT_VERBOSE ,
OPT_NO_EMPTY = 1 << OPTBIT_NO_EMPTY ,
@@ -366,14 +366,14 @@ enum {
OPT_UPTO_SIZE = 1 << OPTBIT_UPTO_SIZE ,
OPT_EOF_STRING = 1 << OPTBIT_EOF_STRING , /* GNU: -e[<param>] */
OPT_EOF_STRING1 = 1 << OPTBIT_EOF_STRING1, /* SUS: -E<param> */
- OPT_INTERACTIVE = USE_FEATURE_XARGS_SUPPORT_CONFIRMATION((1 << OPTBIT_INTERACTIVE)) + 0,
- OPT_TERMINATE = USE_FEATURE_XARGS_SUPPORT_TERMOPT( (1 << OPTBIT_TERMINATE )) + 0,
- OPT_ZEROTERM = USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( (1 << OPTBIT_ZEROTERM )) + 0,
+ OPT_INTERACTIVE = IF_FEATURE_XARGS_SUPPORT_CONFIRMATION((1 << OPTBIT_INTERACTIVE)) + 0,
+ OPT_TERMINATE = IF_FEATURE_XARGS_SUPPORT_TERMOPT( (1 << OPTBIT_TERMINATE )) + 0,
+ OPT_ZEROTERM = IF_FEATURE_XARGS_SUPPORT_ZERO_TERM( (1 << OPTBIT_ZEROTERM )) + 0,
};
#define OPTION_STR "+trn:s:e::E:" \
- USE_FEATURE_XARGS_SUPPORT_CONFIRMATION("p") \
- USE_FEATURE_XARGS_SUPPORT_TERMOPT( "x") \
- USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( "0")
+ IF_FEATURE_XARGS_SUPPORT_CONFIRMATION("p") \
+ IF_FEATURE_XARGS_SUPPORT_TERMOPT( "x") \
+ IF_FEATURE_XARGS_SUPPORT_ZERO_TERM( "0")
int xargs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int xargs_main(int argc, char **argv)
@@ -405,7 +405,7 @@ int xargs_main(int argc, char **argv)
eof_str = NULL;
if (opt & OPT_ZEROTERM)
- USE_FEATURE_XARGS_SUPPORT_ZERO_TERM(read_args = process0_stdin);
+ IF_FEATURE_XARGS_SUPPORT_ZERO_TERM(read_args = process0_stdin);
argv += optind;
argc -= optind;
diff --git a/include/applets.h b/include/applets.h
index 1d93258..820aaff 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -67,358 +67,358 @@ s - suid type:
#endif
-USE_TEST(APPLET_NOFORK([, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER, test))
-USE_TEST(APPLET_NOFORK([[, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER, test))
-USE_ACPID(APPLET(acpid, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_ADDGROUP(APPLET(addgroup, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_ADDUSER(APPLET(adduser, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_ADJTIMEX(APPLET(adjtimex, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_AR(APPLET(ar, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_ARP(APPLET(arp, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_ARPING(APPLET(arping, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_ASH(APPLET(ash, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_AWK(APPLET_NOEXEC(awk, awk, _BB_DIR_USR_BIN, _BB_SUID_NEVER, awk))
-USE_BASENAME(APPLET_NOFORK(basename, basename, _BB_DIR_USR_BIN, _BB_SUID_NEVER, basename))
-USE_BBCONFIG(APPLET(bbconfig, _BB_DIR_BIN, _BB_SUID_NEVER))
-//USE_BBSH(APPLET(bbsh, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_BLKID(APPLET(blkid, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_BRCTL(APPLET(brctl, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_BUNZIP2(APPLET(bunzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_BUNZIP2(APPLET_ODDNAME(bzcat, bunzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER, bzcat))
-USE_BZIP2(APPLET(bzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CAL(APPLET(cal, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CAT(APPLET_NOFORK(cat, cat, _BB_DIR_BIN, _BB_SUID_NEVER, cat))
-USE_CATV(APPLET(catv, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_CHAT(APPLET(chat, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CHATTR(APPLET(chattr, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_CHCON(APPLET(chcon, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CHGRP(APPLET_NOEXEC(chgrp, chgrp, _BB_DIR_BIN, _BB_SUID_NEVER, chgrp))
-USE_CHMOD(APPLET_NOEXEC(chmod, chmod, _BB_DIR_BIN, _BB_SUID_NEVER, chmod))
-USE_CHOWN(APPLET_NOEXEC(chown, chown, _BB_DIR_BIN, _BB_SUID_NEVER, chown))
-USE_CHPASSWD(APPLET(chpasswd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_CHPST(APPLET(chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CHROOT(APPLET(chroot, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_CHRT(APPLET(chrt, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CHVT(APPLET(chvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CKSUM(APPLET(cksum, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CLEAR(APPLET(clear, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CMP(APPLET(cmp, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_COMM(APPLET(comm, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CP(APPLET_NOEXEC(cp, cp, _BB_DIR_BIN, _BB_SUID_NEVER, cp))
-USE_CPIO(APPLET(cpio, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_CROND(APPLET(crond, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_CRONTAB(APPLET(crontab, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
-USE_CRYPTPW(APPLET(cryptpw, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_CTTYHACK(APPLET(cttyhack, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_CUT(APPLET_NOEXEC(cut, cut, _BB_DIR_USR_BIN, _BB_SUID_NEVER, cut))
-USE_DATE(APPLET(date, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_DC(APPLET(dc, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_DD(APPLET_NOEXEC(dd, dd, _BB_DIR_BIN, _BB_SUID_NEVER, dd))
-USE_DEALLOCVT(APPLET(deallocvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_DELGROUP(APPLET_ODDNAME(delgroup, deluser, _BB_DIR_BIN, _BB_SUID_NEVER, delgroup))
-USE_DELUSER(APPLET(deluser, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_DEPMOD(APPLET(depmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_MODPROBE_SMALL(APPLET_ODDNAME(depmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe))
-USE_DEVFSD(APPLET(devfsd, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_DEVMEM(APPLET(devmem, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_DF(APPLET(df, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_APP_DHCPRELAY(APPLET(dhcprelay, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_DIFF(APPLET(diff, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_DIRNAME(APPLET_NOFORK(dirname, dirname, _BB_DIR_USR_BIN, _BB_SUID_NEVER, dirname))
-USE_DMESG(APPLET(dmesg, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_DNSD(APPLET(dnsd, _BB_DIR_USR_SBIN, _BB_SUID_ALWAYS))
-USE_DOS2UNIX(APPLET(dos2unix, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_DPKG(APPLET(dpkg, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_DPKG_DEB(APPLET_ODDNAME(dpkg-deb, dpkg_deb, _BB_DIR_USR_BIN, _BB_SUID_NEVER, dpkg_deb))
-USE_DU(APPLET(du, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_DUMPKMAP(APPLET(dumpkmap, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_APP_DUMPLEASES(APPLET(dumpleases, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-//USE_E2FSCK(APPLET(e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER))
-//USE_E2LABEL(APPLET_ODDNAME(e2label, tune2fs, _BB_DIR_SBIN, _BB_SUID_NEVER, e2label))
-USE_ECHO(APPLET_NOFORK(echo, echo, _BB_DIR_BIN, _BB_SUID_NEVER, echo))
-USE_ED(APPLET(ed, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_FEATURE_GREP_EGREP_ALIAS(APPLET_ODDNAME(egrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER, egrep))
-USE_EJECT(APPLET(eject, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_ENV(APPLET_NOEXEC(env, env, _BB_DIR_USR_BIN, _BB_SUID_NEVER, env))
-USE_ENVDIR(APPLET_ODDNAME(envdir, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, envdir))
-USE_ENVUIDGID(APPLET_ODDNAME(envuidgid, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, envuidgid))
-USE_ETHER_WAKE(APPLET_ODDNAME(ether-wake, ether_wake, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ether_wake))
-USE_EXPAND(APPLET(expand, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_EXPR(APPLET(expr, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_FAKEIDENTD(APPLET(fakeidentd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_FALSE(APPLET_NOFORK(false, false, _BB_DIR_BIN, _BB_SUID_NEVER, false))
-USE_FBSET(APPLET(fbset, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_FBSPLASH(APPLET(fbsplash, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_FDFLUSH(APPLET_ODDNAME(fdflush, freeramdisk, _BB_DIR_BIN, _BB_SUID_NEVER, fdflush))
-USE_FDFORMAT(APPLET(fdformat, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_FDISK(APPLET(fdisk, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_FEATURE_GREP_FGREP_ALIAS(APPLET_ODDNAME(fgrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER, fgrep))
-USE_FIND(APPLET_NOEXEC(find, find, _BB_DIR_USR_BIN, _BB_SUID_NEVER, find))
-USE_FINDFS(APPLET(findfs, _BB_DIR_SBIN, _BB_SUID_MAYBE))
-//USE_FLASH_ERASEALL(APPLET_ODDNAME(flash_eraseall, flash_eraseall, _BB_DIR_USR_SBIN, _BB_SUID_NEVER, flash_eraseall))
-USE_FLASH_ERASEALL(APPLET(flash_eraseall, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_FOLD(APPLET(fold, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_FREE(APPLET(free, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_FREERAMDISK(APPLET(freeramdisk, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_FSCK(APPLET(fsck, _BB_DIR_SBIN, _BB_SUID_NEVER))
-//USE_E2FSCK(APPLET_ODDNAME(fsck.ext2, e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER, fsck_ext2))
-//USE_E2FSCK(APPLET_ODDNAME(fsck.ext3, e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER, fsck_ext3))
-USE_FSCK_MINIX(APPLET_ODDNAME(fsck.minix, fsck_minix, _BB_DIR_SBIN, _BB_SUID_NEVER, fsck_minix))
-USE_FTPD(APPLET(ftpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_FTPGET(APPLET_ODDNAME(ftpget, ftpgetput, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ftpget))
-USE_FTPPUT(APPLET_ODDNAME(ftpput, ftpgetput, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ftpput))
-USE_FUSER(APPLET(fuser, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_GETENFORCE(APPLET(getenforce, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_GETOPT(APPLET(getopt, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_GETSEBOOL(APPLET(getsebool, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_GETTY(APPLET(getty, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_GREP(APPLET(grep, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_GUNZIP(APPLET(gunzip, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_GZIP(APPLET(gzip, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_HALT(APPLET(halt, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_HD(APPLET_NOEXEC(hd, hexdump, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hd))
-USE_HDPARM(APPLET(hdparm, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_HEAD(APPLET(head, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_HEXDUMP(APPLET_NOEXEC(hexdump, hexdump, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hexdump))
-USE_HOSTID(APPLET_NOFORK(hostid, hostid, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hostid))
-USE_HOSTNAME(APPLET(hostname, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_HTTPD(APPLET(httpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_HUSH(APPLET(hush, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_HWCLOCK(APPLET(hwclock, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_ID(APPLET(id, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_IFCONFIG(APPLET(ifconfig, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_IFUPDOWN(APPLET_ODDNAME(ifdown, ifupdown, _BB_DIR_SBIN, _BB_SUID_NEVER, ifdown))
-USE_IFENSLAVE(APPLET(ifenslave, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_IFUPDOWN(APPLET_ODDNAME(ifup, ifupdown, _BB_DIR_SBIN, _BB_SUID_NEVER, ifup))
-USE_INETD(APPLET(inetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_INIT(APPLET(init, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_INOTIFYD(APPLET(inotifyd, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_INSMOD(APPLET(insmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_MODPROBE_SMALL(APPLET_ODDNAME(insmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe))
-USE_INSTALL(APPLET(install, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_IONICE(APPLET(ionice, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_TEST(APPLET_NOFORK([, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER, test))
+IF_TEST(APPLET_NOFORK([[, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER, test))
+IF_ACPID(APPLET(acpid, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_ADDGROUP(APPLET(addgroup, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_ADDUSER(APPLET(adduser, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_ADJTIMEX(APPLET(adjtimex, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_AR(APPLET(ar, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_ARP(APPLET(arp, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_ARPING(APPLET(arping, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_ASH(APPLET(ash, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_AWK(APPLET_NOEXEC(awk, awk, _BB_DIR_USR_BIN, _BB_SUID_NEVER, awk))
+IF_BASENAME(APPLET_NOFORK(basename, basename, _BB_DIR_USR_BIN, _BB_SUID_NEVER, basename))
+IF_BBCONFIG(APPLET(bbconfig, _BB_DIR_BIN, _BB_SUID_NEVER))
+//IF_BBSH(APPLET(bbsh, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_BLKID(APPLET(blkid, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_BRCTL(APPLET(brctl, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_BUNZIP2(APPLET(bunzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_BUNZIP2(APPLET_ODDNAME(bzcat, bunzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER, bzcat))
+IF_BZIP2(APPLET(bzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_CAL(APPLET(cal, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_CAT(APPLET_NOFORK(cat, cat, _BB_DIR_BIN, _BB_SUID_NEVER, cat))
+IF_CATV(APPLET(catv, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_CHAT(APPLET(chat, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_CHATTR(APPLET(chattr, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_CHCON(APPLET(chcon, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_CHGRP(APPLET_NOEXEC(chgrp, chgrp, _BB_DIR_BIN, _BB_SUID_NEVER, chgrp))
+IF_CHMOD(APPLET_NOEXEC(chmod, chmod, _BB_DIR_BIN, _BB_SUID_NEVER, chmod))
+IF_CHOWN(APPLET_NOEXEC(chown, chown, _BB_DIR_BIN, _BB_SUID_NEVER, chown))
+IF_CHPASSWD(APPLET(chpasswd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_CHPST(APPLET(chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_CHROOT(APPLET(chroot, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_CHRT(APPLET(chrt, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_CHVT(APPLET(chvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_CKSUM(APPLET(cksum, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_CLEAR(APPLET(clear, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_CMP(APPLET(cmp, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_COMM(APPLET(comm, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_CP(APPLET_NOEXEC(cp, cp, _BB_DIR_BIN, _BB_SUID_NEVER, cp))
+IF_CPIO(APPLET(cpio, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_CROND(APPLET(crond, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_CRONTAB(APPLET(crontab, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
+IF_CRYPTPW(APPLET(cryptpw, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_CTTYHACK(APPLET(cttyhack, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_CUT(APPLET_NOEXEC(cut, cut, _BB_DIR_USR_BIN, _BB_SUID_NEVER, cut))
+IF_DATE(APPLET(date, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_DC(APPLET(dc, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_DD(APPLET_NOEXEC(dd, dd, _BB_DIR_BIN, _BB_SUID_NEVER, dd))
+IF_DEALLOCVT(APPLET(deallocvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_DELGROUP(APPLET_ODDNAME(delgroup, deluser, _BB_DIR_BIN, _BB_SUID_NEVER, delgroup))
+IF_DELUSER(APPLET(deluser, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_DEPMOD(APPLET(depmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_MODPROBE_SMALL(APPLET_ODDNAME(depmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe))
+IF_DEVFSD(APPLET(devfsd, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_DEVMEM(APPLET(devmem, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_DF(APPLET(df, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_APP_DHCPRELAY(APPLET(dhcprelay, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_DIFF(APPLET(diff, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_DIRNAME(APPLET_NOFORK(dirname, dirname, _BB_DIR_USR_BIN, _BB_SUID_NEVER, dirname))
+IF_DMESG(APPLET(dmesg, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_DNSD(APPLET(dnsd, _BB_DIR_USR_SBIN, _BB_SUID_ALWAYS))
+IF_DOS2UNIX(APPLET(dos2unix, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_DPKG(APPLET(dpkg, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_DPKG_DEB(APPLET_ODDNAME(dpkg-deb, dpkg_deb, _BB_DIR_USR_BIN, _BB_SUID_NEVER, dpkg_deb))
+IF_DU(APPLET(du, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_DUMPKMAP(APPLET(dumpkmap, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_APP_DUMPLEASES(APPLET(dumpleases, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+//IF_E2FSCK(APPLET(e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER))
+//IF_E2LABEL(APPLET_ODDNAME(e2label, tune2fs, _BB_DIR_SBIN, _BB_SUID_NEVER, e2label))
+IF_ECHO(APPLET_NOFORK(echo, echo, _BB_DIR_BIN, _BB_SUID_NEVER, echo))
+IF_ED(APPLET(ed, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_FEATURE_GREP_EGREP_ALIAS(APPLET_ODDNAME(egrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER, egrep))
+IF_EJECT(APPLET(eject, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_ENV(APPLET_NOEXEC(env, env, _BB_DIR_USR_BIN, _BB_SUID_NEVER, env))
+IF_ENVDIR(APPLET_ODDNAME(envdir, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, envdir))
+IF_ENVUIDGID(APPLET_ODDNAME(envuidgid, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, envuidgid))
+IF_ETHER_WAKE(APPLET_ODDNAME(ether-wake, ether_wake, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ether_wake))
+IF_EXPAND(APPLET(expand, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_EXPR(APPLET(expr, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_FAKEIDENTD(APPLET(fakeidentd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_FALSE(APPLET_NOFORK(false, false, _BB_DIR_BIN, _BB_SUID_NEVER, false))
+IF_FBSET(APPLET(fbset, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_FBSPLASH(APPLET(fbsplash, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_FDFLUSH(APPLET_ODDNAME(fdflush, freeramdisk, _BB_DIR_BIN, _BB_SUID_NEVER, fdflush))
+IF_FDFORMAT(APPLET(fdformat, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_FDISK(APPLET(fdisk, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_FEATURE_GREP_FGREP_ALIAS(APPLET_ODDNAME(fgrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER, fgrep))
+IF_FIND(APPLET_NOEXEC(find, find, _BB_DIR_USR_BIN, _BB_SUID_NEVER, find))
+IF_FINDFS(APPLET(findfs, _BB_DIR_SBIN, _BB_SUID_MAYBE))
+//IF_FLASH_ERASEALL(APPLET_ODDNAME(flash_eraseall, flash_eraseall, _BB_DIR_USR_SBIN, _BB_SUID_NEVER, flash_eraseall))
+IF_FLASH_ERASEALL(APPLET(flash_eraseall, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_FOLD(APPLET(fold, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_FREE(APPLET(free, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_FREERAMDISK(APPLET(freeramdisk, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_FSCK(APPLET(fsck, _BB_DIR_SBIN, _BB_SUID_NEVER))
+//IF_E2FSCK(APPLET_ODDNAME(fsck.ext2, e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER, fsck_ext2))
+//IF_E2FSCK(APPLET_ODDNAME(fsck.ext3, e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER, fsck_ext3))
+IF_FSCK_MINIX(APPLET_ODDNAME(fsck.minix, fsck_minix, _BB_DIR_SBIN, _BB_SUID_NEVER, fsck_minix))
+IF_FTPD(APPLET(ftpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_FTPGET(APPLET_ODDNAME(ftpget, ftpgetput, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ftpget))
+IF_FTPPUT(APPLET_ODDNAME(ftpput, ftpgetput, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ftpput))
+IF_FUSER(APPLET(fuser, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_GETENFORCE(APPLET(getenforce, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_GETOPT(APPLET(getopt, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_GETSEBOOL(APPLET(getsebool, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_GETTY(APPLET(getty, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_GREP(APPLET(grep, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_GUNZIP(APPLET(gunzip, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_GZIP(APPLET(gzip, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_HALT(APPLET(halt, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_HD(APPLET_NOEXEC(hd, hexdump, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hd))
+IF_HDPARM(APPLET(hdparm, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_HEAD(APPLET(head, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_HEXDUMP(APPLET_NOEXEC(hexdump, hexdump, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hexdump))
+IF_HOSTID(APPLET_NOFORK(hostid, hostid, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hostid))
+IF_HOSTNAME(APPLET(hostname, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_HTTPD(APPLET(httpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_HUSH(APPLET(hush, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_HWCLOCK(APPLET(hwclock, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_ID(APPLET(id, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_IFCONFIG(APPLET(ifconfig, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_IFUPDOWN(APPLET_ODDNAME(ifdown, ifupdown, _BB_DIR_SBIN, _BB_SUID_NEVER, ifdown))
+IF_IFENSLAVE(APPLET(ifenslave, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_IFUPDOWN(APPLET_ODDNAME(ifup, ifupdown, _BB_DIR_SBIN, _BB_SUID_NEVER, ifup))
+IF_INETD(APPLET(inetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_INIT(APPLET(init, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_INOTIFYD(APPLET(inotifyd, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_INSMOD(APPLET(insmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_MODPROBE_SMALL(APPLET_ODDNAME(insmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe))
+IF_INSTALL(APPLET(install, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_IONICE(APPLET(ionice, _BB_DIR_BIN, _BB_SUID_NEVER))
#if ENABLE_FEATURE_IP_ADDRESS \
|| ENABLE_FEATURE_IP_ROUTE \
|| ENABLE_FEATURE_IP_LINK \
|| ENABLE_FEATURE_IP_TUNNEL \
|| ENABLE_FEATURE_IP_RULE
-USE_IP(APPLET(ip, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_IP(APPLET(ip, _BB_DIR_BIN, _BB_SUID_NEVER))
#endif
-USE_IPADDR(APPLET(ipaddr, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_IPCALC(APPLET(ipcalc, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_IPCRM(APPLET(ipcrm, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
-USE_IPCS(APPLET(ipcs, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
-USE_IPLINK(APPLET(iplink, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_IPROUTE(APPLET(iproute, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_IPRULE(APPLET(iprule, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_IPTUNNEL(APPLET(iptunnel, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_KBD_MODE(APPLET(kbd_mode, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_KILL(APPLET(kill, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_KILLALL(APPLET_ODDNAME(killall, kill, _BB_DIR_USR_BIN, _BB_SUID_NEVER, killall))
-USE_KILLALL5(APPLET_ODDNAME(killall5, kill, _BB_DIR_USR_BIN, _BB_SUID_NEVER, killall5))
-USE_KLOGD(APPLET(klogd, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_LASH(APPLET(lash, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_LAST(APPLET(last, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_LENGTH(APPLET_NOFORK(length, length, _BB_DIR_USR_BIN, _BB_SUID_NEVER, length))
-USE_LESS(APPLET(less, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_SETARCH(APPLET_ODDNAME(linux32, setarch, _BB_DIR_BIN, _BB_SUID_NEVER, linux32))
-USE_SETARCH(APPLET_ODDNAME(linux64, setarch, _BB_DIR_BIN, _BB_SUID_NEVER, linux64))
-USE_FEATURE_INITRD(APPLET_ODDNAME(linuxrc, init, _BB_DIR_ROOT, _BB_SUID_NEVER, linuxrc))
-USE_LN(APPLET_NOEXEC(ln, ln, _BB_DIR_BIN, _BB_SUID_NEVER, ln))
-USE_LOAD_POLICY(APPLET(load_policy, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_LOADFONT(APPLET(loadfont, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_LOADKMAP(APPLET(loadkmap, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_LOGGER(APPLET(logger, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_LOGIN(APPLET(login, _BB_DIR_BIN, _BB_SUID_ALWAYS))
-USE_LOGNAME(APPLET_NOFORK(logname, logname, _BB_DIR_USR_BIN, _BB_SUID_NEVER, logname))
-USE_LOGREAD(APPLET(logread, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_LOSETUP(APPLET(losetup, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_LPD(APPLET(lpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_LPQ(APPLET_ODDNAME(lpq, lpqr, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lpq))
-USE_LPR(APPLET_ODDNAME(lpr, lpqr, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lpr))
-USE_LS(APPLET_NOEXEC(ls, ls, _BB_DIR_BIN, _BB_SUID_NEVER, ls))
-USE_LSATTR(APPLET(lsattr, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_LSMOD(APPLET(lsmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_MODPROBE_SMALL(APPLET_ODDNAME(lsmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe))
-USE_UNLZMA(APPLET_ODDNAME(lzmacat, unlzma, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lzmacat))
-USE_MAKEDEVS(APPLET(makedevs, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_MAKEMIME(APPLET(makemime, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_MAN(APPLET(man, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_MATCHPATHCON(APPLET(matchpathcon, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_MD5SUM(APPLET_ODDNAME(md5sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, md5sum))
-USE_MDEV(APPLET(mdev, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_MESG(APPLET(mesg, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_MICROCOM(APPLET(microcom, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_MKDIR(APPLET_NOFORK(mkdir, mkdir, _BB_DIR_BIN, _BB_SUID_NEVER, mkdir))
-USE_MKFS_VFAT(APPLET_ODDNAME(mkdosfs, mkfs_vfat, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_vfat))
-//USE_MKE2FS(APPLET(mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_MKFIFO(APPLET(mkfifo, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-//USE_MKE2FS(APPLET_ODDNAME(mkfs.ext2, mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_ext2))
-//USE_MKE2FS(APPLET_ODDNAME(mkfs.ext3, mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_ext3))
-USE_MKFS_MINIX(APPLET_ODDNAME(mkfs.minix, mkfs_minix, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_minix))
-USE_MKFS_VFAT(APPLET_ODDNAME(mkfs.vfat, mkfs_vfat, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_vfat))
-USE_MKNOD(APPLET(mknod, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_CRYPTPW(APPLET_ODDNAME(mkpasswd, cryptpw, _BB_DIR_USR_BIN, _BB_SUID_NEVER, mkpasswd))
-USE_MKSWAP(APPLET(mkswap, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_MKTEMP(APPLET(mktemp, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_MODPROBE(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_MODPROBE_SMALL(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_MORE(APPLET(more, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_MOUNT(APPLET(mount, _BB_DIR_BIN, USE_DESKTOP(_BB_SUID_MAYBE) SKIP_DESKTOP(_BB_SUID_NEVER)))
-USE_MOUNTPOINT(APPLET(mountpoint, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_MSH(APPLET(msh, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_MT(APPLET(mt, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_MV(APPLET(mv, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_NAMEIF(APPLET(nameif, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_NC(APPLET(nc, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_NETSTAT(APPLET(netstat, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_NICE(APPLET(nice, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_NMETER(APPLET(nmeter, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_NOHUP(APPLET(nohup, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_NSLOOKUP(APPLET(nslookup, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_OD(APPLET(od, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_OPENVT(APPLET(openvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-//USE_PARSE(APPLET(parse, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_PASSWD(APPLET(passwd, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
-USE_PATCH(APPLET(patch, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_PGREP(APPLET(pgrep, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_PIDOF(APPLET(pidof, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_PING(APPLET(ping, _BB_DIR_BIN, _BB_SUID_MAYBE))
-USE_PING6(APPLET(ping6, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_PIPE_PROGRESS(APPLET(pipe_progress, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_PIVOT_ROOT(APPLET(pivot_root, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_PKILL(APPLET_ODDNAME(pkill, pgrep, _BB_DIR_USR_BIN, _BB_SUID_NEVER, pkill))
-USE_POPMAILDIR(APPLET(popmaildir, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_HALT(APPLET_ODDNAME(poweroff, halt, _BB_DIR_SBIN, _BB_SUID_NEVER, poweroff))
-USE_PRINTENV(APPLET(printenv, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_PRINTF(APPLET_NOFORK(printf, printf, _BB_DIR_USR_BIN, _BB_SUID_NEVER, printf))
-USE_PS(APPLET(ps, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_PSCAN(APPLET(pscan, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_PWD(APPLET_NOFORK(pwd, pwd, _BB_DIR_BIN, _BB_SUID_NEVER, pwd))
-USE_RAIDAUTORUN(APPLET(raidautorun, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_RDATE(APPLET(rdate, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_RDEV(APPLET(rdev, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_READAHEAD(APPLET(readahead, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_READLINK(APPLET(readlink, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_READPROFILE(APPLET(readprofile, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_REALPATH(APPLET(realpath, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_HALT(APPLET_ODDNAME(reboot, halt, _BB_DIR_SBIN, _BB_SUID_NEVER, reboot))
-USE_REFORMIME(APPLET(reformime, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_RENICE(APPLET(renice, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_RESET(APPLET(reset, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_RESIZE(APPLET(resize, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_RESTORECON(APPLET_ODDNAME(restorecon, setfiles, _BB_DIR_SBIN, _BB_SUID_NEVER, restorecon))
-USE_RM(APPLET_NOFORK(rm, rm, _BB_DIR_BIN, _BB_SUID_NEVER, rm))
-USE_RMDIR(APPLET_NOFORK(rmdir, rmdir, _BB_DIR_BIN, _BB_SUID_NEVER, rmdir))
-USE_RMMOD(APPLET(rmmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_MODPROBE_SMALL(APPLET_ODDNAME(rmmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe))
-USE_ROUTE(APPLET(route, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_RPM(APPLET(rpm, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_RPM2CPIO(APPLET(rpm2cpio, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_RTCWAKE(APPLET(rtcwake, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_RUN_PARTS(APPLET_ODDNAME(run-parts, run_parts, _BB_DIR_BIN, _BB_SUID_NEVER, run_parts))
-USE_RUNCON(APPLET(runcon, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_RUNLEVEL(APPLET(runlevel, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_RUNSV(APPLET(runsv, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_RUNSVDIR(APPLET(runsvdir, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_RX(APPLET(rx, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_SCRIPT(APPLET(script, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_SED(APPLET(sed, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_SELINUXENABLED(APPLET(selinuxenabled, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_SENDMAIL(APPLET(sendmail, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_SEQ(APPLET_NOFORK(seq, seq, _BB_DIR_USR_BIN, _BB_SUID_NEVER, seq))
-USE_SESTATUS(APPLET(sestatus, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_SETARCH(APPLET(setarch, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_SETCONSOLE(APPLET(setconsole, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_SETENFORCE(APPLET(setenforce, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_SETFILES(APPLET(setfiles, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_SETFONT(APPLET(setfont, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_SETKEYCODES(APPLET(setkeycodes, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_SETLOGCONS(APPLET(setlogcons, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_SETSEBOOL(APPLET(setsebool, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_SETSID(APPLET(setsid, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_SETUIDGID(APPLET_ODDNAME(setuidgid, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, setuidgid))
-USE_FEATURE_SH_IS_ASH(APPLET_ODDNAME(sh, ash, _BB_DIR_BIN, _BB_SUID_NEVER, sh))
-USE_FEATURE_SH_IS_HUSH(APPLET_ODDNAME(sh, hush, _BB_DIR_BIN, _BB_SUID_NEVER, sh))
-USE_FEATURE_SH_IS_MSH(APPLET_ODDNAME(sh, msh, _BB_DIR_BIN, _BB_SUID_NEVER, sh))
-USE_SHA1SUM(APPLET_ODDNAME(sha1sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sha1sum))
-USE_SHA256SUM(APPLET_ODDNAME(sha256sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sha256sum))
-USE_SHA512SUM(APPLET_ODDNAME(sha512sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sha512sum))
-USE_SHOWKEY(APPLET(showkey, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_SLATTACH(APPLET(slattach, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_SLEEP(APPLET_NOFORK(sleep, sleep, _BB_DIR_BIN, _BB_SUID_NEVER, sleep))
-USE_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, softlimit))
-USE_SORT(APPLET_NOEXEC(sort, sort, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sort))
-USE_SPLIT(APPLET(split, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_START_STOP_DAEMON(APPLET_ODDNAME(start-stop-daemon, start_stop_daemon, _BB_DIR_SBIN, _BB_SUID_NEVER, start_stop_daemon))
-USE_STAT(APPLET(stat, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_STRINGS(APPLET(strings, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_STTY(APPLET(stty, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_SU(APPLET(su, _BB_DIR_BIN, _BB_SUID_ALWAYS))
-USE_SULOGIN(APPLET(sulogin, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_SUM(APPLET(sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_SV(APPLET(sv, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_SVLOGD(APPLET(svlogd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_SWAPONOFF(APPLET_ODDNAME(swapoff, swap_on_off, _BB_DIR_SBIN, _BB_SUID_NEVER,swapoff))
-USE_SWAPONOFF(APPLET_ODDNAME(swapon, swap_on_off, _BB_DIR_SBIN, _BB_SUID_NEVER, swapon))
-USE_SWITCH_ROOT(APPLET(switch_root, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_SYNC(APPLET_NOFORK(sync, sync, _BB_DIR_BIN, _BB_SUID_NEVER, sync))
-USE_BB_SYSCTL(APPLET(sysctl, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_SYSLOGD(APPLET(syslogd, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_TAC(APPLET_NOEXEC(tac, tac, _BB_DIR_USR_BIN, _BB_SUID_NEVER, tac))
-USE_TAIL(APPLET(tail, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TAR(APPLET(tar, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_TASKSET(APPLET(taskset, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-/* USE_TC(APPLET(tc, _BB_DIR_SBIN, _BB_SUID_NEVER)) */
-USE_TCPSVD(APPLET_ODDNAME(tcpsvd, tcpudpsvd, _BB_DIR_USR_BIN, _BB_SUID_NEVER, tcpsvd))
-USE_TEE(APPLET(tee, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TELNET(APPLET(telnet, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TELNETD(APPLET(telnetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_TEST(APPLET_NOFORK(test, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER, test))
+IF_IPADDR(APPLET(ipaddr, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_IPCALC(APPLET(ipcalc, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_IPCRM(APPLET(ipcrm, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
+IF_IPCS(APPLET(ipcs, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
+IF_IPLINK(APPLET(iplink, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_IPROUTE(APPLET(iproute, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_IPRULE(APPLET(iprule, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_IPTUNNEL(APPLET(iptunnel, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_KBD_MODE(APPLET(kbd_mode, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_KILL(APPLET(kill, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_KILLALL(APPLET_ODDNAME(killall, kill, _BB_DIR_USR_BIN, _BB_SUID_NEVER, killall))
+IF_KILLALL5(APPLET_ODDNAME(killall5, kill, _BB_DIR_USR_BIN, _BB_SUID_NEVER, killall5))
+IF_KLOGD(APPLET(klogd, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_LASH(APPLET(lash, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_LAST(APPLET(last, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_LENGTH(APPLET_NOFORK(length, length, _BB_DIR_USR_BIN, _BB_SUID_NEVER, length))
+IF_LESS(APPLET(less, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_SETARCH(APPLET_ODDNAME(linux32, setarch, _BB_DIR_BIN, _BB_SUID_NEVER, linux32))
+IF_SETARCH(APPLET_ODDNAME(linux64, setarch, _BB_DIR_BIN, _BB_SUID_NEVER, linux64))
+IF_FEATURE_INITRD(APPLET_ODDNAME(linuxrc, init, _BB_DIR_ROOT, _BB_SUID_NEVER, linuxrc))
+IF_LN(APPLET_NOEXEC(ln, ln, _BB_DIR_BIN, _BB_SUID_NEVER, ln))
+IF_LOAD_POLICY(APPLET(load_policy, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_LOADFONT(APPLET(loadfont, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_LOADKMAP(APPLET(loadkmap, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_LOGGER(APPLET(logger, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_LOGIN(APPLET(login, _BB_DIR_BIN, _BB_SUID_ALWAYS))
+IF_LOGNAME(APPLET_NOFORK(logname, logname, _BB_DIR_USR_BIN, _BB_SUID_NEVER, logname))
+IF_LOGREAD(APPLET(logread, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_LOSETUP(APPLET(losetup, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_LPD(APPLET(lpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_LPQ(APPLET_ODDNAME(lpq, lpqr, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lpq))
+IF_LPR(APPLET_ODDNAME(lpr, lpqr, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lpr))
+IF_LS(APPLET_NOEXEC(ls, ls, _BB_DIR_BIN, _BB_SUID_NEVER, ls))
+IF_LSATTR(APPLET(lsattr, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_LSMOD(APPLET(lsmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_MODPROBE_SMALL(APPLET_ODDNAME(lsmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe))
+IF_UNLZMA(APPLET_ODDNAME(lzmacat, unlzma, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lzmacat))
+IF_MAKEDEVS(APPLET(makedevs, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_MAKEMIME(APPLET(makemime, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_MAN(APPLET(man, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_MATCHPATHCON(APPLET(matchpathcon, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_MD5SUM(APPLET_ODDNAME(md5sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, md5sum))
+IF_MDEV(APPLET(mdev, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_MESG(APPLET(mesg, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_MICROCOM(APPLET(microcom, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_MKDIR(APPLET_NOFORK(mkdir, mkdir, _BB_DIR_BIN, _BB_SUID_NEVER, mkdir))
+IF_MKFS_VFAT(APPLET_ODDNAME(mkdosfs, mkfs_vfat, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_vfat))
+//IF_MKE2FS(APPLET(mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_MKFIFO(APPLET(mkfifo, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+//IF_MKE2FS(APPLET_ODDNAME(mkfs.ext2, mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_ext2))
+//IF_MKE2FS(APPLET_ODDNAME(mkfs.ext3, mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_ext3))
+IF_MKFS_MINIX(APPLET_ODDNAME(mkfs.minix, mkfs_minix, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_minix))
+IF_MKFS_VFAT(APPLET_ODDNAME(mkfs.vfat, mkfs_vfat, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_vfat))
+IF_MKNOD(APPLET(mknod, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_CRYPTPW(APPLET_ODDNAME(mkpasswd, cryptpw, _BB_DIR_USR_BIN, _BB_SUID_NEVER, mkpasswd))
+IF_MKSWAP(APPLET(mkswap, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_MKTEMP(APPLET(mktemp, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_MODPROBE(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_MODPROBE_SMALL(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_MORE(APPLET(more, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_MOUNT(APPLET(mount, _BB_DIR_BIN, IF_DESKTOP(_BB_SUID_MAYBE) IF_NOT_DESKTOP(_BB_SUID_NEVER)))
+IF_MOUNTPOINT(APPLET(mountpoint, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_MSH(APPLET(msh, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_MT(APPLET(mt, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_MV(APPLET(mv, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_NAMEIF(APPLET(nameif, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_NC(APPLET(nc, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_NETSTAT(APPLET(netstat, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_NICE(APPLET(nice, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_NMETER(APPLET(nmeter, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_NOHUP(APPLET(nohup, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_NSLOOKUP(APPLET(nslookup, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_OD(APPLET(od, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_OPENVT(APPLET(openvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+//IF_PARSE(APPLET(parse, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_PASSWD(APPLET(passwd, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
+IF_PATCH(APPLET(patch, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_PGREP(APPLET(pgrep, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_PIDOF(APPLET(pidof, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_PING(APPLET(ping, _BB_DIR_BIN, _BB_SUID_MAYBE))
+IF_PING6(APPLET(ping6, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_PIPE_PROGRESS(APPLET(pipe_progress, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_PIVOT_ROOT(APPLET(pivot_root, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_PKILL(APPLET_ODDNAME(pkill, pgrep, _BB_DIR_USR_BIN, _BB_SUID_NEVER, pkill))
+IF_POPMAILDIR(APPLET(popmaildir, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_HALT(APPLET_ODDNAME(poweroff, halt, _BB_DIR_SBIN, _BB_SUID_NEVER, poweroff))
+IF_PRINTENV(APPLET(printenv, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_PRINTF(APPLET_NOFORK(printf, printf, _BB_DIR_USR_BIN, _BB_SUID_NEVER, printf))
+IF_PS(APPLET(ps, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_PSCAN(APPLET(pscan, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_PWD(APPLET_NOFORK(pwd, pwd, _BB_DIR_BIN, _BB_SUID_NEVER, pwd))
+IF_RAIDAUTORUN(APPLET(raidautorun, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_RDATE(APPLET(rdate, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_RDEV(APPLET(rdev, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_READAHEAD(APPLET(readahead, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_READLINK(APPLET(readlink, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_READPROFILE(APPLET(readprofile, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_REALPATH(APPLET(realpath, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_HALT(APPLET_ODDNAME(reboot, halt, _BB_DIR_SBIN, _BB_SUID_NEVER, reboot))
+IF_REFORMIME(APPLET(reformime, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_RENICE(APPLET(renice, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_RESET(APPLET(reset, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_RESIZE(APPLET(resize, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_RESTORECON(APPLET_ODDNAME(restorecon, setfiles, _BB_DIR_SBIN, _BB_SUID_NEVER, restorecon))
+IF_RM(APPLET_NOFORK(rm, rm, _BB_DIR_BIN, _BB_SUID_NEVER, rm))
+IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, _BB_DIR_BIN, _BB_SUID_NEVER, rmdir))
+IF_RMMOD(APPLET(rmmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_MODPROBE_SMALL(APPLET_ODDNAME(rmmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe))
+IF_ROUTE(APPLET(route, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_RPM(APPLET(rpm, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_RPM2CPIO(APPLET(rpm2cpio, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_RTCWAKE(APPLET(rtcwake, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_RUN_PARTS(APPLET_ODDNAME(run-parts, run_parts, _BB_DIR_BIN, _BB_SUID_NEVER, run_parts))
+IF_RUNCON(APPLET(runcon, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_RUNLEVEL(APPLET(runlevel, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_RUNSV(APPLET(runsv, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_RUNSVDIR(APPLET(runsvdir, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_RX(APPLET(rx, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_SCRIPT(APPLET(script, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_SED(APPLET(sed, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_SELINUXENABLED(APPLET(selinuxenabled, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_SENDMAIL(APPLET(sendmail, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_SEQ(APPLET_NOFORK(seq, seq, _BB_DIR_USR_BIN, _BB_SUID_NEVER, seq))
+IF_SESTATUS(APPLET(sestatus, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_SETARCH(APPLET(setarch, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_SETCONSOLE(APPLET(setconsole, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_SETENFORCE(APPLET(setenforce, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_SETFILES(APPLET(setfiles, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_SETFONT(APPLET(setfont, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_SETKEYCODES(APPLET(setkeycodes, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_SETLOGCONS(APPLET(setlogcons, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_SETSEBOOL(APPLET(setsebool, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_SETSID(APPLET(setsid, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_SETUIDGID(APPLET_ODDNAME(setuidgid, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, setuidgid))
+IF_FEATURE_SH_IS_ASH(APPLET_ODDNAME(sh, ash, _BB_DIR_BIN, _BB_SUID_NEVER, sh))
+IF_FEATURE_SH_IS_HUSH(APPLET_ODDNAME(sh, hush, _BB_DIR_BIN, _BB_SUID_NEVER, sh))
+IF_FEATURE_SH_IS_MSH(APPLET_ODDNAME(sh, msh, _BB_DIR_BIN, _BB_SUID_NEVER, sh))
+IF_SHA1SUM(APPLET_ODDNAME(sha1sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sha1sum))
+IF_SHA256SUM(APPLET_ODDNAME(sha256sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sha256sum))
+IF_SHA512SUM(APPLET_ODDNAME(sha512sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sha512sum))
+IF_SHOWKEY(APPLET(showkey, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_SLATTACH(APPLET(slattach, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_SLEEP(APPLET_NOFORK(sleep, sleep, _BB_DIR_BIN, _BB_SUID_NEVER, sleep))
+IF_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, softlimit))
+IF_SORT(APPLET_NOEXEC(sort, sort, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sort))
+IF_SPLIT(APPLET(split, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_START_STOP_DAEMON(APPLET_ODDNAME(start-stop-daemon, start_stop_daemon, _BB_DIR_SBIN, _BB_SUID_NEVER, start_stop_daemon))
+IF_STAT(APPLET(stat, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_STRINGS(APPLET(strings, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_STTY(APPLET(stty, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_SU(APPLET(su, _BB_DIR_BIN, _BB_SUID_ALWAYS))
+IF_SULOGIN(APPLET(sulogin, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_SUM(APPLET(sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_SV(APPLET(sv, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_SVLOGD(APPLET(svlogd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_SWAPONOFF(APPLET_ODDNAME(swapoff, swap_on_off, _BB_DIR_SBIN, _BB_SUID_NEVER,swapoff))
+IF_SWAPONOFF(APPLET_ODDNAME(swapon, swap_on_off, _BB_DIR_SBIN, _BB_SUID_NEVER, swapon))
+IF_SWITCH_ROOT(APPLET(switch_root, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_SYNC(APPLET_NOFORK(sync, sync, _BB_DIR_BIN, _BB_SUID_NEVER, sync))
+IF_BB_SYSCTL(APPLET(sysctl, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_SYSLOGD(APPLET(syslogd, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_TAC(APPLET_NOEXEC(tac, tac, _BB_DIR_USR_BIN, _BB_SUID_NEVER, tac))
+IF_TAIL(APPLET(tail, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_TAR(APPLET(tar, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_TASKSET(APPLET(taskset, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+/* IF_TC(APPLET(tc, _BB_DIR_SBIN, _BB_SUID_NEVER)) */
+IF_TCPSVD(APPLET_ODDNAME(tcpsvd, tcpudpsvd, _BB_DIR_USR_BIN, _BB_SUID_NEVER, tcpsvd))
+IF_TEE(APPLET(tee, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_TELNET(APPLET(telnet, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_TELNETD(APPLET(telnetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_TEST(APPLET_NOFORK(test, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER, test))
#if ENABLE_FEATURE_TFTP_GET || ENABLE_FEATURE_TFTP_PUT
-USE_TFTP(APPLET(tftp, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TFTPD(APPLET(tftpd, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_TFTP(APPLET(tftp, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_TFTPD(APPLET(tftpd, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
#endif
-USE_TIME(APPLET(time, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TIMEOUT(APPLET(timeout, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TOP(APPLET(top, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TOUCH(APPLET_NOFORK(touch, touch, _BB_DIR_BIN, _BB_SUID_NEVER, touch))
-USE_TR(APPLET(tr, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TRACEROUTE(APPLET(traceroute, _BB_DIR_USR_BIN, _BB_SUID_MAYBE))
-USE_TRUE(APPLET_NOFORK(true, true, _BB_DIR_BIN, _BB_SUID_NEVER, true))
-USE_TTY(APPLET(tty, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TTYSIZE(APPLET(ttysize, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_TUNCTL(APPLET(tunctl, _BB_DIR_SBIN, _BB_SUID_NEVER))
-//USE_TUNE2FS(APPLET(tune2fs, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_APP_UDHCPC(APPLET(udhcpc, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_APP_UDHCPD(APPLET(udhcpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
-USE_UDPSVD(APPLET_ODDNAME(udpsvd, tcpudpsvd, _BB_DIR_USR_BIN, _BB_SUID_NEVER, udpsvd))
-USE_UMOUNT(APPLET(umount, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_UNAME(APPLET(uname, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_UNCOMPRESS(APPLET(uncompress, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_UNEXPAND(APPLET_ODDNAME(unexpand, expand, _BB_DIR_USR_BIN, _BB_SUID_NEVER, unexpand))
-USE_UNIQ(APPLET(uniq, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_UNIX2DOS(APPLET_ODDNAME(unix2dos, dos2unix, _BB_DIR_USR_BIN, _BB_SUID_NEVER, unix2dos))
-USE_UNLZMA(APPLET(unlzma, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_UNZIP(APPLET(unzip, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_UPTIME(APPLET(uptime, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_USLEEP(APPLET_NOFORK(usleep, usleep, _BB_DIR_BIN, _BB_SUID_NEVER, usleep))
-USE_UUDECODE(APPLET(uudecode, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_UUENCODE(APPLET(uuencode, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_VCONFIG(APPLET(vconfig, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_VI(APPLET(vi, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_VLOCK(APPLET(vlock, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
-USE_WATCH(APPLET(watch, _BB_DIR_BIN, _BB_SUID_NEVER))
-USE_WATCHDOG(APPLET(watchdog, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_WC(APPLET(wc, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_WGET(APPLET(wget, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_WHICH(APPLET(which, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_WHO(APPLET(who, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
-USE_WHOAMI(APPLET_NOFORK(whoami, whoami, _BB_DIR_USR_BIN, _BB_SUID_NEVER, whoami))
-USE_XARGS(APPLET_NOEXEC(xargs, xargs, _BB_DIR_USR_BIN, _BB_SUID_NEVER, xargs))
-USE_YES(APPLET_NOFORK(yes, yes, _BB_DIR_USR_BIN, _BB_SUID_NEVER, yes))
-USE_GUNZIP(APPLET_ODDNAME(zcat, gunzip, _BB_DIR_BIN, _BB_SUID_NEVER, zcat))
-USE_ZCIP(APPLET(zcip, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_TIME(APPLET(time, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_TIMEOUT(APPLET(timeout, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_TOP(APPLET(top, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_TOUCH(APPLET_NOFORK(touch, touch, _BB_DIR_BIN, _BB_SUID_NEVER, touch))
+IF_TR(APPLET(tr, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_TRACEROUTE(APPLET(traceroute, _BB_DIR_USR_BIN, _BB_SUID_MAYBE))
+IF_TRUE(APPLET_NOFORK(true, true, _BB_DIR_BIN, _BB_SUID_NEVER, true))
+IF_TTY(APPLET(tty, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_TTYSIZE(APPLET(ttysize, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_TUNCTL(APPLET(tunctl, _BB_DIR_SBIN, _BB_SUID_NEVER))
+//IF_TUNE2FS(APPLET(tune2fs, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_APP_UDHCPC(APPLET(udhcpc, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_APP_UDHCPD(APPLET(udhcpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
+IF_UDPSVD(APPLET_ODDNAME(udpsvd, tcpudpsvd, _BB_DIR_USR_BIN, _BB_SUID_NEVER, udpsvd))
+IF_UMOUNT(APPLET(umount, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_UNAME(APPLET(uname, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_UNCOMPRESS(APPLET(uncompress, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_UNEXPAND(APPLET_ODDNAME(unexpand, expand, _BB_DIR_USR_BIN, _BB_SUID_NEVER, unexpand))
+IF_UNIQ(APPLET(uniq, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_UNIX2DOS(APPLET_ODDNAME(unix2dos, dos2unix, _BB_DIR_USR_BIN, _BB_SUID_NEVER, unix2dos))
+IF_UNLZMA(APPLET(unlzma, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_UNZIP(APPLET(unzip, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_UPTIME(APPLET(uptime, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_USLEEP(APPLET_NOFORK(usleep, usleep, _BB_DIR_BIN, _BB_SUID_NEVER, usleep))
+IF_UUDECODE(APPLET(uudecode, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_UUENCODE(APPLET(uuencode, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_VCONFIG(APPLET(vconfig, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_VI(APPLET(vi, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_VLOCK(APPLET(vlock, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
+IF_WATCH(APPLET(watch, _BB_DIR_BIN, _BB_SUID_NEVER))
+IF_WATCHDOG(APPLET(watchdog, _BB_DIR_SBIN, _BB_SUID_NEVER))
+IF_WC(APPLET(wc, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_WGET(APPLET(wget, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_WHICH(APPLET(which, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_WHO(APPLET(who, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+IF_WHOAMI(APPLET_NOFORK(whoami, whoami, _BB_DIR_USR_BIN, _BB_SUID_NEVER, whoami))
+IF_XARGS(APPLET_NOEXEC(xargs, xargs, _BB_DIR_USR_BIN, _BB_SUID_NEVER, xargs))
+IF_YES(APPLET_NOFORK(yes, yes, _BB_DIR_USR_BIN, _BB_SUID_NEVER, yes))
+IF_GUNZIP(APPLET_ODDNAME(zcat, gunzip, _BB_DIR_BIN, _BB_SUID_NEVER, zcat))
+IF_ZCIP(APPLET(zcip, _BB_DIR_SBIN, _BB_SUID_NEVER))
#if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE)
};
diff --git a/include/libbb.h b/include/libbb.h
index 1faa9e9..4de3e79 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -260,7 +260,7 @@ enum { /* DO NOT CHANGE THESE VALUES! cp.c, mv.c, install.c depend on them. */
FILEUTILS_SET_SECURITY_CONTEXT = 0x200
#endif
};
-#define FILEUTILS_CP_OPTSTR "pdRfilsL" USE_SELINUX("c")
+#define FILEUTILS_CP_OPTSTR "pdRfilsL" IF_SELINUX("c")
extern int remove_file(const char *path, int flags) FAST_FUNC;
/* NB: without FILEUTILS_RECUR in flags, it will basically "cat"
* the source, not copy (unless "source" is a directory).
@@ -916,15 +916,15 @@ extern void bb_verror_msg(const char *s, va_list p, const char *strerr) FAST_FUN
/* Applets which are useful from another applets */
int bb_cat(char** argv);
/* If shell needs them, they exist even if not enabled as applets */
-int echo_main(int argc, char** argv) USE_ECHO(MAIN_EXTERNALLY_VISIBLE);
-int printf_main(int argc, char **argv) USE_PRINTF(MAIN_EXTERNALLY_VISIBLE);
-int test_main(int argc, char **argv) USE_TEST(MAIN_EXTERNALLY_VISIBLE);
-int kill_main(int argc, char **argv) USE_KILL(MAIN_EXTERNALLY_VISIBLE);
+int echo_main(int argc, char** argv) IF_ECHO(MAIN_EXTERNALLY_VISIBLE);
+int printf_main(int argc, char **argv) IF_PRINTF(MAIN_EXTERNALLY_VISIBLE);
+int test_main(int argc, char **argv) IF_TEST(MAIN_EXTERNALLY_VISIBLE);
+int kill_main(int argc, char **argv) IF_KILL(MAIN_EXTERNALLY_VISIBLE);
/* Similar, but used by chgrp, not shell */
-int chown_main(int argc, char **argv) USE_CHOWN(MAIN_EXTERNALLY_VISIBLE);
+int chown_main(int argc, char **argv) IF_CHOWN(MAIN_EXTERNALLY_VISIBLE);
/* Used by ftpd */
-int ls_main(int argc, char **argv) USE_LS(MAIN_EXTERNALLY_VISIBLE);
-/* Don't need USE_xxx() guard for these */
+int ls_main(int argc, char **argv) IF_LS(MAIN_EXTERNALLY_VISIBLE);
+/* Don't need IF_xxx() guard for these */
int gunzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int bunzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
@@ -1253,7 +1253,7 @@ typedef struct procps_status_t {
/* Fields are set to 0/NULL if failed to determine (or not requested) */
uint16_t argv_len;
char *argv0;
- USE_SELINUX(char *context;)
+ IF_SELINUX(char *context;)
/* Everything below must contain no ptrs to malloc'ed data:
* it is memset(0) for each process in procps_scan() */
unsigned long vsz, rss; /* we round it to kbytes */
@@ -1309,7 +1309,7 @@ enum {
|| ENABLE_PIDOF
|| ENABLE_SESTATUS
),
- USE_SELINUX(PSSCAN_CONTEXT = 1 << 17,)
+ IF_SELINUX(PSSCAN_CONTEXT = 1 << 17,)
PSSCAN_START_TIME = 1 << 18,
PSSCAN_CPU = 1 << 19,
/* These are all retrieved from proc/NN/stat in one go: */
diff --git a/include/unarchive.h b/include/unarchive.h
index 9d4f1fa..682e810 100644
--- a/include/unarchive.h
+++ b/include/unarchive.h
@@ -125,24 +125,24 @@ typedef struct inflate_unzip_result {
uint32_t crc;
} inflate_unzip_result;
-USE_DESKTOP(long long) int inflate_unzip(inflate_unzip_result *res, off_t compr_size, int src_fd, int dst_fd) FAST_FUNC;
+IF_DESKTOP(long long) int inflate_unzip(inflate_unzip_result *res, off_t compr_size, int src_fd, int dst_fd) FAST_FUNC;
/* lzma unpacker takes .lzma stream from offset 0 */
-USE_DESKTOP(long long) int unpack_lzma_stream(int src_fd, int dst_fd) FAST_FUNC;
+IF_DESKTOP(long long) int unpack_lzma_stream(int src_fd, int dst_fd) FAST_FUNC;
/* the rest wants 2 first bytes already skipped by the caller */
-USE_DESKTOP(long long) int unpack_bz2_stream(int src_fd, int dst_fd) FAST_FUNC;
-USE_DESKTOP(long long) int unpack_gz_stream(int src_fd, int dst_fd) FAST_FUNC;
-USE_DESKTOP(long long) int unpack_gz_stream_with_info(int src_fd, int dst_fd, unpack_info_t *info) FAST_FUNC;
-USE_DESKTOP(long long) int unpack_Z_stream(int fd_in, int fd_out) FAST_FUNC;
+IF_DESKTOP(long long) int unpack_bz2_stream(int src_fd, int dst_fd) FAST_FUNC;
+IF_DESKTOP(long long) int unpack_gz_stream(int src_fd, int dst_fd) FAST_FUNC;
+IF_DESKTOP(long long) int unpack_gz_stream_with_info(int src_fd, int dst_fd, unpack_info_t *info) FAST_FUNC;
+IF_DESKTOP(long long) int unpack_Z_stream(int fd_in, int fd_out) FAST_FUNC;
/* wrapper which checks first two bytes to be "BZ" */
-USE_DESKTOP(long long) int unpack_bz2_stream_prime(int src_fd, int dst_fd) FAST_FUNC;
+IF_DESKTOP(long long) int unpack_bz2_stream_prime(int src_fd, int dst_fd) FAST_FUNC;
int bbunpack(char **argv,
char* (*make_new_name)(char *filename),
- USE_DESKTOP(long long) int (*unpacker)(unpack_info_t *info)) FAST_FUNC;
+ IF_DESKTOP(long long) int (*unpacker)(unpack_info_t *info)) FAST_FUNC;
#if BB_MMU
void open_transformer(int fd,
- USE_DESKTOP(long long) int FAST_FUNC (*transformer)(int src_fd, int dst_fd)) FAST_FUNC;
+ IF_DESKTOP(long long) int FAST_FUNC (*transformer)(int src_fd, int dst_fd)) FAST_FUNC;
#define open_transformer(fd, transformer, transform_prog) open_transformer(fd, transformer)
#else
void open_transformer(int src_fd, const char *transform_prog) FAST_FUNC;
diff --git a/include/usage.h b/include/usage.h
index d3bf784..bfb07a4 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -25,7 +25,7 @@
"\n -c DIR Config directory [/etc/acpi]" \
"\n -e FILE /proc event file [/proc/acpi/event]" \
"\n -l FILE Log file [/var/log/acpid]" \
- USE_FEATURE_ACPID_COMPAT( \
+ IF_FEATURE_ACPID_COMPAT( \
"\n\nAccept and ignore compatibility options -g -m -s -S -v" \
)
@@ -34,9 +34,9 @@
"# acpid -d /dev/input/event*\n"
#define addgroup_trivial_usage \
- "[-g GID] " USE_FEATURE_ADDUSER_TO_GROUP("[user_name] ") "group_name"
+ "[-g GID] " IF_FEATURE_ADDUSER_TO_GROUP("[user_name] ") "group_name"
#define addgroup_full_usage "\n\n" \
- "Add a group " USE_FEATURE_ADDUSER_TO_GROUP("or add a user to a group") "\n" \
+ "Add a group " IF_FEATURE_ADDUSER_TO_GROUP("or add a user to a group") "\n" \
"\nOptions:" \
"\n -g GID Group id" \
@@ -160,14 +160,14 @@
#define brctl_full_usage "\n\n" \
"Manage ethernet bridges.\n" \
"\nCommands:" \
- USE_FEATURE_BRCTL_SHOW( \
+ IF_FEATURE_BRCTL_SHOW( \
"\n show Show a list of bridges" \
) \
"\n addbr BRIDGE Create BRIDGE" \
"\n delbr BRIDGE Delete BRIDGE" \
"\n addif BRIDGE IFACE Add IFACE to BRIDGE" \
"\n delif BRIDGE IFACE Delete IFACE from BRIDGE" \
- USE_FEATURE_BRCTL_FANCY( \
+ IF_FEATURE_BRCTL_FANCY( \
"\n setageing BRIDGE TIME Set ageing time" \
"\n setfd BRIDGE TIME Set bridge forward delay" \
"\n sethello BRIDGE TIME Set hello time" \
@@ -281,12 +281,12 @@
#define chcon_trivial_usage \
"[OPTIONS] CONTEXT FILE..." \
"\n chcon [OPTIONS] [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE..." \
- USE_FEATURE_CHCON_LONG_OPTIONS( \
+ IF_FEATURE_CHCON_LONG_OPTIONS( \
"\n chcon [OPTIONS] --reference=RFILE FILE..." \
)
#define chcon_full_usage "\n\n" \
"Change the security context of each FILE to CONTEXT\n" \
- USE_FEATURE_CHCON_LONG_OPTIONS( \
+ IF_FEATURE_CHCON_LONG_OPTIONS( \
"\n -v,--verbose Verbose" \
"\n -c,--changes Report changes made" \
"\n -h,--no-dereference Affect symlinks instead of their targets" \
@@ -298,7 +298,7 @@
"\n -l,--range=RANGE" \
"\n -R,--recursive Recurse subdirectories" \
) \
- SKIP_FEATURE_CHCON_LONG_OPTIONS( \
+ IF_NOT_FEATURE_CHCON_LONG_OPTIONS( \
"\n -v Verbose" \
"\n -c Report changes made" \
"\n -h Affect symlinks instead of their targets" \
@@ -311,13 +311,13 @@
)
#define chmod_trivial_usage \
- "[-R"USE_DESKTOP("cvf")"] MODE[,MODE]... FILE..."
+ "[-R"IF_DESKTOP("cvf")"] MODE[,MODE]... FILE..."
#define chmod_full_usage "\n\n" \
"Each MODE is one or more of the letters ugoa, one of the\n" \
"symbols +-= and one or more of the letters rwxst\n" \
"\nOptions:" \
"\n -R Recurse directories" \
- USE_DESKTOP( \
+ IF_DESKTOP( \
"\n -c List changed files" \
"\n -v List all files" \
"\n -f Hide errors" \
@@ -333,7 +333,7 @@
"-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
#define chgrp_trivial_usage \
- "[-RhLHP"USE_DESKTOP("cvf")"]... GROUP FILE..."
+ "[-RhLHP"IF_DESKTOP("cvf")"]... GROUP FILE..."
#define chgrp_full_usage "\n\n" \
"Change the group membership of each FILE to GROUP\n" \
"\nOptions:" \
@@ -342,7 +342,7 @@
"\n -L Traverse all symlinks to directories" \
"\n -H Traverse symlinks on command line only" \
"\n -P Do not traverse symlinks (default)" \
- USE_DESKTOP( \
+ IF_DESKTOP( \
"\n -c List changed files" \
"\n -v Verbose" \
"\n -f Hide errors" \
@@ -355,7 +355,7 @@
"-r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo\n"
#define chown_trivial_usage \
- "[-RhLHP"USE_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..."
+ "[-RhLHP"IF_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..."
#define chown_full_usage "\n\n" \
"Change the owner and/or group of each FILE to OWNER and/or GROUP\n" \
"\nOptions:" \
@@ -364,7 +364,7 @@
"\n -L Traverse all symlinks to directories" \
"\n -H Traverse symlinks on command line only" \
"\n -P Do not traverse symlinks (default)" \
- USE_DESKTOP( \
+ IF_DESKTOP( \
"\n -c List changed files" \
"\n -v List all files" \
"\n -f Hide errors" \
@@ -468,7 +468,7 @@
"Clear screen"
#define cmp_trivial_usage \
- "[-l] [-s] FILE1 [FILE2" USE_DESKTOP(" [SKIP1 [SKIP2]") "]]"
+ "[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]") "]]"
#define cmp_full_usage "\n\n" \
"Compares FILE1 vs stdin if FILE2 is not specified\n" \
"\nOptions:" \
@@ -518,7 +518,7 @@
"Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY\n" \
"\nOptions:" \
"\n -a Same as -dpR" \
- USE_SELINUX( \
+ IF_SELINUX( \
"\n -c Preserve security context" \
) \
"\n -d,-P Preserve links" \
@@ -530,18 +530,18 @@
"\n -l,-s Create (sym)links" \
#define cpio_trivial_usage \
- "-[ti" USE_FEATURE_CPIO_O("o") USE_FEATURE_CPIO_P("p") "dmvu] [-F FILE]" \
- USE_FEATURE_CPIO_O( " [-H newc]" )
+ "-[ti" IF_FEATURE_CPIO_O("o") IF_FEATURE_CPIO_P("p") "dmvu] [-F FILE]" \
+ IF_FEATURE_CPIO_O( " [-H newc]" )
#define cpio_full_usage "\n\n" \
"Extract or list files from a cpio archive" \
- USE_FEATURE_CPIO_O( ", or create a cpio archive" ) \
+ IF_FEATURE_CPIO_O( ", or create a cpio archive" ) \
"\nMain operation mode:" \
"\n -t List" \
"\n -i Extract" \
- USE_FEATURE_CPIO_O( \
+ IF_FEATURE_CPIO_O( \
"\n -o Create" \
) \
- USE_FEATURE_CPIO_P( \
+ IF_FEATURE_CPIO_P( \
"\n -p Passthrough" \
) \
"\nOptions:" \
@@ -550,18 +550,18 @@
"\n -v Verbose" \
"\n -u Overwrite" \
"\n -F Input file" \
- USE_FEATURE_CPIO_O( \
+ IF_FEATURE_CPIO_O( \
"\n -H Define format" \
) \
#define crond_trivial_usage \
- "-fbS -l N " USE_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR"
+ "-fbS -l N " IF_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR"
#define crond_full_usage "\n\n" \
" -f Foreground" \
"\n -b Background (default)" \
"\n -S Log to syslog (default)" \
"\n -l Set log level. 0 is the most verbose, default 8" \
- USE_FEATURE_CROND_D( \
+ IF_FEATURE_CROND_D( \
"\n -d Set log level, log to stderr" \
) \
"\n -L Log to file" \
@@ -583,13 +583,13 @@
#define cryptpw_full_usage "\n\n" \
"Crypt the PASSWORD using crypt(3)\n" \
"\nOptions:" \
- USE_GETOPT_LONG( \
+ IF_GETOPT_LONG( \
"\n -P,--password-fd=NUM Read password from fd NUM" \
/* "\n -s,--stdin Use stdin; like -P0" */ \
"\n -m,--method=TYPE Encryption method TYPE" \
"\n -S,--salt=SALT" \
) \
- SKIP_GETOPT_LONG( \
+ IF_NOT_GETOPT_LONG( \
"\n -P NUM Read password from fd NUM" \
/* "\n -s Use stdin; like -P0" */ \
"\n -m TYPE Encryption method TYPE" \
@@ -604,13 +604,13 @@
#define mkpasswd_full_usage "\n\n" \
"Crypt the PASSWORD using crypt(3)\n" \
"\nOptions:" \
- USE_GETOPT_LONG( \
+ IF_GETOPT_LONG( \
"\n -P,--password-fd=NUM Read password from fd NUM" \
/* "\n -s,--stdin Use stdin; like -P0" */ \
"\n -m,--method=TYPE Encryption method TYPE" \
"\n -S,--salt=SALT" \
) \
- SKIP_GETOPT_LONG( \
+ IF_NOT_GETOPT_LONG( \
"\n -P NUM Read password from fd NUM" \
/* "\n -s Use stdin; like -P0" */ \
"\n -m TYPE Encryption method TYPE" \
@@ -645,7 +645,7 @@
"\nOptions:" \
"\n -u Work in UTC (don't convert to local time)" \
"\n -R Output RFC-822 compliant date string" \
- USE_FEATURE_DATE_ISOFMT( \
+ IF_FEATURE_DATE_ISOFMT( \
"\n -I[SPEC] Output ISO-8601 compliant date string" \
"\n SPEC='date' (default) for date only," \
"\n 'hours', 'minutes', or 'seconds' for date and" \
@@ -654,7 +654,7 @@
"\n -d TIME Display TIME, not 'now'" \
"\n -r FILE Display last modification time of FILE" \
"\n [-s] TIME Set time to TIME" \
- USE_FEATURE_DATE_ISOFMT( \
+ IF_FEATURE_DATE_ISOFMT( \
"\n -D FMT Use FMT for str->date conversion" \
) \
"\n" \
@@ -691,24 +691,24 @@
"64\n"
#define dd_trivial_usage \
- "[if=FILE] [of=FILE] " USE_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \
- " [seek=N]" USE_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]")
+ "[if=FILE] [of=FILE] " IF_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \
+ " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]")
#define dd_full_usage "\n\n" \
"Copy a file with converting and formatting\n" \
"\nOptions:" \
"\n if=FILE Read from FILE instead of stdin" \
"\n of=FILE Write to FILE instead of stdout" \
"\n bs=N Read and write N bytes at a time" \
- USE_FEATURE_DD_IBS_OBS( \
+ IF_FEATURE_DD_IBS_OBS( \
"\n ibs=N Read N bytes at a time" \
) \
- USE_FEATURE_DD_IBS_OBS( \
+ IF_FEATURE_DD_IBS_OBS( \
"\n obs=N Write N bytes at a time" \
) \
"\n count=N Copy only N input blocks" \
"\n skip=N Skip N input blocks" \
"\n seek=N Skip N output blocks" \
- USE_FEATURE_DD_IBS_OBS( \
+ IF_FEATURE_DD_IBS_OBS( \
"\n conv=notrunc Don't truncate output file" \
"\n conv=noerror Continue after read errors" \
"\n conv=sync Pad blocks with zeros" \
@@ -729,10 +729,10 @@
"Deallocate unused virtual terminal /dev/ttyN"
#define delgroup_trivial_usage \
- USE_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP"
+ IF_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP"
#define delgroup_full_usage "\n\n" \
"Delete group GROUP from the system" \
- USE_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP")
+ IF_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP")
#define deluser_trivial_usage \
"USER"
@@ -752,14 +752,14 @@
"\n VALUE Data to be written" \
#define devfsd_trivial_usage \
- "mntpnt [-v]" USE_DEVFSD_FG_NP("[-fg][-np]")
+ "mntpnt [-v]" IF_DEVFSD_FG_NP("[-fg][-np]")
#define devfsd_full_usage "\n\n" \
"Manage devfs permissions and old device name symlinks\n" \
"\nOptions:" \
"\n mntpnt The mount point where devfs is mounted" \
"\n -v Print the protocol version numbers for devfsd" \
"\n and the kernel-side protocol version and exit" \
- USE_DEVFSD_FG_NP( \
+ IF_DEVFSD_FG_NP( \
"\n -fg Run in foreground" \
"\n -np Exit after parsing the configuration file" \
"\n and processing synthetic REGISTER events," \
@@ -768,19 +768,19 @@
#define df_trivial_usage \
"[-Pk" \
- USE_FEATURE_HUMAN_READABLE("mh") \
- USE_FEATURE_DF_FANCY("ai] [-B SIZE") \
+ IF_FEATURE_HUMAN_READABLE("mh") \
+ IF_FEATURE_DF_FANCY("ai] [-B SIZE") \
"] [FILESYSTEM...]"
#define df_full_usage "\n\n" \
"Print filesystem usage statistics\n" \
"\nOptions:" \
"\n -P POSIX output format" \
"\n -k 1024-byte blocks (default)" \
- USE_FEATURE_HUMAN_READABLE( \
+ IF_FEATURE_HUMAN_READABLE( \
"\n -m 1M-byte blocks" \
"\n -h Human readable (e.g. 1K 243M 2G)" \
) \
- USE_FEATURE_DF_FANCY( \
+ IF_FEATURE_DF_FANCY( \
"\n -a Show all filesystems" \
"\n -i Inodes" \
"\n -B SIZE Blocksize" \
@@ -894,12 +894,12 @@
"$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n"
#define du_trivial_usage \
- "[-aHLdclsx" USE_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..."
+ "[-aHLdclsx" IF_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..."
#define du_full_usage "\n\n" \
"Summarize disk space used for each FILE and/or directory.\n" \
"Disk space is printed in units of " \
- USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") \
- SKIP_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") \
+ IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") \
+ IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") \
" bytes.\n" \
"\nOptions:" \
"\n -a Show file sizes too" \
@@ -910,12 +910,12 @@
"\n -l Count sizes many times if hard linked" \
"\n -s Display only a total for each argument" \
"\n -x Skip directories on different filesystems" \
- USE_FEATURE_HUMAN_READABLE( \
+ IF_FEATURE_HUMAN_READABLE( \
"\n -h Sizes in human readable format (e.g., 1K 243M 2G )" \
"\n -m Sizes in megabytes" \
) \
"\n -k Sizes in kilobytes" \
- USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(" (default)") \
+ IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(" (default)") \
#define du_example_usage \
"$ du\n" \
@@ -942,12 +942,12 @@
#define dumpleases_full_usage "\n\n" \
"Display DHCP leases granted by udhcpd\n" \
"\nOptions:" \
- USE_GETOPT_LONG( \
+ IF_GETOPT_LONG( \
"\n -f,--file=FILE Leases file to load" \
"\n -r,--remaining Interpret lease times as time remaining" \
"\n -a,--absolute Interpret lease times as expire time" \
) \
- SKIP_GETOPT_LONG( \
+ IF_NOT_GETOPT_LONG( \
"\n -f FILE Leases file to load" \
"\n -r Interpret lease times as time remaining" \
"\n -a Interpret lease times as expire time" \
@@ -974,10 +974,10 @@
"\n -L file Set badblocks list" \
#define echo_trivial_usage \
- USE_FEATURE_FANCY_ECHO("[-neE] ") "[ARG...]"
+ IF_FEATURE_FANCY_ECHO("[-neE] ") "[ARG...]"
#define echo_full_usage "\n\n" \
"Print the specified ARGs to stdout" \
- USE_FEATURE_FANCY_ECHO( "\n" \
+ IF_FEATURE_FANCY_ECHO( "\n" \
"\nOptions:" \
"\n -n Suppress trailing newline" \
"\n -e Interpret backslash-escaped characters (i.e., \\t=tab)" \
@@ -986,7 +986,7 @@
#define echo_example_usage \
"$ echo \"Erik is cool\"\n" \
"Erik is cool\n" \
- USE_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" \
+ IF_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" \
"Erik\n" \
"is\n" \
"cool\n" \
@@ -998,7 +998,7 @@
#define eject_full_usage "\n\n" \
"Eject specified DEVICE (or default /dev/cdrom)\n" \
"\nOptions:" \
- USE_FEATURE_EJECT_SCSI( \
+ IF_FEATURE_EJECT_SCSI( \
"\n -s SCSI device" \
) \
"\n -t Close tray" \
@@ -1032,11 +1032,11 @@
#define expand_full_usage "\n\n" \
"Convert tabs to spaces, writing to standard output.\n" \
"\nOptions:" \
- USE_FEATURE_EXPAND_LONG_OPTIONS( \
+ IF_FEATURE_EXPAND_LONG_OPTIONS( \
"\n -i,--initial Do not convert tabs after non blanks" \
"\n -t,--tabs=N Tabstops every N chars" \
) \
- SKIP_FEATURE_EXPAND_LONG_OPTIONS( \
+ IF_NOT_FEATURE_EXPAND_LONG_OPTIONS( \
"\n -i Do not convert tabs after non blanks" \
"\n -t Tabstops every N chars" \
)
@@ -1127,18 +1127,18 @@
/* Looks like someone forgot to add this to config system */
#ifndef ENABLE_FEATURE_FDISK_BLKSIZE
# define ENABLE_FEATURE_FDISK_BLKSIZE 0
-# define USE_FEATURE_FDISK_BLKSIZE(a)
+# define IF_FEATURE_FDISK_BLKSIZE(a)
#endif
#define fdisk_trivial_usage \
- "[-ul" USE_FEATURE_FDISK_BLKSIZE("s") "] " \
+ "[-ul" IF_FEATURE_FDISK_BLKSIZE("s") "] " \
"[-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK"
#define fdisk_full_usage "\n\n" \
"Change partition table\n" \
"\nOptions:" \
"\n -u Start and End are in sectors (instead of cylinders)" \
"\n -l Show partition table for each DISK, then exit" \
- USE_FEATURE_FDISK_BLKSIZE( \
+ IF_FEATURE_FDISK_BLKSIZE( \
"\n -s Show partition sizes in kb for each DISK, then exit" \
) \
"\n -b 2048 (for certain MO disks) use 2048-byte sectors" \
@@ -1165,56 +1165,56 @@
"default EXPRESSION is '-print'\n" \
"\nEXPRESSION may consist of:" \
"\n -follow Dereference symlinks" \
- USE_FEATURE_FIND_XDEV( \
+ IF_FEATURE_FIND_XDEV( \
"\n -xdev Don't descend directories on other filesystems") \
- USE_FEATURE_FIND_MAXDEPTH( \
+ IF_FEATURE_FIND_MAXDEPTH( \
"\n -maxdepth N Descend at most N levels. -maxdepth 0 applies" \
"\n tests/actions to command line arguments only") \
"\n -mindepth N Do not act on first N levels" \
"\n -name PATTERN File name (w/o directory name) matches PATTERN" \
"\n -iname PATTERN Case insensitive -name" \
- USE_FEATURE_FIND_PATH( \
+ IF_FEATURE_FIND_PATH( \
"\n -path PATTERN Path matches PATTERN") \
- USE_FEATURE_FIND_REGEX( \
+ IF_FEATURE_FIND_REGEX( \
"\n -regex PATTERN Path matches regex PATTERN") \
- USE_FEATURE_FIND_TYPE( \
+ IF_FEATURE_FIND_TYPE( \
"\n -type X File type is X (X is one of: f,d,l,b,c,...)") \
- USE_FEATURE_FIND_PERM( \
+ IF_FEATURE_FIND_PERM( \
"\n -perm NNN Permissions match any of (+NNN), all of (-NNN)," \
"\n or exactly (NNN)") \
- USE_FEATURE_FIND_MTIME( \
+ IF_FEATURE_FIND_MTIME( \
"\n -mtime DAYS Modified time is greater than (+N), less than (-N)," \
"\n or exactly (N) days") \
- USE_FEATURE_FIND_MMIN( \
+ IF_FEATURE_FIND_MMIN( \
"\n -mmin MINS Modified time is greater than (+N), less than (-N)," \
"\n or exactly (N) minutes") \
- USE_FEATURE_FIND_NEWER( \
+ IF_FEATURE_FIND_NEWER( \
"\n -newer FILE Modified time is more recent than FILE's") \
- USE_FEATURE_FIND_INUM( \
+ IF_FEATURE_FIND_INUM( \
"\n -inum N File has inode number N") \
- USE_FEATURE_FIND_USER( \
+ IF_FEATURE_FIND_USER( \
"\n -user NAME File is owned by user NAME (numeric user ID allowed)") \
- USE_FEATURE_FIND_GROUP( \
+ IF_FEATURE_FIND_GROUP( \
"\n -group NAME File belongs to group NAME (numeric group ID allowed)") \
- USE_FEATURE_FIND_DEPTH( \
+ IF_FEATURE_FIND_DEPTH( \
"\n -depth Process directory name after traversing it") \
- USE_FEATURE_FIND_SIZE( \
+ IF_FEATURE_FIND_SIZE( \
"\n -size N[bck] File size is N (c:bytes,k:kbytes,b:512 bytes(def.))." \
"\n +/-N: file size is bigger/smaller than N") \
"\n -print Print (default and assumed)" \
- USE_FEATURE_FIND_PRINT0( \
+ IF_FEATURE_FIND_PRINT0( \
"\n -print0 Delimit output with null characters rather than" \
"\n newlines") \
- USE_FEATURE_FIND_CONTEXT ( \
+ IF_FEATURE_FIND_CONTEXT ( \
"\n -context File has specified security context") \
- USE_FEATURE_FIND_EXEC( \
+ IF_FEATURE_FIND_EXEC( \
"\n -exec CMD ARG ; Execute CMD with all instances of {} replaced by the" \
"\n matching files") \
- USE_FEATURE_FIND_PRUNE( \
+ IF_FEATURE_FIND_PRUNE( \
"\n -prune Stop traversing current subtree") \
- USE_FEATURE_FIND_DELETE( \
+ IF_FEATURE_FIND_DELETE( \
"\n -delete Delete files, turns on -depth option") \
- USE_FEATURE_FIND_PAREN( \
+ IF_FEATURE_FIND_PAREN( \
"\n (EXPR) Group an expression") \
#define find_example_usage \
@@ -1306,14 +1306,14 @@
#define ftpget_full_usage "\n\n" \
"Retrieve a remote file via FTP\n" \
"\nOptions:" \
- USE_FEATURE_FTPGETPUT_LONG_OPTIONS( \
+ IF_FEATURE_FTPGETPUT_LONG_OPTIONS( \
"\n -c,--continue Continue previous transfer" \
"\n -v,--verbose Verbose" \
"\n -u,--username Username" \
"\n -p,--password Password" \
"\n -P,--port Port number" \
) \
- SKIP_FEATURE_FTPGETPUT_LONG_OPTIONS( \
+ IF_NOT_FEATURE_FTPGETPUT_LONG_OPTIONS( \
"\n -c Continue previous transfer" \
"\n -v Verbose" \
"\n -u Username" \
@@ -1326,13 +1326,13 @@
#define ftpput_full_usage "\n\n" \
"Store a local file on a remote machine via FTP\n" \
"\nOptions:" \
- USE_FEATURE_FTPGETPUT_LONG_OPTIONS( \
+ IF_FEATURE_FTPGETPUT_LONG_OPTIONS( \
"\n -v,--verbose Verbose" \
"\n -u,--username Username" \
"\n -p,--password Password" \
"\n -P,--port Port number" \
) \
- SKIP_FEATURE_FTPGETPUT_LONG_OPTIONS( \
+ IF_NOT_FEATURE_FTPGETPUT_LONG_OPTIONS( \
"\n -v Verbose" \
"\n -u Username" \
"\n -p Password" \
@@ -1358,7 +1358,7 @@
"[OPTIONS]..."
#define getopt_full_usage "\n\n" \
"Parse command options\n" \
- USE_GETOPT_LONG( \
+ IF_GETOPT_LONG( \
"\n -a,--alternative Allow long options starting with single -" \
"\n -l,--longoptions=longopts Long options to be recognized" \
"\n -n,--name=progname The name under which errors are reported" \
@@ -1369,7 +1369,7 @@
"\n -T,--test Test for getopt(1) version" \
"\n -u,--unquoted Don't quote the output" \
) \
- SKIP_GETOPT_LONG( \
+ IF_NOT_GETOPT_LONG( \
"\n -a Allow long options starting with single -" \
"\n -l longopts Long options to be recognized" \
"\n -n progname The name under which errors are reported" \
@@ -1425,11 +1425,11 @@
#define grep_trivial_usage \
"[-HhrilLnqvso" \
- USE_DESKTOP("w") \
+ IF_DESKTOP("w") \
"eF" \
- USE_FEATURE_GREP_EGREP_ALIAS("E") \
- USE_FEATURE_GREP_CONTEXT("ABC") \
- USE_EXTRA_COMPAT("z") \
+ IF_FEATURE_GREP_EGREP_ALIAS("E") \
+ IF_FEATURE_GREP_CONTEXT("ABC") \
+ IF_EXTRA_COMPAT("z") \
"] PATTERN [FILEs...]"
#define grep_full_usage "\n\n" \
"Search for PATTERN in each FILE or standard input\n" \
@@ -1447,18 +1447,18 @@
"\n -c Only print count of matching lines" \
"\n -o Show only the part of a line that matches PATTERN" \
"\n -m MAX Match up to MAX times per file" \
- USE_DESKTOP( \
+ IF_DESKTOP( \
"\n -w Match whole words only") \
"\n -F PATTERN is a set of newline-separated strings" \
- USE_FEATURE_GREP_EGREP_ALIAS( \
+ IF_FEATURE_GREP_EGREP_ALIAS( \
"\n -E PATTERN is an extended regular expression") \
"\n -e PTRN Pattern to match" \
"\n -f FILE Read pattern from file" \
- USE_FEATURE_GREP_CONTEXT( \
+ IF_FEATURE_GREP_CONTEXT( \
"\n -A Print NUM lines of trailing context" \
"\n -B Print NUM lines of leading context" \
"\n -C Print NUM lines of output context") \
- USE_EXTRA_COMPAT( \
+ IF_EXTRA_COMPAT( \
"\n -z Input is NUL terminated") \
#define grep_example_usage \
@@ -1506,14 +1506,14 @@
"-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
#define halt_trivial_usage \
- "[-d delay] [-n] [-f]" USE_FEATURE_WTMP(" [-w]")
+ "[-d delay] [-n] [-f]" IF_FEATURE_WTMP(" [-w]")
#define halt_full_usage "\n\n" \
"Halt the system\n" \
"\nOptions:" \
"\n -d Delay interval for halting" \
"\n -n No call to sync()" \
"\n -f Force halt (don't go through init)" \
- USE_FEATURE_WTMP( \
+ IF_FEATURE_WTMP( \
"\n -w Only write a wtmp record" \
)
@@ -1527,15 +1527,15 @@
"\n -B Set Advanced Power Management setting (1-255)" \
"\n -c Get/set IDE 32-bit IO setting" \
"\n -C Check IDE power mode status" \
- USE_FEATURE_HDPARM_HDIO_GETSET_DMA( \
+ IF_FEATURE_HDPARM_HDIO_GETSET_DMA( \
"\n -d Get/set using_dma flag") \
"\n -D Enable/disable drive defect-mgmt" \
"\n -f Flush buffer cache for device on exit" \
"\n -g Display drive geometry" \
"\n -h Display terse usage information" \
- USE_FEATURE_HDPARM_GET_IDENTITY( \
+ IF_FEATURE_HDPARM_GET_IDENTITY( \
"\n -i Display drive identification") \
- USE_FEATURE_HDPARM_GET_IDENTITY( \
+ IF_FEATURE_HDPARM_GET_IDENTITY( \
"\n -I Detailed/current information directly from drive") \
"\n -k Get/set keep_settings_over_reset flag (0/1)" \
"\n -K Set drive keep_features_over_reset flag (0/1)" \
@@ -1547,20 +1547,20 @@
/* "\n -q Change next setting quietly" - not supported ib bbox */ \
"\n -Q Get/set DMA tagged-queuing depth (if supported)" \
"\n -r Get/set readonly flag (DANGEROUS to set)" \
- USE_FEATURE_HDPARM_HDIO_SCAN_HWIF( \
+ IF_FEATURE_HDPARM_HDIO_SCAN_HWIF( \
"\n -R Register an IDE interface (DANGEROUS)") \
"\n -S Set standby (spindown) timeout" \
"\n -t Perform device read timings" \
"\n -T Perform cache read timings" \
"\n -u Get/set unmaskirq flag (0/1)" \
- USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF( \
+ IF_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF( \
"\n -U Un-register an IDE interface (DANGEROUS)") \
"\n -v Defaults; same as -mcudkrag for IDE drives" \
"\n -V Display program version and exit immediately" \
- USE_FEATURE_HDPARM_HDIO_DRIVE_RESET( \
+ IF_FEATURE_HDPARM_HDIO_DRIVE_RESET( \
"\n -w Perform device reset (DANGEROUS)") \
"\n -W Set drive write-caching flag (0/1) (DANGEROUS)" \
- USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( \
+ IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( \
"\n -x Tristate device for hotswap (0/1) (DANGEROUS)") \
"\n -X Set IDE xfer mode (DANGEROUS)" \
"\n -y Put IDE drive in standby mode" \
@@ -1576,7 +1576,7 @@
"file name. With no FILE, or when FILE is -, read standard input.\n" \
"\nOptions:" \
"\n -n NUM Print first NUM lines instead of first 10" \
- USE_FEATURE_FANCY_HEAD( \
+ IF_FEATURE_FANCY_HEAD( \
"\n -c NUM Output the first NUM bytes" \
"\n -q Never output headers giving file names" \
"\n -v Always output headers giving file names") \
@@ -1587,7 +1587,7 @@
"daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n"
#define hexdump_trivial_usage \
- "[-bcCdefnosvx" USE_FEATURE_HEXDUMP_REVERSE("R") "] FILE..."
+ "[-bcCdefnosvx" IF_FEATURE_HEXDUMP_REVERSE("R") "] FILE..."
#define hexdump_full_usage "\n\n" \
"Display file(s) or standard input in a user specified format\n" \
"\nOptions:" \
@@ -1602,7 +1602,7 @@
"\n -s OFFSET Skip OFFSET bytes" \
"\n -v Display all input data" \
"\n -x Two-byte hexadecimal display" \
- USE_FEATURE_HEXDUMP_REVERSE( \
+ IF_FEATURE_HEXDUMP_REVERSE( \
"\n -R Reverse of 'hexdump -Cv'") \
#define hd_trivial_usage \
@@ -1634,9 +1634,9 @@
"[-c conffile]" \
" [-p [ip:]port]" \
" [-i] [-f] [-v[v]]" \
- USE_FEATURE_HTTPD_SETUID(" [-u user[:grp]]") \
- USE_FEATURE_HTTPD_BASIC_AUTH(" [-r realm]") \
- USE_FEATURE_HTTPD_AUTH_MD5(" [-m pass]") \
+ IF_FEATURE_HTTPD_SETUID(" [-u user[:grp]]") \
+ IF_FEATURE_HTTPD_BASIC_AUTH(" [-r realm]") \
+ IF_FEATURE_HTTPD_AUTH_MD5(" [-m pass]") \
" [-h home]" \
" [-d/-e string]"
#define httpd_full_usage "\n\n" \
@@ -1647,23 +1647,23 @@
"\n -i Inetd mode" \
"\n -f Do not daemonize" \
"\n -v[v] Verbose" \
- USE_FEATURE_HTTPD_SETUID( \
+ IF_FEATURE_HTTPD_SETUID( \
"\n -u USER[:GRP] Set uid/gid after binding to port") \
- USE_FEATURE_HTTPD_BASIC_AUTH( \
+ IF_FEATURE_HTTPD_BASIC_AUTH( \
"\n -r REALM Authentication Realm for Basic Authentication") \
- USE_FEATURE_HTTPD_AUTH_MD5( \
+ IF_FEATURE_HTTPD_AUTH_MD5( \
"\n -m PASS Crypt PASS with md5 algorithm") \
"\n -h HOME Home directory (default .)" \
"\n -e STRING HTML encode STRING" \
"\n -d STRING URL decode STRING" \
#define hwclock_trivial_usage \
- USE_FEATURE_HWCLOCK_LONG_OPTIONS( \
+ IF_FEATURE_HWCLOCK_LONG_OPTIONS( \
"[-r|--show] [-s|--hctosys] [-w|--systohc]" \
" [-l|--localtime] [-u|--utc]" \
" [-f FILE]" \
) \
- SKIP_FEATURE_HWCLOCK_LONG_OPTIONS( \
+ IF_NOT_FEATURE_HWCLOCK_LONG_OPTIONS( \
"[-r] [-s] [-w] [-l] [-u] [-f FILE]" \
)
#define hwclock_full_usage "\n\n" \
@@ -1681,7 +1681,7 @@
#define id_full_usage "\n\n" \
"Print information about USER or the current user\n" \
"\nOptions:" \
- USE_SELINUX( \
+ IF_SELINUX( \
"\n -Z Print the security context" \
) \
"\n -u Print user ID" \
@@ -1695,23 +1695,23 @@
"uid=1000(andersen) gid=1000(andersen)\n"
#define ifconfig_trivial_usage \
- USE_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]"
+ IF_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]"
#define ifconfig_full_usage "\n\n" \
"Configure a network interface\n" \
"\nOptions:" \
"\n" \
- USE_FEATURE_IPV6( \
+ IF_FEATURE_IPV6( \
" [add ADDRESS[/PREFIXLEN]]\n") \
- USE_FEATURE_IPV6( \
+ IF_FEATURE_IPV6( \
" [del ADDRESS[/PREFIXLEN]]\n") \
" [[-]broadcast [ADDRESS]] [[-]pointopoint [ADDRESS]]\n" \
" [netmask ADDRESS] [dstaddr ADDRESS]\n" \
- USE_FEATURE_IFCONFIG_SLIP( \
+ IF_FEATURE_IFCONFIG_SLIP( \
" [outfill NN] [keepalive NN]\n") \
- " " USE_FEATURE_IFCONFIG_HW("[hw ether" USE_FEATURE_HWIB("|infiniband")" ADDRESS] ") "[metric NN] [mtu NN]\n" \
+ " " IF_FEATURE_IFCONFIG_HW("[hw ether" IF_FEATURE_HWIB("|infiniband")" ADDRESS] ") "[metric NN] [mtu NN]\n" \
" [[-]trailers] [[-]arp] [[-]allmulti]\n" \
" [multicast] [[-]promisc] [txqueuelen NN] [[-]dynamic]\n" \
- USE_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ( \
+ IF_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ( \
" [mem_start NN] [io_addr NN] [irq NN]\n") \
" [up|down] ..."
@@ -1743,13 +1743,13 @@
" # ifenslave -c bond0 eth0\n" \
#define ifup_trivial_usage \
- "[-ain"USE_FEATURE_IFUPDOWN_MAPPING("m")"vf] ifaces..."
+ "[-ain"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] ifaces..."
#define ifup_full_usage "\n\n" \
"Options:" \
"\n -a De/configure all interfaces automatically" \
"\n -i FILE Use FILE for interface definitions" \
"\n -n Print out what would happen, but don't do it" \
- USE_FEATURE_IFUPDOWN_MAPPING( \
+ IF_FEATURE_IFUPDOWN_MAPPING( \
"\n (note: doesn't disable mappings)" \
"\n -m Don't run any mappings" \
) \
@@ -1757,13 +1757,13 @@
"\n -f Force de/configuration" \
#define ifdown_trivial_usage \
- "[-ain"USE_FEATURE_IFUPDOWN_MAPPING("m")"vf] ifaces..."
+ "[-ain"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] ifaces..."
#define ifdown_full_usage "\n\n" \
"Options:" \
"\n -a De/configure all interfaces automatically" \
"\n -i FILE Use FILE for interface definitions" \
"\n -n Print out what would happen, but don't do it" \
- USE_FEATURE_IFUPDOWN_MAPPING( \
+ IF_FEATURE_IFUPDOWN_MAPPING( \
"\n (note: doesn't disable mappings)" \
"\n -m Don't run any mappings" \
) \
@@ -1943,19 +1943,19 @@
/* 2.6 style insmod has no options and required filename
* (not module name - .ko can't be omitted) */
#define insmod_trivial_usage \
- USE_FEATURE_2_4_MODULES("[OPTION]... MODULE ") \
- SKIP_FEATURE_2_4_MODULES("FILE ") \
+ IF_FEATURE_2_4_MODULES("[OPTION]... MODULE ") \
+ IF_NOT_FEATURE_2_4_MODULES("FILE ") \
"[symbol=value]..."
#define insmod_full_usage "\n\n" \
"Load the specified kernel modules into the kernel" \
- USE_FEATURE_2_4_MODULES( "\n" \
+ IF_FEATURE_2_4_MODULES( "\n" \
"\nOptions:" \
"\n -f Force module to load into the wrong kernel version" \
"\n -k Make module autoclean-able" \
"\n -v Verbose" \
"\n -q Quiet" \
"\n -L Lock to prevent simultaneous loads of a module" \
- USE_FEATURE_INSMOD_LOAD_MAP( \
+ IF_FEATURE_INSMOD_LOAD_MAP( \
"\n -m Output load map to stdout" \
) \
"\n -o NAME Set internal module name to NAME" \
@@ -1976,7 +1976,7 @@
"\n -o USER Set ownership" \
"\n -g GRP Set group ownership" \
"\n -m MODE Set permissions" \
- USE_SELINUX( \
+ IF_SELINUX( \
"\n -Z Set security context" \
)
@@ -1991,20 +1991,20 @@
/* would need to make the " | " optional depending on more than one selected: */
#define ip_trivial_usage \
"[OPTIONS] {" \
- USE_FEATURE_IP_ADDRESS("address | ") \
- USE_FEATURE_IP_ROUTE("route | ") \
- USE_FEATURE_IP_LINK("link | ") \
- USE_FEATURE_IP_TUNNEL("tunnel | ") \
- USE_FEATURE_IP_RULE("rule") \
+ IF_FEATURE_IP_ADDRESS("address | ") \
+ IF_FEATURE_IP_ROUTE("route | ") \
+ IF_FEATURE_IP_LINK("link | ") \
+ IF_FEATURE_IP_TUNNEL("tunnel | ") \
+ IF_FEATURE_IP_RULE("rule") \
"} {COMMAND}"
#define ip_full_usage "\n\n" \
"ip [OPTIONS] OBJECT {COMMAND}\n" \
"where OBJECT := {" \
- USE_FEATURE_IP_ADDRESS("address | ") \
- USE_FEATURE_IP_ROUTE("route | ") \
- USE_FEATURE_IP_LINK("link | ") \
- USE_FEATURE_IP_TUNNEL("tunnel | ") \
- USE_FEATURE_IP_RULE("rule") \
+ IF_FEATURE_IP_ADDRESS("address | ") \
+ IF_FEATURE_IP_ROUTE("route | ") \
+ IF_FEATURE_IP_LINK("link | ") \
+ IF_FEATURE_IP_TUNNEL("tunnel | ") \
+ IF_FEATURE_IP_RULE("rule") \
"}\n" \
"OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }" \
@@ -2025,21 +2025,21 @@
#define ipcalc_full_usage "\n\n" \
"Calculate IP network settings from a IP address\n" \
"\nOptions:" \
- USE_FEATURE_IPCALC_LONG_OPTIONS( \
+ IF_FEATURE_IPCALC_LONG_OPTIONS( \
"\n -b,--broadcast Display calculated broadcast address" \
"\n -n,--network Display calculated network address" \
"\n -m,--netmask Display default netmask for IP" \
- USE_FEATURE_IPCALC_FANCY( \
+ IF_FEATURE_IPCALC_FANCY( \
"\n -p,--prefix Display the prefix for IP/NETMASK" \
"\n -h,--hostname Display first resolved host name" \
"\n -s,--silent Don't ever display error messages" \
) \
) \
- SKIP_FEATURE_IPCALC_LONG_OPTIONS( \
+ IF_NOT_FEATURE_IPCALC_LONG_OPTIONS( \
"\n -b Display calculated broadcast address" \
"\n -n Display calculated network address" \
"\n -m Display default netmask for IP" \
- USE_FEATURE_IPCALC_FANCY( \
+ IF_FEATURE_IPCALC_FANCY( \
"\n -p Display the prefix for IP/NETMASK" \
"\n -h Display first resolved host name" \
"\n -s Don't ever display error messages" \
@@ -2332,14 +2332,14 @@
"\n -V Verbose" \
#define ls_trivial_usage \
- "[-1Aa" USE_FEATURE_LS_TIMESTAMPS("c") "Cd" \
- USE_FEATURE_LS_TIMESTAMPS("e") USE_FEATURE_LS_FILETYPES("F") "iln" \
- USE_FEATURE_LS_FILETYPES("p") USE_FEATURE_LS_FOLLOWLINKS("L") \
- USE_FEATURE_LS_RECURSIVE("R") USE_FEATURE_LS_SORTFILES("rS") "s" \
- USE_FEATURE_AUTOWIDTH("T") USE_FEATURE_LS_TIMESTAMPS("tu") \
- USE_FEATURE_LS_SORTFILES("v") USE_FEATURE_AUTOWIDTH("w") "x" \
- USE_FEATURE_LS_SORTFILES("X") USE_FEATURE_HUMAN_READABLE("h") "k" \
- USE_SELINUX("K") "] [filenames...]"
+ "[-1Aa" IF_FEATURE_LS_TIMESTAMPS("c") "Cd" \
+ IF_FEATURE_LS_TIMESTAMPS("e") IF_FEATURE_LS_FILETYPES("F") "iln" \
+ IF_FEATURE_LS_FILETYPES("p") IF_FEATURE_LS_FOLLOWLINKS("L") \
+ IF_FEATURE_LS_RECURSIVE("R") IF_FEATURE_LS_SORTFILES("rS") "s" \
+ IF_FEATURE_AUTOWIDTH("T") IF_FEATURE_LS_TIMESTAMPS("tu") \
+ IF_FEATURE_LS_SORTFILES("v") IF_FEATURE_AUTOWIDTH("w") "x" \
+ IF_FEATURE_LS_SORTFILES("X") IF_FEATURE_HUMAN_READABLE("h") "k" \
+ IF_SELINUX("K") "] [filenames...]"
#define ls_full_usage "\n\n" \
"List directory contents\n" \
"\nOptions:" \
@@ -2347,49 +2347,49 @@
"\n -A Don't list . and .." \
"\n -a Don't hide entries starting with ." \
"\n -C List by columns" \
- USE_FEATURE_LS_TIMESTAMPS( \
+ IF_FEATURE_LS_TIMESTAMPS( \
"\n -c With -l: sort by ctime") \
- USE_FEATURE_LS_COLOR( \
+ IF_FEATURE_LS_COLOR( \
"\n --color[={always,never,auto}] Control coloring") \
"\n -d List directory entries instead of contents" \
- USE_FEATURE_LS_TIMESTAMPS( \
+ IF_FEATURE_LS_TIMESTAMPS( \
"\n -e List full date and time") \
- USE_FEATURE_LS_FILETYPES( \
+ IF_FEATURE_LS_FILETYPES( \
"\n -F Append indicator (one of */=@|) to entries") \
"\n -i List inode numbers" \
"\n -l Long listing format" \
"\n -n List numeric UIDs and GIDs instead of names" \
- USE_FEATURE_LS_FILETYPES( \
+ IF_FEATURE_LS_FILETYPES( \
"\n -p Append indicator (one of /=@|) to entries") \
- USE_FEATURE_LS_FOLLOWLINKS( \
+ IF_FEATURE_LS_FOLLOWLINKS( \
"\n -L List entries pointed to by symlinks") \
- USE_FEATURE_LS_RECURSIVE( \
+ IF_FEATURE_LS_RECURSIVE( \
"\n -R List subdirectories recursively") \
- USE_FEATURE_LS_SORTFILES( \
+ IF_FEATURE_LS_SORTFILES( \
"\n -r Sort in reverse order") \
- USE_FEATURE_LS_SORTFILES( \
+ IF_FEATURE_LS_SORTFILES( \
"\n -S Sort by file size") \
"\n -s List the size of each file, in blocks" \
- USE_FEATURE_AUTOWIDTH( \
+ IF_FEATURE_AUTOWIDTH( \
"\n -T NUM Assume tabstop every NUM columns") \
- USE_FEATURE_LS_TIMESTAMPS( \
+ IF_FEATURE_LS_TIMESTAMPS( \
"\n -t With -l: sort by modification time") \
- USE_FEATURE_LS_TIMESTAMPS( \
+ IF_FEATURE_LS_TIMESTAMPS( \
"\n -u With -l: sort by access time") \
- USE_FEATURE_LS_SORTFILES( \
+ IF_FEATURE_LS_SORTFILES( \
"\n -v Sort by version") \
- USE_FEATURE_AUTOWIDTH( \
+ IF_FEATURE_AUTOWIDTH( \
"\n -w NUM Assume the terminal is NUM columns wide") \
"\n -x List by lines" \
- USE_FEATURE_LS_SORTFILES( \
+ IF_FEATURE_LS_SORTFILES( \
"\n -X Sort by extension") \
- USE_FEATURE_HUMAN_READABLE( \
+ IF_FEATURE_HUMAN_READABLE( \
"\n -h List sizes in human readable format (1K 243M 2G)") \
- USE_SELINUX( \
+ IF_SELINUX( \
"\n -k List security context") \
- USE_SELINUX( \
+ IF_SELINUX( \
"\n -K List security context in long format") \
- USE_SELINUX( \
+ IF_SELINUX( \
"\n -Z List security context and permission") \
#define lsattr_trivial_usage \
@@ -2495,10 +2495,10 @@
#define md5sum_trivial_usage \
"[OPTION] [FILEs...]" \
- USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: md5sum [OPTION] -c [FILE]")
+ IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: md5sum [OPTION] -c [FILE]")
#define md5sum_full_usage "\n\n" \
- "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \
- USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
+ "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \
+ IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
"\nOptions:" \
"\n -c Check sums against given list" \
"\n -s Don't output anything, status code shows success" \
@@ -2517,10 +2517,10 @@
#define sha1sum_trivial_usage \
"[OPTION] [FILEs...]" \
- USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum [OPTION] -c [FILE]")
+ IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum [OPTION] -c [FILE]")
#define sha1sum_full_usage "\n\n" \
- "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \
- USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
+ "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \
+ IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
"\nOptions:" \
"\n -c Check sums against given list" \
"\n -s Don't output anything, status code shows success" \
@@ -2529,10 +2529,10 @@
#define sha256sum_trivial_usage \
"[OPTION] [FILEs...]" \
- USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha256sum [OPTION] -c [FILE]")
+ IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha256sum [OPTION] -c [FILE]")
#define sha256sum_full_usage "\n\n" \
- "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \
- USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
+ "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \
+ IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
"\nOptions:" \
"\n -c Check sums against given list" \
"\n -s Don't output anything, status code shows success" \
@@ -2541,10 +2541,10 @@
#define sha512sum_trivial_usage \
"[OPTION] [FILEs...]" \
- USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha512sum [OPTION] -c [FILE]")
+ IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha512sum [OPTION] -c [FILE]")
#define sha512sum_full_usage "\n\n" \
- "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \
- USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
+ "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \
+ IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
"\nOptions:" \
"\n -c Check sums against given list" \
"\n -s Don't output anything, status code shows success" \
@@ -2558,19 +2558,19 @@
"\n" \
"It can be run by kernel as a hotplug helper. To activate it:\n" \
" echo /bin/mdev >/proc/sys/kernel/hotplug\n" \
- USE_FEATURE_MDEV_CONF( \
+ IF_FEATURE_MDEV_CONF( \
"It uses /etc/mdev.conf with lines\n" \
"[-]DEVNAME UID:GID PERM" \
- USE_FEATURE_MDEV_RENAME(" [>|=PATH]") \
- USE_FEATURE_MDEV_EXEC(" [@|$|*COMMAND]") \
+ IF_FEATURE_MDEV_RENAME(" [>|=PATH]") \
+ IF_FEATURE_MDEV_EXEC(" [@|$|*COMMAND]") \
) \
#define mdev_notes_usage "" \
- USE_FEATURE_MDEV_CONFIG( \
+ IF_FEATURE_MDEV_CONFIG( \
"The mdev config file contains lines that look like:\n" \
" hd[a-z][0-9]* 0:3 660\n\n" \
"That's device name (with regex match), uid:gid, and permissions.\n\n" \
- USE_FEATURE_MDEV_EXEC( \
+ IF_FEATURE_MDEV_EXEC( \
"Optionally, that can be followed (on the same line) by a special character\n" \
"and a command line to run after creating/before deleting the corresponding\n" \
"device(s). The environment variable $MDEV indicates the active device node\n" \
@@ -2610,7 +2610,7 @@
"\nOptions:" \
"\n -m Set permission mode (as in chmod), not rwxrwxrwx - umask" \
"\n -p No error if existing, make parent directories as needed" \
- USE_SELINUX( \
+ IF_SELINUX( \
"\n -Z Set security context" \
)
@@ -2659,7 +2659,7 @@
"Create named pipe (identical to 'mknod name p')\n" \
"\nOptions:" \
"\n -m MODE Mode (default a=rw)" \
- USE_SELINUX( \
+ IF_SELINUX( \
"\n -Z Set security context" \
)
@@ -2700,7 +2700,7 @@
"\n b: Make a block device" \
"\n c or u: Make a character device" \
"\n p: Make a named pipe (MAJOR and MINOR are ignored)" \
- USE_SELINUX( \
+ IF_SELINUX( \
"\n -Z Set security context" \
)
@@ -2745,7 +2745,7 @@
"[-knqrsv] MODULE [symbol=value...]"
#define modprobe_full_usage "\n\n" \
"Options:" \
- USE_FEATURE_2_4_MODULES( \
+ IF_FEATURE_2_4_MODULES( \
"\n -k Make module autoclean-able" \
) \
"\n -n Dry run" \
@@ -2753,7 +2753,7 @@
"\n -r Remove module (stacks) or do autoclean" \
"\n -s Report via syslog instead of stderr" \
"\n -v Verbose" \
- USE_FEATURE_MODPROBE_BLACKLIST( \
+ IF_FEATURE_MODPROBE_BLACKLIST( \
"\n -b Apply blacklist to module names too" \
)
@@ -2831,15 +2831,15 @@
"Mount a filesystem. Filesystem autodetection requires /proc be mounted.\n" \
"\nOptions:" \
"\n -a Mount all filesystems in fstab" \
- USE_FEATURE_MOUNT_FAKE( \
- USE_FEATURE_MTAB_SUPPORT( \
+ IF_FEATURE_MOUNT_FAKE( \
+ IF_FEATURE_MTAB_SUPPORT( \
"\n -f Update /etc/mtab, but don't mount" \
) \
- SKIP_FEATURE_MTAB_SUPPORT( \
+ IF_NOT_FEATURE_MTAB_SUPPORT( \
"\n -f Dry run" \
) \
) \
- USE_FEATURE_MTAB_SUPPORT( \
+ IF_FEATURE_MTAB_SUPPORT( \
"\n -n Don't update /etc/mtab" \
) \
"\n -r Read-only mount" \
@@ -2847,10 +2847,10 @@
"\n -t FSTYPE Filesystem type" \
"\n -O OPT Mount only filesystems with option OPT (-a only)" \
"\n-o OPT:" \
- USE_FEATURE_MOUNT_LOOP( \
+ IF_FEATURE_MOUNT_LOOP( \
"\n loop Ignored (loop devices are autodetected)" \
) \
- USE_FEATURE_MOUNT_FLAGS( \
+ IF_FEATURE_MOUNT_FLAGS( \
"\n [a]sync Writes are [a]synchronous" \
"\n [no]atime Disable/enable updates to inode access times" \
"\n [no]diratime Disable/enable atime updates to directories" \
@@ -2945,26 +2945,26 @@
#endif
#define nc_trivial_usage \
- USE_NC_EXTRA("[-iN] [-wN] ")USE_NC_SERVER("[-l] [-p PORT] ") \
- "["USE_NC_EXTRA("-f FILENAME|")"IPADDR PORTNUM]"USE_NC_EXTRA(" [-e COMMAND]")
+ IF_NC_EXTRA("[-iN] [-wN] ")IF_NC_SERVER("[-l] [-p PORT] ") \
+ "["IF_NC_EXTRA("-f FILENAME|")"IPADDR PORTNUM]"IF_NC_EXTRA(" [-e COMMAND]")
#define nc_full_usage "\n\n" \
- "Open a pipe to IP:port" USE_NC_EXTRA(" or file") \
+ "Open a pipe to IP:port" IF_NC_EXTRA(" or file") \
NC_OPTIONS_STR \
- USE_NC_EXTRA( \
+ IF_NC_EXTRA( \
"\n -e Exec rest of command line after connect" \
"\n -i SECS Delay interval for lines sent" \
"\n -w SECS Timeout for connect" \
"\n -f FILE Use file (ala /dev/ttyS0) instead of network" \
) \
- USE_NC_SERVER( \
+ IF_NC_SERVER( \
"\n -l Listen mode, for inbound connects" \
- USE_NC_EXTRA( \
+ IF_NC_EXTRA( \
"\n (use -l twice with -e for persistent server)") \
"\n -p PORT Local port number" \
)
#define nc_notes_usage "" \
- USE_NC_EXTRA( \
+ IF_NC_EXTRA( \
"To use netcat as a terminal emulator on a serial port:\n\n" \
"$ stty 115200 -F /dev/ttyS0\n" \
"$ stty raw -echo -ctlecho && nc -f /dev/ttyS0\n" \
@@ -2984,12 +2984,12 @@
#define nc_trivial_usage \
"[-options] hostname port - connect" \
- USE_NC_SERVER("\n" \
+ IF_NC_SERVER("\n" \
"nc [-options] -l -p port [hostname] [port] - listen")
#define nc_full_usage "\n\n" \
"Options:" \
"\n -e prog [args] Program to exec after connect (must be last)" \
- USE_NC_SERVER( \
+ IF_NC_SERVER( \
"\n -l Listen mode, for inbound connects" \
) \
"\n -n Don't do DNS resolution" \
@@ -2998,7 +2998,7 @@
"\n -u UDP mode" \
"\n -v Verbose (cumulative: -vv)" \
"\n -w secs Timeout for connects and final net reads" \
- USE_NC_EXTRA( \
+ IF_NC_EXTRA( \
"\n -i sec Delay interval for lines sent" /* ", ports scanned" */ \
"\n -o file Hex dump of traffic" \
"\n -z Zero-I/O mode (scanning)" \
@@ -3011,7 +3011,7 @@
#endif
#define netstat_trivial_usage \
- "[-laentuwxr"USE_FEATURE_NETSTAT_WIDE("W")USE_FEATURE_NETSTAT_PRG("p")"]"
+ "[-laentuwxr"IF_FEATURE_NETSTAT_WIDE("W")IF_FEATURE_NETSTAT_PRG("p")"]"
#define netstat_full_usage "\n\n" \
"Display networking information\n" \
"\nOptions:" \
@@ -3024,10 +3024,10 @@
"\n -w Raw sockets" \
"\n -x Unix sockets" \
"\n -r Display routing table" \
- USE_FEATURE_NETSTAT_WIDE( \
+ IF_FEATURE_NETSTAT_WIDE( \
"\n -W Display with no column truncation" \
) \
- USE_FEATURE_NETSTAT_PRG( \
+ IF_FEATURE_NETSTAT_PRG( \
"\n -p Display PID/Program name for sockets" \
)
@@ -3084,7 +3084,7 @@
"Address: 127.0.0.1\n"
#define od_trivial_usage \
- "[-aBbcDdeFfHhIiLlOovXx] " USE_DESKTOP("[-t TYPE] ") "[FILE]"
+ "[-aBbcDdeFfHhIiLlOovXx] " IF_DESKTOP("[-t TYPE] ") "[FILE]"
#define od_full_usage "\n\n" \
"Write an unambiguous representation, octal bytes by default, of FILE\n" \
"to standard output. With no FILE or when FILE is -, read standard input."
@@ -3119,16 +3119,16 @@
"\n -u Unlock (re-enable) account" \
#define chpasswd_trivial_usage \
- USE_GETOPT_LONG("[--md5|--encrypted]") SKIP_GETOPT_LONG("[-m|-e]")
+ IF_GETOPT_LONG("[--md5|--encrypted]") IF_NOT_GETOPT_LONG("[-m|-e]")
#define chpasswd_full_usage "\n\n" \
"Read user:password information from stdin " \
"and update /etc/passwd accordingly.\n" \
"\nOptions:" \
- USE_GETOPT_LONG( \
+ IF_GETOPT_LONG( \
"\n -e,--encrypted Supplied passwords are in encrypted form" \
"\n -m,--md5 Use MD5 encryption instead of DES" \
) \
- SKIP_GETOPT_LONG( \
+ IF_NOT_GETOPT_LONG( \
"\n -e Supplied passwords are in encrypted form" \
"\n -m Use MD5 encryption instead of DES" \
)
@@ -3168,18 +3168,18 @@
#define pidof_full_usage "\n\n" \
"List PIDs of all processes with names that match NAMEs" \
USAGE_PIDOF \
- USE_FEATURE_PIDOF_SINGLE( \
+ IF_FEATURE_PIDOF_SINGLE( \
"\n -s Show only one PID") \
- USE_FEATURE_PIDOF_OMIT( \
+ IF_FEATURE_PIDOF_OMIT( \
"\n -o PID Omit given pid" \
"\n Use %PPID to omit pid of pidof's parent") \
#define pidof_example_usage \
"$ pidof init\n" \
"1\n" \
- USE_FEATURE_PIDOF_OMIT( \
+ IF_FEATURE_PIDOF_OMIT( \
"$ pidof /bin/sh\n20351 5973 5950\n") \
- USE_FEATURE_PIDOF_OMIT( \
+ IF_FEATURE_PIDOF_OMIT( \
"$ pidof /bin/sh -o %PPID\n20351 5950")
#if !ENABLE_FEATURE_FANCY_PING
@@ -3273,7 +3273,7 @@
"\n -T Get messages with TOP instead with RETR" \
"\n -k Keep retrieved messages on the server" \
"\n -t timeout Set network timeout" \
- USE_FEATURE_POPMAILDIR_DELIVERY( \
+ IF_FEATURE_POPMAILDIR_DELIVERY( \
"\n -F \"program arg1 arg2 ...\" Filter by program. May be multiple" \
"\n -M \"program arg1 arg2 ...\" Deliver by program" \
) \
@@ -3332,10 +3332,10 @@
#define ps_full_usage "\n\n" \
"Report process status\n" \
USAGE_PS \
- USE_SELINUX( \
+ IF_SELINUX( \
"\n -Z Show SE Linux context" \
) \
- USE_FEATURE_PS_WIDE( \
+ IF_FEATURE_PS_WIDE( \
"\n w Wide output" \
)
@@ -3404,10 +3404,10 @@
"files do not block on disk I/O"
#define readlink_trivial_usage \
- USE_FEATURE_READLINK_FOLLOW("[-f] ") "FILE"
+ IF_FEATURE_READLINK_FOLLOW("[-f] ") "FILE"
#define readlink_full_usage "\n\n" \
"Display the value of a symlink" \
- USE_FEATURE_READLINK_FOLLOW( "\n" \
+ IF_FEATURE_READLINK_FOLLOW( "\n" \
"\nOptions:" \
"\n -f Canonicalize by following all symlinks") \
@@ -3505,11 +3505,11 @@
#define rmdir_full_usage "\n\n" \
"Remove the DIRECTORY, if it is empty.\n" \
"\nOptions:" \
- USE_FEATURE_RMDIR_LONG_OPTIONS( \
+ IF_FEATURE_RMDIR_LONG_OPTIONS( \
"\n -p|--parents Include parents" \
"\n -ignore-fail-on-non-empty" \
) \
- SKIP_FEATURE_RMDIR_LONG_OPTIONS( \
+ IF_NOT_FEATURE_RMDIR_LONG_OPTIONS( \
"\n -p Include parents" \
)
@@ -3535,7 +3535,7 @@
"\nOptions:" \
"\n -n Don't resolve names" \
"\n -e Display other/more information" \
- "\n -A inet" USE_FEATURE_IPV6("{6}") " Select address family" \
+ "\n -A inet" IF_FEATURE_IPV6("{6}") " Select address family" \
#define rpm_trivial_usage \
"-i -q[ildc]p package.rpm"
@@ -3559,7 +3559,7 @@
"[-a | -l | -u] [-d DEV] [-m MODE] [-s SEC | -t TIME]"
#define rtcwake_full_usage "\n\n" \
"Enter a system sleep state until specified wakeup time\n" \
- USE_GETOPT_LONG( \
+ IF_GETOPT_LONG( \
"\n -a,--auto Read clock mode from adjtime" \
"\n -l,--local Clock is set to local time" \
"\n -u,--utc Clock is set to UTC time" \
@@ -3568,7 +3568,7 @@
"\n -s,--seconds=SEC Set the timeout in SEC seconds from now" \
"\n -t,--time=TIME Set the timeout to TIME seconds from epoch" \
) \
- SKIP_GETOPT_LONG( \
+ IF_NOT_GETOPT_LONG( \
"\n -a Read clock mode from adjtime" \
"\n -l Clock is set to local time" \
"\n -u Clock is set to UTC time" \
@@ -3584,14 +3584,14 @@
#define runcon_full_usage "\n\n" \
"Run a program in a different security context\n" \
"\n CONTEXT Complete security context\n" \
- USE_FEATURE_RUNCON_LONG_OPTIONS( \
+ IF_FEATURE_RUNCON_LONG_OPTIONS( \
"\n -c,--compute Compute process transition context before modifying" \
"\n -t,--type=TYPE Type (for same role as parent)" \
"\n -u,--user=USER User identity" \
"\n -r,--role=ROLE Role" \
"\n -l,--range=RNG Levelrange" \
) \
- SKIP_FEATURE_RUNCON_LONG_OPTIONS( \
+ IF_NOT_FEATURE_RUNCON_LONG_OPTIONS( \
"\n -c Compute process transition context before modifying" \
"\n -t TYPE Type (for same role as parent)" \
"\n -u USER User identity" \
@@ -3600,14 +3600,14 @@
)
#define run_parts_trivial_usage \
- "[-t] "USE_FEATURE_RUN_PARTS_FANCY("[-l] ")"[-a ARG] [-u MASK] DIRECTORY"
+ "[-t] "IF_FEATURE_RUN_PARTS_FANCY("[-l] ")"[-a ARG] [-u MASK] DIRECTORY"
#define run_parts_full_usage "\n\n" \
"Run a bunch of scripts in a directory\n" \
"\nOptions:" \
"\n -t Print what would be run, but don't actually run anything" \
"\n -a ARG Pass ARG as argument for every program" \
"\n -u MASK Set the umask to MASK before running every program" \
- USE_FEATURE_RUN_PARTS_FANCY( \
+ IF_FEATURE_RUN_PARTS_FANCY( \
"\n -l Print names of all matching files even if they are not executable" \
)
@@ -3728,7 +3728,7 @@
"\n -b Display current state of booleans" \
#define setconsole_trivial_usage \
- "[-r" USE_FEATURE_SETCONSOLE_LONG_OPTIONS("|--reset") "] [DEVICE]"
+ "[-r" IF_FEATURE_SETCONSOLE_LONG_OPTIONS("|--reset") "] [DEVICE]"
#define setconsole_full_usage "\n\n" \
"Redirect system console output to DEVICE (default: /dev/tty)\n" \
"\nOptions:" \
@@ -3740,13 +3740,13 @@
#define setfiles_trivial_usage \
"[-dnpqsvW] [-e dir]... [-o file] [-r alt_root_path]" \
- USE_FEATURE_SETFILES_CHECK_OPTION( \
+ IF_FEATURE_SETFILES_CHECK_OPTION( \
" [-c policyfile] spec_file" \
) \
" pathname"
#define setfiles_full_usage "\n\n" \
"Reset file contexts under pathname according to spec_file\n" \
- USE_FEATURE_SETFILES_CHECK_OPTION( \
+ IF_FEATURE_SETFILES_CHECK_OPTION( \
"\n -c file Check the validity of the contexts against the specified binary policy" \
) \
"\n -d Show which specification matched each file" \
@@ -3809,10 +3809,10 @@
"lash is deprecated, please use hush"
#define last_trivial_usage \
- ""USE_FEATURE_LAST_FANCY("[-HW] [-f file]")
+ ""IF_FEATURE_LAST_FANCY("[-HW] [-f file]")
#define last_full_usage "\n\n" \
"Show listing of the last users that logged into the system" \
- USE_FEATURE_LAST_FANCY( "\n" \
+ IF_FEATURE_LAST_FANCY( "\n" \
"\nOptions:" \
/* "\n -H Show header line" */ \
"\n -W Display with no host column truncation" \
@@ -3843,27 +3843,27 @@
"\n -F Disable RTS/CTS flow control" \
#define sleep_trivial_usage \
- USE_FEATURE_FANCY_SLEEP("[") "N" USE_FEATURE_FANCY_SLEEP("]...")
+ IF_FEATURE_FANCY_SLEEP("[") "N" IF_FEATURE_FANCY_SLEEP("]...")
#define sleep_full_usage "\n\n" \
- SKIP_FEATURE_FANCY_SLEEP("Pause for N seconds") \
- USE_FEATURE_FANCY_SLEEP( \
+ IF_NOT_FEATURE_FANCY_SLEEP("Pause for N seconds") \
+ IF_FEATURE_FANCY_SLEEP( \
"Pause for a time equal to the total of the args given, where each arg can\n" \
"have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays")
#define sleep_example_usage \
"$ sleep 2\n" \
"[2 second delay results]\n" \
- USE_FEATURE_FANCY_SLEEP( \
+ IF_FEATURE_FANCY_SLEEP( \
"$ sleep 1d 3h 22m 8s\n" \
"[98528 second delay results]\n")
#define sort_trivial_usage \
"[-nru" \
- USE_FEATURE_SORT_BIG("gMcszbdfimSTokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR") \
+ IF_FEATURE_SORT_BIG("gMcszbdfimSTokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR") \
"] [FILE]..."
#define sort_full_usage "\n\n" \
"Sort lines of text\n" \
"\nOptions:" \
- USE_FEATURE_SORT_BIG( \
+ IF_FEATURE_SORT_BIG( \
"\n -b Ignore leading blanks" \
"\n -c Check whether input is sorted" \
"\n -d Dictionary order (blank or alphanumeric only)" \
@@ -3874,17 +3874,17 @@
"\n -M Sort month" \
) \
"\n -n Sort numbers" \
- USE_FEATURE_SORT_BIG( \
+ IF_FEATURE_SORT_BIG( \
"\n -o Output to file" \
"\n -k Sort by key" \
"\n -t CHAR Key separator" \
) \
"\n -r Reverse sort order" \
- USE_FEATURE_SORT_BIG( \
+ IF_FEATURE_SORT_BIG( \
"\n -s Stable (don't sort ties alphabetically)" \
) \
"\n -u Suppress duplicate lines" \
- USE_FEATURE_SORT_BIG( \
+ IF_FEATURE_SORT_BIG( \
"\n -z Lines are terminated by NUL, not newline" \
"\n -mST Ignored for GNU compatibility") \
@@ -3896,7 +3896,7 @@
"d\n" \
"e\n" \
"f\n" \
- USE_FEATURE_SORT_BIG( \
+ IF_FEATURE_SORT_BIG( \
"$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n" \
"d 2\n" \
"b 2\n" \
@@ -3922,7 +3922,7 @@
"Search for matching processes, and then\n" \
"-K: stop all matching processes.\n" \
"-S: start a process unless a matching process is found.\n" \
- USE_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \
+ IF_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \
"\nProcess matching:" \
"\n -u,--user USERNAME|UID Match only this user's processes" \
"\n -n,--name NAME Match processes with NAME" \
@@ -3935,7 +3935,7 @@
"\n -x,--exec EXECUTABLE Program to run" \
"\n -a,--startas NAME Zeroth argument" \
"\n -b,--background Background" \
- USE_FEATURE_START_STOP_DAEMON_FANCY( \
+ IF_FEATURE_START_STOP_DAEMON_FANCY( \
"\n -N,--nicelevel N Change nice level" \
) \
"\n -c,--chuid USER[:[GRP]] Change to user/group" \
@@ -3944,13 +3944,13 @@
"\n -s,--signal SIG Signal to send" \
"\n -t,--test Match only, exit with 0 if a process is found" \
"\nOther:" \
- USE_FEATURE_START_STOP_DAEMON_FANCY( \
+ IF_FEATURE_START_STOP_DAEMON_FANCY( \
"\n -o,--oknodo Exit with status 0 if nothing is done" \
"\n -v,--verbose Verbose" \
) \
"\n -q,--quiet Quiet" \
) \
- SKIP_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \
+ IF_NOT_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \
"\nProcess matching:" \
"\n -u USERNAME|UID Match only this user's processes" \
"\n -n NAME Match processes with NAME" \
@@ -3963,7 +3963,7 @@
"\n -x EXECUTABLE Program to run" \
"\n -a NAME Zeroth argument" \
"\n -b Background" \
- USE_FEATURE_START_STOP_DAEMON_FANCY( \
+ IF_FEATURE_START_STOP_DAEMON_FANCY( \
"\n -N N Change nice level" \
) \
"\n -c USER[:[GRP]] Change to user/group" \
@@ -3972,7 +3972,7 @@
"\n -s SIG Signal to send" \
"\n -t Match only, exit with 0 if a process is found" \
"\nOther:" \
- USE_FEATURE_START_STOP_DAEMON_FANCY( \
+ IF_FEATURE_START_STOP_DAEMON_FANCY( \
"\n -o Exit with status 0 if nothing is done" \
"\n -v Verbose" \
) \
@@ -3984,16 +3984,16 @@
#define stat_full_usage "\n\n" \
"Display file (default) or filesystem status\n" \
"\nOptions:" \
- USE_FEATURE_STAT_FORMAT( \
+ IF_FEATURE_STAT_FORMAT( \
"\n -c fmt Use the specified format" \
) \
"\n -f Display filesystem status" \
"\n -L Dereference links" \
"\n -t Display info in terse form" \
- USE_SELINUX( \
+ IF_SELINUX( \
"\n -Z Print security context" \
) \
- USE_FEATURE_STAT_FORMAT( \
+ IF_FEATURE_STAT_FORMAT( \
"\n\nValid format sequences for files:\n" \
" %a Access rights in octal\n" \
" %A Access rights in human readable form\n" \
@@ -4027,7 +4027,7 @@
" %c Total file nodes in file system\n" \
" %d Free file nodes in file system\n" \
" %f Free blocks in file system\n" \
- USE_SELINUX( \
+ IF_SELINUX( \
" %C Security context in SELinux\n" \
) \
" %i File System ID in hex\n" \
@@ -4115,12 +4115,12 @@
"\n -a Stop swapping on all swap devices" \
#define swapon_trivial_usage \
- "[-a]" USE_FEATURE_SWAPON_PRI(" [-p pri]") " [DEVICE]"
+ "[-a]" IF_FEATURE_SWAPON_PRI(" [-p pri]") " [DEVICE]"
#define swapon_full_usage "\n\n" \
"Start swapping on DEVICE\n" \
"\nOptions:" \
"\n -a Start swapping on all swap devices" \
- USE_FEATURE_SWAPON_PRI( \
+ IF_FEATURE_SWAPON_PRI( \
"\n -p pri Set swap device priority" \
) \
@@ -4166,15 +4166,15 @@
"\n -O FILE Log to given file (default=/var/log/messages)" \
"\n -l n Set local log level" \
"\n -S Smaller logging output" \
- USE_FEATURE_ROTATE_LOGFILE( \
+ IF_FEATURE_ROTATE_LOGFILE( \
"\n -s SIZE Max size (KB) before rotate (default=200KB, 0=off)" \
"\n -b NUM Number of rotated logs to keep (default=1, max=99, 0=purge)") \
- USE_FEATURE_REMOTE_LOG( \
+ IF_FEATURE_REMOTE_LOG( \
"\n -R HOST[:PORT] Log to IP or hostname on PORT (default PORT=514/UDP)" \
"\n -L Log locally and via network (default is network only if -R)") \
- USE_FEATURE_SYSLOGD_DUP( \
+ IF_FEATURE_SYSLOGD_DUP( \
"\n -D Drop duplicates") \
- USE_FEATURE_IPC_SYSLOG( \
+ IF_FEATURE_IPC_SYSLOG( \
"\n -C[size(KiB)] Log to shared mem buffer (read it using logread)") \
/* NB: -Csize shouldn't have space (because size is optional) */
/* "\n -m MIN Minutes between MARK lines (default=20, 0=off)" */
@@ -4195,11 +4195,11 @@
"With more than one FILE, precede each with a header giving the\n" \
"file name. With no FILE, or when FILE is -, read standard input.\n" \
"\nOptions:" \
- USE_FEATURE_FANCY_TAIL( \
+ IF_FEATURE_FANCY_TAIL( \
"\n -c N[kbm] Output the last N bytes") \
"\n -n N[kbm] Print last N lines instead of last 10" \
"\n -f Output data as the file grows" \
- USE_FEATURE_FANCY_TAIL( \
+ IF_FEATURE_FANCY_TAIL( \
"\n -q Never output headers giving file names" \
"\n -s SEC Wait SEC seconds between reads with -f" \
"\n -v Always output headers giving file names" \
@@ -4213,35 +4213,35 @@
"nameserver 10.0.0.1\n"
#define tar_trivial_usage \
- "-[" USE_FEATURE_TAR_CREATE("c") USE_FEATURE_SEAMLESS_GZ("z") \
- USE_FEATURE_SEAMLESS_BZ2("j") USE_FEATURE_SEAMLESS_LZMA("a") \
- USE_FEATURE_SEAMLESS_Z("Z") "xtvO] " \
- USE_FEATURE_TAR_FROM("[-X FILE] ") \
+ "-[" IF_FEATURE_TAR_CREATE("c") IF_FEATURE_SEAMLESS_GZ("z") \
+ IF_FEATURE_SEAMLESS_BZ2("j") IF_FEATURE_SEAMLESS_LZMA("a") \
+ IF_FEATURE_SEAMLESS_Z("Z") "xtvO] " \
+ IF_FEATURE_TAR_FROM("[-X FILE] ") \
"[-f TARFILE] [-C DIR] [FILE(s)]..."
#define tar_full_usage "\n\n" \
"Create, extract, or list files from a tar file\n" \
"\nOptions:" \
- USE_FEATURE_TAR_CREATE( \
+ IF_FEATURE_TAR_CREATE( \
"\n c Create") \
"\n x Extract" \
"\n t List" \
"\nArchive format selection:" \
- USE_FEATURE_SEAMLESS_GZ( \
+ IF_FEATURE_SEAMLESS_GZ( \
"\n z Filter the archive through gzip" \
) \
- USE_FEATURE_SEAMLESS_BZ2( \
+ IF_FEATURE_SEAMLESS_BZ2( \
"\n j Filter the archive through bzip2" \
) \
- USE_FEATURE_SEAMLESS_LZMA( \
+ IF_FEATURE_SEAMLESS_LZMA( \
"\n a Filter the archive through lzma" \
) \
- USE_FEATURE_SEAMLESS_Z( \
+ IF_FEATURE_SEAMLESS_Z( \
"\n Z Filter the archive through compress" \
) \
"\nFile selection:" \
"\n f Name of TARFILE or \"-\" for stdin" \
"\n O Extract to stdout" \
- USE_FEATURE_TAR_FROM( \
+ IF_FEATURE_TAR_FROM( \
"\n exclude File to exclude" \
"\n X File with names to exclude" \
) \
@@ -4303,13 +4303,13 @@
"[OPTION]"
#define telnetd_full_usage "\n\n" \
"Handle incoming telnet connections" \
- SKIP_FEATURE_TELNETD_STANDALONE(" via inetd") "\n" \
+ IF_NOT_FEATURE_TELNETD_STANDALONE(" via inetd") "\n" \
"\nOptions:" \
"\n -l LOGIN Exec LOGIN on connect" \
"\n -f issue_file Display issue_file instead of /etc/issue" \
"\n -K Close connection as soon as login exits" \
"\n (normally wait until all programs close slave pty)" \
- USE_FEATURE_TELNETD_STANDALONE( \
+ IF_FEATURE_TELNETD_STANDALONE( \
"\n -p PORT Port to listen on" \
"\n -b ADDR Address to bind to" \
"\n -F Run in foreground" \
@@ -4343,11 +4343,11 @@
"OBJECT: {qdisc|class|filter}\n" \
"CMD: {add|del|change|replace|show}\n" \
"\n" \
- "qdisc [ handle QHANDLE ] [ root |"USE_FEATURE_TC_INGRESS(" ingress |")" parent CLASSID ]\n" \
+ "qdisc [ handle QHANDLE ] [ root |"IF_FEATURE_TC_INGRESS(" ingress |")" parent CLASSID ]\n" \
/* "\t[ estimator INTERVAL TIME_CONSTANT ]\n" */ \
"\t[ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \
"\tQDISC_KIND := { [p|b]fifo | tbf | prio | cbq | red | etc. }\n" \
- "qdisc show [ dev STRING ]"USE_FEATURE_TC_INGRESS(" [ingress]")"\n" \
+ "qdisc show [ dev STRING ]"IF_FEATURE_TC_INGRESS(" [ingress]")"\n" \
"class [ classid CLASSID ] [ root | parent CLASSID ]\n" \
"\t[ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \
"class show [ dev STRING ] [ root | parent CLASSID ]\n" \
@@ -4401,13 +4401,13 @@
"\nOptions:" \
"\n -l FILE Local FILE" \
"\n -r FILE Remote FILE" \
- USE_FEATURE_TFTP_GET( \
+ IF_FEATURE_TFTP_GET( \
"\n -g Get file" \
) \
- USE_FEATURE_TFTP_PUT( \
+ IF_FEATURE_TFTP_PUT( \
"\n -p Put file" \
) \
- USE_FEATURE_TFTP_BLOCKSIZE( \
+ IF_FEATURE_TFTP_BLOCKSIZE( \
"\n -b SIZE Transfer blocks of SIZE octets" \
)
@@ -4512,7 +4512,7 @@
""
#define tty_full_usage "\n\n" \
"Print file name of standard input's terminal" \
- USE_INCLUDE_SUSv2( "\n" \
+ IF_INCLUDE_SUSv2( "\n" \
"\nOptions:" \
"\n -s Print nothing, only return exit status" \
)
@@ -4526,14 +4526,14 @@
"Print dimension(s) of standard input's terminal, on error return 80x25"
#define tunctl_trivial_usage \
- "[-f device] ([-t name] | -d name)" USE_FEATURE_TUNCTL_UG(" [-u owner] [-g group] [-b]")
+ "[-f device] ([-t name] | -d name)" IF_FEATURE_TUNCTL_UG(" [-u owner] [-g group] [-b]")
#define tunctl_full_usage "\n\n" \
"Create or delete tun interfaces" \
"\nOptions:" \
"\n -f name tun device (/dev/net/tun)" \
"\n -t name Create iface 'name'" \
"\n -d name Delete iface 'name'" \
-USE_FEATURE_TUNCTL_UG( \
+IF_FEATURE_TUNCTL_UG( \
"\n -u owner Set iface owner" \
"\n -g group Set iface group" \
"\n -b Brief output" \
@@ -4554,9 +4554,9 @@ USE_FEATURE_TUNCTL_UG( \
#define udhcpc_trivial_usage \
"[-Cfbnqtvo] [-c CID] [-V VCLS] [-H HOSTNAME] [-i INTERFACE]\n" \
- " [-p pidfile] [-r IP] [-s script] [-O dhcp-option]..." USE_FEATURE_UDHCP_PORT(" [-P N]")
+ " [-p pidfile] [-r IP] [-s script] [-O dhcp-option]..." IF_FEATURE_UDHCP_PORT(" [-P N]")
#define udhcpc_full_usage "\n\n" \
- USE_GETOPT_LONG( \
+ IF_GETOPT_LONG( \
" -V,--vendorclass=CLASSID Vendor class identifier" \
"\n -i,--interface=INTERFACE Interface to use (default eth0)" \
"\n -H,-h,--hostname=HOSTNAME Client hostname" \
@@ -4578,14 +4578,14 @@ USE_FEATURE_TUNCTL_UG( \
"\n -n,--now Exit with failure if lease is not immediately obtained" \
"\n -q,--quit Quit after obtaining lease" \
"\n -R,--release Release IP on quit" \
- USE_FEATURE_UDHCP_PORT( \
+ IF_FEATURE_UDHCP_PORT( \
"\n -P,--client-port N Use port N instead of default 68" \
) \
- USE_FEATURE_UDHCPC_ARPING( \
+ IF_FEATURE_UDHCPC_ARPING( \
"\n -a,--arping Use arping to validate offered address" \
) \
) \
- SKIP_GETOPT_LONG( \
+ IF_NOT_GETOPT_LONG( \
" -V CLASSID Vendor class identifier" \
"\n -i INTERFACE Interface to use (default: eth0)" \
"\n -H,-h HOSTNAME Client hostname" \
@@ -4607,22 +4607,22 @@ USE_FEATURE_TUNCTL_UG( \
"\n -n Exit with failure if lease is not immediately obtained" \
"\n -q Quit after obtaining lease" \
"\n -R Release IP on quit" \
- USE_FEATURE_UDHCP_PORT( \
+ IF_FEATURE_UDHCP_PORT( \
"\n -P N Use port N instead of default 68" \
) \
- USE_FEATURE_UDHCPC_ARPING( \
+ IF_FEATURE_UDHCPC_ARPING( \
"\n -a Use arping to validate offered address" \
) \
)
#define udhcpd_trivial_usage \
- "[-fS]" USE_FEATURE_UDHCP_PORT(" [-P N]") " [configfile]" \
+ "[-fS]" IF_FEATURE_UDHCP_PORT(" [-P N]") " [configfile]" \
#define udhcpd_full_usage "\n\n" \
"DHCP server\n" \
"\n -f Run in foreground" \
"\n -S Log to syslog too" \
- USE_FEATURE_UDHCP_PORT( \
+ IF_FEATURE_UDHCP_PORT( \
"\n -P N Use port N instead of default 67" \
)
@@ -4631,16 +4631,16 @@ USE_FEATURE_TUNCTL_UG( \
#define umount_full_usage "\n\n" \
"Unmount file systems\n" \
"\nOptions:" \
- USE_FEATURE_UMOUNT_ALL( \
- "\n -a Unmount all file systems" USE_FEATURE_MTAB_SUPPORT(" in /etc/mtab") \
+ IF_FEATURE_UMOUNT_ALL( \
+ "\n -a Unmount all file systems" IF_FEATURE_MTAB_SUPPORT(" in /etc/mtab") \
) \
- USE_FEATURE_MTAB_SUPPORT( \
+ IF_FEATURE_MTAB_SUPPORT( \
"\n -n Don't erase /etc/mtab entries" \
) \
"\n -r Try to remount devices as read-only if mount is busy" \
"\n -l Lazy umount (detach filesystem)" \
"\n -f Force umount (i.e., unreachable NFS server)" \
- USE_FEATURE_MOUNT_LOOP( \
+ IF_FEATURE_MOUNT_LOOP( \
"\n -d Free loop device if it has been used" \
)
@@ -4677,12 +4677,12 @@ USE_FEATURE_TUNCTL_UG( \
#define unexpand_full_usage "\n\n" \
"Convert spaces to tabs, writing to standard output.\n" \
"\nOptions:" \
- USE_FEATURE_UNEXPAND_LONG_OPTIONS( \
+ IF_FEATURE_UNEXPAND_LONG_OPTIONS( \
"\n -a,--all Convert all blanks" \
"\n -f,--first-only Convert only leading blanks" \
"\n -t,--tabs=N Tabstops every N chars" \
) \
- SKIP_FEATURE_UNEXPAND_LONG_OPTIONS( \
+ IF_NOT_FEATURE_UNEXPAND_LONG_OPTIONS( \
"\n -a Convert all blanks" \
"\n -f Convert only leading blanks" \
"\n -t N Tabstops every N chars" \
@@ -4788,9 +4788,9 @@ USE_FEATURE_TUNCTL_UG( \
#define vi_full_usage "\n\n" \
"Edit FILE\n" \
"\nOptions:" \
- USE_FEATURE_VI_COLON( \
+ IF_FEATURE_VI_COLON( \
"\n -c Initial command to run ($EXINIT also available)") \
- USE_FEATURE_VI_READONLY( \
+ IF_FEATURE_VI_READONLY( \
"\n -R Read-only - do not write to the file") \
"\n -H Short help regarding available features" \
@@ -4842,12 +4842,12 @@ USE_FEATURE_TUNCTL_UG( \
" 31 46 1365 /etc/passwd\n"
#define wget_trivial_usage \
- USE_FEATURE_WGET_LONG_OPTIONS( \
+ IF_FEATURE_WGET_LONG_OPTIONS( \
"[-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document file]\n" \
" [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n" \
" [-U|--user-agent agent] url" \
) \
- SKIP_FEATURE_WGET_LONG_OPTIONS( \
+ IF_NOT_FEATURE_WGET_LONG_OPTIONS( \
"[-csq] [-O file] [-Y on/off] [-P DIR] [-U agent] url" \
)
#define wget_full_usage "\n\n" \
@@ -4886,16 +4886,16 @@ USE_FEATURE_TUNCTL_UG( \
#define xargs_full_usage "\n\n" \
"Execute COMMAND on every item given by standard input\n" \
"\nOptions:" \
- USE_FEATURE_XARGS_SUPPORT_CONFIRMATION( \
+ IF_FEATURE_XARGS_SUPPORT_CONFIRMATION( \
"\n -p Ask user whether to run each command") \
"\n -r Do not run command if input is empty" \
- USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( \
+ IF_FEATURE_XARGS_SUPPORT_ZERO_TERM( \
"\n -0 Input is separated by NUL characters") \
"\n -t Print the command on stderr before execution" \
"\n -e[STR] STR stops input processing" \
"\n -n N Pass no more than N args to COMMAND" \
"\n -s N Pass command line of no more than N bytes" \
- USE_FEATURE_XARGS_SUPPORT_TERMOPT( \
+ IF_FEATURE_XARGS_SUPPORT_TERMOPT( \
"\n -x Exit if size is exceeded") \
#define xargs_example_usage \
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 80380ae..8f3729f 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -55,8 +55,8 @@ static const char usage_messages[] ALIGN1 = ""
#ifdef SINGLE_APPLET_MAIN
#undef ENABLE_FEATURE_INDIVIDUAL
#define ENABLE_FEATURE_INDIVIDUAL 1
-#undef USE_FEATURE_INDIVIDUAL
-#define USE_FEATURE_INDIVIDUAL(...) __VA_ARGS__
+#undef IF_FEATURE_INDIVIDUAL
+#define IF_FEATURE_INDIVIDUAL(...) __VA_ARGS__
#endif
@@ -179,10 +179,10 @@ int FAST_FUNC find_applet_by_name(const char *name)
void lbb_prepare(const char *applet
- USE_FEATURE_INDIVIDUAL(, char **argv))
+ IF_FEATURE_INDIVIDUAL(, char **argv))
MAIN_EXTERNALLY_VISIBLE;
void lbb_prepare(const char *applet
- USE_FEATURE_INDIVIDUAL(, char **argv))
+ IF_FEATURE_INDIVIDUAL(, char **argv))
{
#ifdef __GLIBC__
(*(int **)&bb_errno) = __errno_location();
@@ -224,7 +224,7 @@ bool re_execed;
/* If not built as a single-applet executable... */
#if !defined(SINGLE_APPLET_MAIN)
-USE_FEATURE_SUID(static uid_t ruid;) /* real uid */
+IF_FEATURE_SUID(static uid_t ruid;) /* real uid */
#if ENABLE_FEATURE_SUID_CONFIG
@@ -500,7 +500,7 @@ static void parse_config_file(void)
#else
static inline void parse_config_file(void)
{
- USE_FEATURE_SUID(ruid = getuid();)
+ IF_FEATURE_SUID(ruid = getuid();)
}
#endif /* FEATURE_SUID_CONFIG */
@@ -754,10 +754,10 @@ int main(int argc UNUSED_PARAM, char **argv)
#if defined(SINGLE_APPLET_MAIN)
/* Only one applet is selected by the user! */
/* applet_names in this case is just "applet\0\0" */
- lbb_prepare(applet_names USE_FEATURE_INDIVIDUAL(, argv));
+ lbb_prepare(applet_names IF_FEATURE_INDIVIDUAL(, argv));
return SINGLE_APPLET_MAIN(argc, argv);
#else
- lbb_prepare("busybox" USE_FEATURE_INDIVIDUAL(, argv));
+ lbb_prepare("busybox" IF_FEATURE_INDIVIDUAL(, argv));
#if !BB_MMU
/* NOMMU re-exec trick sets high-order bit in first byte of name */
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 7bcdb95..e0ab732 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -62,10 +62,10 @@
#define ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR \
(ENABLE_FEATURE_USERNAME_COMPLETION || ENABLE_FEATURE_EDITING_FANCY_PROMPT)
-#define USE_FEATURE_GETUSERNAME_AND_HOMEDIR(...)
+#define IF_FEATURE_GETUSERNAME_AND_HOMEDIR(...)
#if ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR
-#undef USE_FEATURE_GETUSERNAME_AND_HOMEDIR
-#define USE_FEATURE_GETUSERNAME_AND_HOMEDIR(...) __VA_ARGS__
+#undef IF_FEATURE_GETUSERNAME_AND_HOMEDIR
+#define IF_FEATURE_GETUSERNAME_AND_HOMEDIR(...) __VA_ARGS__
#endif
enum {
@@ -152,8 +152,8 @@ extern struct lineedit_statics *const lineedit_ptr_to_statics;
(*(struct lineedit_statics**)&lineedit_ptr_to_statics) = xzalloc(sizeof(S)); \
barrier(); \
cmdedit_termw = 80; \
- USE_FEATURE_EDITING_FANCY_PROMPT(num_ok_lines = 1;) \
- USE_FEATURE_GETUSERNAME_AND_HOMEDIR(home_pwd_buf = (char*)null_str;) \
+ IF_FEATURE_EDITING_FANCY_PROMPT(num_ok_lines = 1;) \
+ IF_FEATURE_GETUSERNAME_AND_HOMEDIR(home_pwd_buf = (char*)null_str;) \
} while (0)
static void deinit_S(void)
{
@@ -1160,7 +1160,7 @@ static void remember_in_history(char *str)
if ((state->flags & SAVE_HISTORY) && state->hist_file)
save_history(str);
#endif
- USE_FEATURE_EDITING_FANCY_PROMPT(num_ok_lines++;)
+ IF_FEATURE_EDITING_FANCY_PROMPT(num_ok_lines++;)
}
#else /* MAX_HISTORY == 0 */
@@ -1442,7 +1442,7 @@ static void win_changed(int nsig)
/* leave out the "vi-mode"-only case labels if vi editing isn't
* configured. */
-#define vi_case(caselabel) USE_FEATURE_EDITING(case caselabel)
+#define vi_case(caselabel) IF_FEATURE_EDITING(case caselabel)
/* convert uppercase ascii to equivalent control char, for readability */
#undef CTRL
diff --git a/libbb/mtab_file.c b/libbb/mtab_file.c
index 030b148..c9d9a69 100644
--- a/libbb/mtab_file.c
+++ b/libbb/mtab_file.c
@@ -12,4 +12,4 @@
/* Busybox mount uses either /proc/mounts or /etc/mtab to
* get the list of currently mounted filesystems */
const char bb_path_mtab_file[] ALIGN1 =
-USE_FEATURE_MTAB_SUPPORT("/etc/mtab")SKIP_FEATURE_MTAB_SUPPORT("/proc/mounts");
+IF_FEATURE_MTAB_SUPPORT("/etc/mtab")IF_NOT_FEATURE_MTAB_SUPPORT("/proc/mounts");
diff --git a/libbb/procps.c b/libbb/procps.c
index c5e40bf..445e709 100644
--- a/libbb/procps.c
+++ b/libbb/procps.c
@@ -111,7 +111,7 @@ void FAST_FUNC free_procps_scan(procps_status_t* sp)
{
closedir(sp->dir);
free(sp->argv0);
- USE_SELINUX(free(sp->context);)
+ IF_SELINUX(free(sp->context);)
free(sp);
}
diff --git a/libbb/read.c b/libbb/read.c
index 37503e8..a0c0cc6 100644
--- a/libbb/read.c
+++ b/libbb/read.c
@@ -315,7 +315,7 @@ int FAST_FUNC open_zipped(const char *fname)
char *sfx;
int fd;
#if BB_MMU
- USE_DESKTOP(long long) int FAST_FUNC (*xformer)(int src_fd, int dst_fd);
+ IF_DESKTOP(long long) int FAST_FUNC (*xformer)(int src_fd, int dst_fd);
enum { xformer_prog = 0 };
#else
enum { xformer = 0 };
@@ -352,7 +352,7 @@ int FAST_FUNC open_zipped(const char *fname)
|| magic[0] != 'B' || magic[1] != 'Z'
) {
bb_error_msg_and_die("no gzip"
- USE_FEATURE_SEAMLESS_BZ2("/bzip2")
+ IF_FEATURE_SEAMLESS_BZ2("/bzip2")
" magic");
}
#if BB_MMU
diff --git a/libbb/xconnect.c b/libbb/xconnect.c
index f5d7983..1b4f4f7 100644
--- a/libbb/xconnect.c
+++ b/libbb/xconnect.c
@@ -151,7 +151,7 @@ void FAST_FUNC set_nport(len_and_sockaddr *lsa, unsigned port)
* port: if neither of above specifies port # */
static len_and_sockaddr* str2sockaddr(
const char *host, int port,
-USE_FEATURE_IPV6(sa_family_t af,)
+IF_FEATURE_IPV6(sa_family_t af,)
int ai_flags)
{
int rc;
@@ -269,9 +269,9 @@ len_and_sockaddr* FAST_FUNC xdotted2sockaddr(const char *host, int port)
}
#undef xsocket_type
-int FAST_FUNC xsocket_type(len_and_sockaddr **lsap, USE_FEATURE_IPV6(int family,) int sock_type)
+int FAST_FUNC xsocket_type(len_and_sockaddr **lsap, IF_FEATURE_IPV6(int family,) int sock_type)
{
- SKIP_FEATURE_IPV6(enum { family = AF_INET };)
+ IF_NOT_FEATURE_IPV6(enum { family = AF_INET };)
len_and_sockaddr *lsa;
int fd;
int len;
@@ -303,7 +303,7 @@ int FAST_FUNC xsocket_type(len_and_sockaddr **lsap, USE_FEATURE_IPV6(int family,
int FAST_FUNC xsocket_stream(len_and_sockaddr **lsap)
{
- return xsocket_type(lsap, USE_FEATURE_IPV6(AF_UNSPEC,) SOCK_STREAM);
+ return xsocket_type(lsap, IF_FEATURE_IPV6(AF_UNSPEC,) SOCK_STREAM);
}
static int create_and_bind_or_die(const char *bindaddr, int port, int sock_type)
@@ -316,7 +316,7 @@ static int create_and_bind_or_die(const char *bindaddr, int port, int sock_type)
/* user specified bind addr dictates family */
fd = xsocket(lsa->u.sa.sa_family, sock_type, 0);
} else {
- fd = xsocket_type(&lsa, USE_FEATURE_IPV6(AF_UNSPEC,) sock_type);
+ fd = xsocket_type(&lsa, IF_FEATURE_IPV6(AF_UNSPEC,) sock_type);
set_nport(lsa, htons(port));
}
setsockopt_reuseaddr(fd);
diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c
index 6d0fa6e..5f56b36 100644
--- a/libbb/xfuncs_printf.c
+++ b/libbb/xfuncs_printf.c
@@ -420,7 +420,7 @@ int FAST_FUNC xsocket(int domain, int type, int protocol)
const char *s = "INET";
if (domain == AF_PACKET) s = "PACKET";
if (domain == AF_NETLINK) s = "NETLINK";
-USE_FEATURE_IPV6(if (domain == AF_INET6) s = "INET6";)
+IF_FEATURE_IPV6(if (domain == AF_INET6) s = "INET6";)
bb_perror_msg_and_die("socket(AF_%s)", s);
#else
bb_perror_msg_and_die("socket");
diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c
index 4bffbe8..68b3980 100644
--- a/loginutils/chpasswd.c
+++ b/loginutils/chpasswd.c
@@ -29,7 +29,7 @@ int chpasswd_main(int argc UNUSED_PARAM, char **argv)
bb_error_msg_and_die(bb_msg_perm_denied_are_you_root);
opt_complementary = "m--e:e--m";
- USE_GETOPT_LONG(applet_long_options = chpasswd_longopts;)
+ IF_GETOPT_LONG(applet_long_options = chpasswd_longopts;)
opt = getopt32(argv, "em");
while ((name = xmalloc_fgetline(stdin)) != NULL) {
diff --git a/loginutils/login.c b/loginutils/login.c
index d57d529..31b25a4 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -285,8 +285,8 @@ int login_main(int argc UNUSED_PARAM, char **argv)
char *opt_host = opt_host; /* for compiler */
char *opt_user = opt_user; /* for compiler */
char *full_tty;
- USE_SELINUX(security_context_t user_sid = NULL;)
- USE_FEATURE_UTMP(struct utmp utent;)
+ IF_SELINUX(security_context_t user_sid = NULL;)
+ IF_FEATURE_UTMP(struct utmp utent;)
#if ENABLE_PAM
int pamret;
pam_handle_t *pamh;
@@ -333,7 +333,7 @@ int login_main(int argc UNUSED_PARAM, char **argv)
read_or_build_utent(&utent, run_by_root);
if (opt & LOGIN_OPT_h) {
- USE_FEATURE_UTMP(safe_strncpy(utent.ut_host, opt_host, sizeof(utent.ut_host));)
+ IF_FEATURE_UTMP(safe_strncpy(utent.ut_host, opt_host, sizeof(utent.ut_host));)
fromhost = xasprintf(" on '%s' from '%s'", short_tty, opt_host);
} else {
fromhost = xasprintf(" on '%s'", short_tty);
@@ -457,7 +457,7 @@ int login_main(int argc UNUSED_PARAM, char **argv)
write_utent(&utent, username);
- USE_SELINUX(initselinux(username, full_tty, &user_sid));
+ IF_SELINUX(initselinux(username, full_tty, &user_sid));
/* Try these, but don't complain if they fail.
* _f_chown is safe wrt race t=ttyname(0);...;chown(t); */
@@ -482,7 +482,7 @@ int login_main(int argc UNUSED_PARAM, char **argv)
/* well, a simple setexeccon() here would do the job as well,
* but let's play the game for now */
- USE_SELINUX(set_current_security_context(user_sid);)
+ IF_SELINUX(set_current_security_context(user_sid);)
// util-linux login also does:
// /* start new session */
diff --git a/loginutils/su.c b/loginutils/su.c
index de8c18d..a8b852b 100644
--- a/loginutils/su.c
+++ b/loginutils/su.c
@@ -43,7 +43,7 @@ int su_main(int argc UNUSED_PARAM, char **argv)
the user, especially if someone su's from a su-shell.
But getlogin can fail -- usually due to lack of utmp entry.
in this case resort to getpwuid. */
- old_user = xstrdup(USE_FEATURE_UTMP(getlogin() ? : ) (pw = getpwuid(cur_uid)) ? pw->pw_name : "");
+ old_user = xstrdup(IF_FEATURE_UTMP(getlogin() ? : ) (pw = getpwuid(cur_uid)) ? pw->pw_name : "");
tty = xmalloc_ttyname(2) ? : "none";
openlog(applet_name, 0, LOG_AUTH);
}
@@ -91,7 +91,7 @@ int su_main(int argc UNUSED_PARAM, char **argv)
change_identity(pw);
/* setup_environment params: shell, clear_env, change_env, pw */
setup_environment(opt_shell, flags & SU_OPT_l, !(flags & SU_OPT_mp), pw);
- USE_SELINUX(set_current_security_context(NULL);)
+ IF_SELINUX(set_current_security_context(NULL);)
/* Never returns */
run_shell(opt_shell, flags & SU_OPT_l, opt_command, (const char**)argv);
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c
index 4ffefe9..77eff9f 100644
--- a/loginutils/sulogin.c
+++ b/loginutils/sulogin.c
@@ -99,7 +99,7 @@ int sulogin_main(int argc UNUSED_PARAM, char **argv)
bb_info_msg("System Maintenance Mode");
- USE_SELINUX(renew_current_security_context());
+ IF_SELINUX(renew_current_security_context());
shell = getenv("SUSHELL");
if (!shell)
diff --git a/mailutils/mime.c b/mailutils/mime.c
index bda727b..d309d7f 100644
--- a/mailutils/mime.c
+++ b/mailutils/mime.c
@@ -341,11 +341,11 @@ int reformime_main(int argc UNUSED_PARAM, char **argv)
// parse options
// N.B. only -x and -X are supported so far
- opt_complementary = "x--X:X--x" USE_FEATURE_REFORMIME_COMPAT(":m::");
+ opt_complementary = "x--X:X--x" IF_FEATURE_REFORMIME_COMPAT(":m::");
opts = getopt32(argv,
- "x:X" USE_FEATURE_REFORMIME_COMPAT("deis:r:c:m:h:o:O:"),
+ "x:X" IF_FEATURE_REFORMIME_COMPAT("deis:r:c:m:h:o:O:"),
&opt_prefix
- USE_FEATURE_REFORMIME_COMPAT(, NULL, NULL, &G.opt_charset, NULL, NULL, NULL, NULL)
+ IF_FEATURE_REFORMIME_COMPAT(, NULL, NULL, &G.opt_charset, NULL, NULL, NULL, NULL)
);
//argc -= optind;
argv += optind;
diff --git a/mailutils/popmaildir.c b/mailutils/popmaildir.c
index 1a72b87..ab9ddba 100644
--- a/mailutils/popmaildir.c
+++ b/mailutils/popmaildir.c
@@ -73,9 +73,9 @@ int popmaildir_main(int argc UNUSED_PARAM, char **argv)
// parse options
opt_complementary = "-1:dd:t+:R+:L+:H+";
opts = getopt32(argv,
- "bdmVcasTkt:" "R:Z:L:H:" USE_FEATURE_POPMAILDIR_DELIVERY("M:F:"),
+ "bdmVcasTkt:" "R:Z:L:H:" IF_FEATURE_POPMAILDIR_DELIVERY("M:F:"),
&timeout, NULL, NULL, NULL, &opt_nlines
- USE_FEATURE_POPMAILDIR_DELIVERY(, &delivery, &delivery) // we treat -M and -F the same
+ IF_FEATURE_POPMAILDIR_DELIVERY(, &delivery, &delivery) // we treat -M and -F the same
);
//argc -= optind;
argv += optind;
diff --git a/miscutils/crond.c b/miscutils/crond.c
index 804fe0b..f0b64fe 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -162,11 +162,11 @@ int crond_main(int argc UNUSED_PARAM, char **argv)
INIT_G();
/* "-b after -f is ignored", and so on for every pair a-b */
- opt_complementary = "f-b:b-f:S-L:L-S" USE_FEATURE_CROND_D(":d-l")
+ opt_complementary = "f-b:b-f:S-L:L-S" IF_FEATURE_CROND_D(":d-l")
":l+:d+"; /* -l and -d have numeric param */
- opt = getopt32(argv, "l:L:fbSc:" USE_FEATURE_CROND_D("d:"),
+ opt = getopt32(argv, "l:L:fbSc:" IF_FEATURE_CROND_D("d:"),
&LogLevel, &LogFile, &CDir
- USE_FEATURE_CROND_D(,&LogLevel));
+ IF_FEATURE_CROND_D(,&LogLevel));
/* both -d N and -l N set the same variable: LogLevel */
if (!(opt & OPT_f)) {
diff --git a/miscutils/eject.c b/miscutils/eject.c
index ff3976e..94a36c0 100644
--- a/miscutils/eject.c
+++ b/miscutils/eject.c
@@ -89,7 +89,7 @@ int eject_main(int argc UNUSED_PARAM, char **argv)
const char *device;
opt_complementary = "?1:t--T:T--t";
- flags = getopt32(argv, "tT" USE_FEATURE_EJECT_SCSI("s"));
+ flags = getopt32(argv, "tT" IF_FEATURE_EJECT_SCSI("s"));
device = argv[optind] ? argv[optind] : "/dev/cdrom";
/* We used to do "umount <device>" here, but it was buggy
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index de5d68a..f963888 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -293,15 +293,15 @@ struct globals {
unsigned long doorlock;
unsigned long apmmode;
#endif
- USE_FEATURE_HDPARM_GET_IDENTITY( smallint get_IDentity;)
- USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( smallint set_busstate, get_busstate;)
- USE_FEATURE_HDPARM_HDIO_DRIVE_RESET( smallint perform_reset;)
- USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( smallint perform_tristate;)
- USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF(smallint unregister_hwif;)
- USE_FEATURE_HDPARM_HDIO_SCAN_HWIF( smallint scan_hwif;)
- USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( unsigned long busstate;)
- USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( unsigned long tristate;)
- USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF(unsigned long hwif;)
+ IF_FEATURE_HDPARM_GET_IDENTITY( smallint get_IDentity;)
+ IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( smallint set_busstate, get_busstate;)
+ IF_FEATURE_HDPARM_HDIO_DRIVE_RESET( smallint perform_reset;)
+ IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( smallint perform_tristate;)
+ IF_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF(smallint unregister_hwif;)
+ IF_FEATURE_HDPARM_HDIO_SCAN_HWIF( smallint scan_hwif;)
+ IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( unsigned long busstate;)
+ IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( unsigned long tristate;)
+ IF_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF(unsigned long hwif;)
#if ENABLE_FEATURE_HDPARM_HDIO_SCAN_HWIF
unsigned long hwif_data;
unsigned long hwif_ctrl;
@@ -1960,12 +1960,12 @@ static void parse_xfermode(int flag, smallint *get, smallint *set, int *value)
/*------- getopt short options --------*/
static const char hdparm_options[] ALIGN1 =
"gfu::n::p:r::m::c::k::a::B:tT"
- USE_FEATURE_HDPARM_GET_IDENTITY("iI")
- USE_FEATURE_HDPARM_HDIO_GETSET_DMA("d::")
+ IF_FEATURE_HDPARM_GET_IDENTITY("iI")
+ IF_FEATURE_HDPARM_HDIO_GETSET_DMA("d::")
#ifdef HDIO_DRIVE_CMD
"S:D:P:X:K:A:L:W:CyYzZ"
#endif
- USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF("U:")
+ IF_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF("U:")
#ifdef HDIO_GET_QDMA
#ifdef HDIO_SET_QDMA
"Q:"
@@ -1973,9 +1973,9 @@ static const char hdparm_options[] ALIGN1 =
"Q"
#endif
#endif
- USE_FEATURE_HDPARM_HDIO_DRIVE_RESET("w")
- USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF("x::b:")
- USE_FEATURE_HDPARM_HDIO_SCAN_HWIF("R:");
+ IF_FEATURE_HDPARM_HDIO_DRIVE_RESET("w")
+ IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF("x::b:")
+ IF_FEATURE_HDPARM_HDIO_SCAN_HWIF("R:");
/*-------------------------------------*/
/* our main() routine: */
@@ -1987,12 +1987,12 @@ int hdparm_main(int argc, char **argv)
while ((c = getopt(argc, argv, hdparm_options)) >= 0) {
flagcount++;
- USE_FEATURE_HDPARM_GET_IDENTITY(get_IDentity |= (c == 'I'));
- USE_FEATURE_HDPARM_GET_IDENTITY(get_identity |= (c == 'i'));
+ IF_FEATURE_HDPARM_GET_IDENTITY(get_IDentity |= (c == 'I'));
+ IF_FEATURE_HDPARM_GET_IDENTITY(get_identity |= (c == 'i'));
get_geom |= (c == 'g');
do_flush |= (c == 'f');
if (c == 'u') parse_opts(&get_unmask, &set_unmask, &unmask, 0, 1);
- USE_FEATURE_HDPARM_HDIO_GETSET_DMA(if (c == 'd') parse_opts(&get_dma, &set_dma, &dma, 0, 9));
+ IF_FEATURE_HDPARM_HDIO_GETSET_DMA(if (c == 'd') parse_opts(&get_dma, &set_dma, &dma, 0, 9));
if (c == 'n') parse_opts(&get_nowerr, &set_nowerr, &nowerr, 0, 1);
parse_xfermode((c == 'p'), &noisy_piomode, &set_piomode, &piomode);
if (c == 'r') parse_opts(&get_readonly, &set_readonly, &readonly, 0, 1);
@@ -2018,7 +2018,7 @@ int hdparm_main(int argc, char **argv)
reread_partn |= (c == 'z');
get_seagate = set_seagate |= (c == 'Z');
#endif
- USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF(if (c == 'U') parse_opts(NULL, &unregister_hwif, &hwif, 0, INT_MAX));
+ IF_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF(if (c == 'U') parse_opts(NULL, &unregister_hwif, &hwif, 0, INT_MAX));
#ifdef HDIO_GET_QDMA
if (c == 'Q') {
#ifdef HDIO_SET_QDMA
@@ -2028,9 +2028,9 @@ int hdparm_main(int argc, char **argv)
#endif
}
#endif
- USE_FEATURE_HDPARM_HDIO_DRIVE_RESET(perform_reset = (c == 'r'));
- USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF(if (c == 'x') parse_opts(NULL, &perform_tristate, &tristate, 0, 1));
- USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF(if (c == 'b') parse_opts(&get_busstate, &set_busstate, &busstate, 0, 2));
+ IF_FEATURE_HDPARM_HDIO_DRIVE_RESET(perform_reset = (c == 'r'));
+ IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF(if (c == 'x') parse_opts(NULL, &perform_tristate, &tristate, 0, 1));
+ IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF(if (c == 'b') parse_opts(&get_busstate, &set_busstate, &busstate, 0, 2));
#if ENABLE_FEATURE_HDPARM_HDIO_SCAN_HWIF
if (c == 'R') {
parse_opts(NULL, &scan_hwif, &hwif_data, 0, INT_MAX);
@@ -2045,7 +2045,7 @@ int hdparm_main(int argc, char **argv)
/* When no flags are given (flagcount = 0), -acdgkmnru is assumed. */
if (!flagcount) {
get_mult = get_io32bit = get_unmask = get_keep = get_readonly = get_readahead = get_geom = 1;
- USE_FEATURE_HDPARM_HDIO_GETSET_DMA(get_dma = 1);
+ IF_FEATURE_HDPARM_HDIO_GETSET_DMA(get_dma = 1);
}
argv += optind;
diff --git a/miscutils/less.c b/miscutils/less.c
index 27855bb..702c4a8 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -145,7 +145,7 @@ struct globals {
current_file = 1; \
eof_error = 1; \
terminated = 1; \
- USE_FEATURE_LESS_REGEXP(wanted_match = -1;) \
+ IF_FEATURE_LESS_REGEXP(wanted_match = -1;) \
} while (0)
/* flines[] are lines read from stdin, each in malloc'ed buffer.
@@ -326,7 +326,7 @@ static void read_lines(void)
if (option_mask32 & FLAG_N)
w -= 8;
- USE_FEATURE_LESS_REGEXP(again0:)
+ IF_FEATURE_LESS_REGEXP(again0:)
p = current_line = ((char*)xmalloc(w + 4)) + 4;
max_fline += last_terminated;
@@ -1509,7 +1509,7 @@ int less_main(int argc, char **argv)
/* TODO: -x: do not interpret backspace, -xx: tab also */
/* -xxx: newline also */
/* -w N: assume width N (-xxx -w 32: hex viewer of sorts) */
- getopt32(argv, "EMmN~I" USE_FEATURE_LESS_DASHCMD("S"));
+ getopt32(argv, "EMmN~I" IF_FEATURE_LESS_DASHCMD("S"));
argc -= optind;
argv += optind;
num_files = argc;
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 90ed87a..c4fb927 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -24,7 +24,7 @@ int insmod_main(int argc UNUSED_PARAM, char **argv)
* or in $MODPATH.
*/
- USE_FEATURE_2_4_MODULES(
+ IF_FEATURE_2_4_MODULES(
getopt32(argv, INSMOD_OPTS INSMOD_ARGS);
argv += optind - 1;
);
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c
index 6eb950f..3fd7bf5 100644
--- a/modutils/modprobe-small.c
+++ b/modutils/modprobe-small.c
@@ -679,7 +679,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
{
struct utsname uts;
char applet0 = applet_name[0];
- USE_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(char *options;)
+ IF_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(char *options;)
/* are we lsmod? -> just dump /proc/modules */
if ('l' == applet0) {
@@ -773,8 +773,8 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
len = MAXINT(ssize_t);
map = xmalloc_xopen_read_close(*argv, &len);
if (init_module(map, len,
- USE_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(options ? options : "")
- SKIP_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE("")
+ IF_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(options ? options : "")
+ IF_NOT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE("")
) != 0)
bb_error_msg_and_die("can't insert '%s': %s",
*argv, moderror(errno));
@@ -791,7 +791,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
} while (*argv);
if (ENABLE_FEATURE_CLEAN_UP) {
- USE_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(free(options);)
+ IF_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(free(options);)
}
return EXIT_SUCCESS;
}
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index 218a898..3474964 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -33,7 +33,7 @@ struct module_entry { /* I'll call it ME. */
llist_t *deps; /* strings. modules we depend on */
};
-#define MODPROBE_OPTS "acdlnrt:VC:" USE_FEATURE_MODPROBE_BLACKLIST("b")
+#define MODPROBE_OPTS "acdlnrt:VC:" IF_FEATURE_MODPROBE_BLACKLIST("b")
enum {
MODPROBE_OPT_INSERT_ALL = (INSMOD_OPT_UNUSED << 0), /* a */
MODPROBE_OPT_DUMP_ONLY = (INSMOD_OPT_UNUSED << 1), /* c */
diff --git a/modutils/modutils.h b/modutils/modutils.h
index 5104f1b..8cca5cc 100644
--- a/modutils/modutils.h
+++ b/modutils/modutils.h
@@ -26,10 +26,10 @@ char *parse_cmdline_module_options(char **argv) FAST_FUNC;
#define INSMOD_OPTS \
"vq" \
- USE_FEATURE_2_4_MODULES("sLo:fkx") \
- USE_FEATURE_INSMOD_LOAD_MAP("m")
+ IF_FEATURE_2_4_MODULES("sLo:fkx") \
+ IF_FEATURE_INSMOD_LOAD_MAP("m")
-#define INSMOD_ARGS USE_FEATURE_2_4_MODULES(, NULL)
+#define INSMOD_ARGS IF_FEATURE_2_4_MODULES(, NULL)
enum {
INSMOD_OPT_VERBOSE = 0x0001,
diff --git a/networking/brctl.c b/networking/brctl.c
index 1b52689..57074cd 100644
--- a/networking/brctl.c
+++ b/networking/brctl.c
@@ -99,20 +99,20 @@ int brctl_main(int argc UNUSED_PARAM, char **argv)
{
static const char keywords[] ALIGN1 =
"addbr\0" "delbr\0" "addif\0" "delif\0"
- USE_FEATURE_BRCTL_FANCY(
+ IF_FEATURE_BRCTL_FANCY(
"stp\0"
"setageing\0" "setfd\0" "sethello\0" "setmaxage\0"
"setpathcost\0" "setportprio\0" "setbridgeprio\0"
)
- USE_FEATURE_BRCTL_SHOW("showmacs\0" "show\0");
+ IF_FEATURE_BRCTL_SHOW("showmacs\0" "show\0");
enum { ARG_addbr = 0, ARG_delbr, ARG_addif, ARG_delif
- USE_FEATURE_BRCTL_FANCY(,
+ IF_FEATURE_BRCTL_FANCY(,
ARG_stp,
ARG_setageing, ARG_setfd, ARG_sethello, ARG_setmaxage,
ARG_setpathcost, ARG_setportprio, ARG_setbridgeprio
)
- USE_FEATURE_BRCTL_SHOW(, ARG_showmacs, ARG_show)
+ IF_FEATURE_BRCTL_SHOW(, ARG_showmacs, ARG_show)
};
int fd;
diff --git a/networking/ftpd.c b/networking/ftpd.c
index ac68961..2ec67df 100644
--- a/networking/ftpd.c
+++ b/networking/ftpd.c
@@ -1103,9 +1103,9 @@ int ftpd_main(int argc UNUSED_PARAM, char **argv)
G.timeout = 2 * 60;
opt_complementary = "t+:T+:vv";
#if BB_MMU
- opts = getopt32(argv, "vS" USE_FEATURE_FTP_WRITE("w") "t:T:", &G.timeout, &abs_timeout, &G.verbose);
+ opts = getopt32(argv, "vS" IF_FEATURE_FTP_WRITE("w") "t:T:", &G.timeout, &abs_timeout, &G.verbose);
#else
- opts = getopt32(argv, "l1vS" USE_FEATURE_FTP_WRITE("w") "t:T:", &G.timeout, &abs_timeout, &G.verbose);
+ opts = getopt32(argv, "l1vS" IF_FEATURE_FTP_WRITE("w") "t:T:", &G.timeout, &abs_timeout, &G.verbose);
if (opts & (OPT_l|OPT_1)) {
/* Our secret backdoor to ls */
/* TODO: pass -n too? */
diff --git a/networking/httpd.c b/networking/httpd.c
index 6bf103c..803a98b 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -250,13 +250,13 @@ struct globals {
const char *found_moved_temporarily;
Htaccess_IP *ip_a_d; /* config allow/deny lines */
- USE_FEATURE_HTTPD_BASIC_AUTH(const char *g_realm;)
- USE_FEATURE_HTTPD_BASIC_AUTH(char *remoteuser;)
- USE_FEATURE_HTTPD_CGI(char *referer;)
- USE_FEATURE_HTTPD_CGI(char *user_agent;)
- USE_FEATURE_HTTPD_CGI(char *host;)
- USE_FEATURE_HTTPD_CGI(char *http_accept;)
- USE_FEATURE_HTTPD_CGI(char *http_accept_language;)
+ IF_FEATURE_HTTPD_BASIC_AUTH(const char *g_realm;)
+ IF_FEATURE_HTTPD_BASIC_AUTH(char *remoteuser;)
+ IF_FEATURE_HTTPD_CGI(char *referer;)
+ IF_FEATURE_HTTPD_CGI(char *user_agent;)
+ IF_FEATURE_HTTPD_CGI(char *host;)
+ IF_FEATURE_HTTPD_CGI(char *http_accept;)
+ IF_FEATURE_HTTPD_CGI(char *http_accept_language;)
off_t file_size; /* -1 - unknown */
#if ENABLE_FEATURE_HTTPD_RANGES
@@ -326,7 +326,7 @@ enum {
#define proxy (G.proxy )
#define INIT_G() do { \
SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
- USE_FEATURE_HTTPD_BASIC_AUTH(g_realm = "Web Server Authentication";) \
+ IF_FEATURE_HTTPD_BASIC_AUTH(g_realm = "Web Server Authentication";) \
bind_addr_or_port = "80"; \
index_page = "index.html"; \
file_size = -1; \
@@ -1587,14 +1587,14 @@ static NOINLINE void send_file_and_exit(const char *url, int what)
while (1) {
/* sz is rounded down to 64k */
ssize_t sz = MAXINT(ssize_t) - 0xffff;
- USE_FEATURE_HTTPD_RANGES(if (sz > range_len) sz = range_len;)
+ IF_FEATURE_HTTPD_RANGES(if (sz > range_len) sz = range_len;)
count = sendfile(STDOUT_FILENO, fd, &offset, sz);
if (count < 0) {
if (offset == range_start)
break; /* fall back to read/write loop */
goto fin;
}
- USE_FEATURE_HTTPD_RANGES(range_len -= sz;)
+ IF_FEATURE_HTTPD_RANGES(range_len -= sz;)
if (count == 0 || range_len == 0)
log_and_exit();
}
@@ -1602,16 +1602,16 @@ static NOINLINE void send_file_and_exit(const char *url, int what)
#endif
while ((count = safe_read(fd, iobuf, IOBUF_SIZE)) > 0) {
ssize_t n;
- USE_FEATURE_HTTPD_RANGES(if (count > range_len) count = range_len;)
+ IF_FEATURE_HTTPD_RANGES(if (count > range_len) count = range_len;)
n = full_write(STDOUT_FILENO, iobuf, count);
if (count != n)
break;
- USE_FEATURE_HTTPD_RANGES(range_len -= count;)
+ IF_FEATURE_HTTPD_RANGES(range_len -= count;)
if (range_len == 0)
break;
}
if (count < 0) {
- USE_FEATURE_HTTPD_USE_SENDFILE(fin:)
+ IF_FEATURE_HTTPD_USE_SENDFILE(fin:)
if (verbose > 1)
bb_perror_msg("error");
}
@@ -1839,12 +1839,12 @@ static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr)
/* Find end of URL and parse HTTP version, if any */
http_major_version = '0';
- USE_FEATURE_HTTPD_PROXY(http_minor_version = '0';)
+ IF_FEATURE_HTTPD_PROXY(http_minor_version = '0';)
tptr = strchrnul(urlp, ' ');
/* Is it " HTTP/"? */
if (tptr[0] && strncmp(tptr + 1, HTTP_200, 5) == 0) {
http_major_version = tptr[6];
- USE_FEATURE_HTTPD_PROXY(http_minor_version = tptr[8];)
+ IF_FEATURE_HTTPD_PROXY(http_minor_version = tptr[8];)
}
*tptr = '\0';
@@ -2252,10 +2252,10 @@ enum {
c_opt_config_file = 0,
d_opt_decode_url,
h_opt_home_httpd,
- USE_FEATURE_HTTPD_ENCODE_URL_STR(e_opt_encode_url,)
- USE_FEATURE_HTTPD_BASIC_AUTH( r_opt_realm ,)
- USE_FEATURE_HTTPD_AUTH_MD5( m_opt_md5 ,)
- USE_FEATURE_HTTPD_SETUID( u_opt_setuid ,)
+ IF_FEATURE_HTTPD_ENCODE_URL_STR(e_opt_encode_url,)
+ IF_FEATURE_HTTPD_BASIC_AUTH( r_opt_realm ,)
+ IF_FEATURE_HTTPD_AUTH_MD5( m_opt_md5 ,)
+ IF_FEATURE_HTTPD_SETUID( u_opt_setuid ,)
p_opt_port ,
p_opt_inetd ,
p_opt_foreground,
@@ -2263,10 +2263,10 @@ enum {
OPT_CONFIG_FILE = 1 << c_opt_config_file,
OPT_DECODE_URL = 1 << d_opt_decode_url,
OPT_HOME_HTTPD = 1 << h_opt_home_httpd,
- OPT_ENCODE_URL = USE_FEATURE_HTTPD_ENCODE_URL_STR((1 << e_opt_encode_url)) + 0,
- OPT_REALM = USE_FEATURE_HTTPD_BASIC_AUTH( (1 << r_opt_realm )) + 0,
- OPT_MD5 = USE_FEATURE_HTTPD_AUTH_MD5( (1 << m_opt_md5 )) + 0,
- OPT_SETUID = USE_FEATURE_HTTPD_SETUID( (1 << u_opt_setuid )) + 0,
+ OPT_ENCODE_URL = IF_FEATURE_HTTPD_ENCODE_URL_STR((1 << e_opt_encode_url)) + 0,
+ OPT_REALM = IF_FEATURE_HTTPD_BASIC_AUTH( (1 << r_opt_realm )) + 0,
+ OPT_MD5 = IF_FEATURE_HTTPD_AUTH_MD5( (1 << m_opt_md5 )) + 0,
+ OPT_SETUID = IF_FEATURE_HTTPD_SETUID( (1 << u_opt_setuid )) + 0,
OPT_PORT = 1 << p_opt_port,
OPT_INETD = 1 << p_opt_inetd,
OPT_FOREGROUND = 1 << p_opt_foreground,
@@ -2280,10 +2280,10 @@ int httpd_main(int argc UNUSED_PARAM, char **argv)
int server_socket = server_socket; /* for gcc */
unsigned opt;
char *url_for_decode;
- USE_FEATURE_HTTPD_ENCODE_URL_STR(const char *url_for_encode;)
- USE_FEATURE_HTTPD_SETUID(const char *s_ugid = NULL;)
- USE_FEATURE_HTTPD_SETUID(struct bb_uidgid_t ugid;)
- USE_FEATURE_HTTPD_AUTH_MD5(const char *pass;)
+ IF_FEATURE_HTTPD_ENCODE_URL_STR(const char *url_for_encode;)
+ IF_FEATURE_HTTPD_SETUID(const char *s_ugid = NULL;)
+ IF_FEATURE_HTTPD_SETUID(struct bb_uidgid_t ugid;)
+ IF_FEATURE_HTTPD_AUTH_MD5(const char *pass;)
INIT_G();
@@ -2299,16 +2299,16 @@ int httpd_main(int argc UNUSED_PARAM, char **argv)
* If user gives relative path in -h,
* $SCRIPT_FILENAME will not be set. */
opt = getopt32(argv, "c:d:h:"
- USE_FEATURE_HTTPD_ENCODE_URL_STR("e:")
- USE_FEATURE_HTTPD_BASIC_AUTH("r:")
- USE_FEATURE_HTTPD_AUTH_MD5("m:")
- USE_FEATURE_HTTPD_SETUID("u:")
+ IF_FEATURE_HTTPD_ENCODE_URL_STR("e:")
+ IF_FEATURE_HTTPD_BASIC_AUTH("r:")
+ IF_FEATURE_HTTPD_AUTH_MD5("m:")
+ IF_FEATURE_HTTPD_SETUID("u:")
"p:ifv",
&configFile, &url_for_decode, &home_httpd
- USE_FEATURE_HTTPD_ENCODE_URL_STR(, &url_for_encode)
- USE_FEATURE_HTTPD_BASIC_AUTH(, &g_realm)
- USE_FEATURE_HTTPD_AUTH_MD5(, &pass)
- USE_FEATURE_HTTPD_SETUID(, &s_ugid)
+ IF_FEATURE_HTTPD_ENCODE_URL_STR(, &url_for_encode)
+ IF_FEATURE_HTTPD_BASIC_AUTH(, &g_realm)
+ IF_FEATURE_HTTPD_AUTH_MD5(, &pass)
+ IF_FEATURE_HTTPD_SETUID(, &s_ugid)
, &bind_addr_or_port
, &verbose
);
diff --git a/networking/ifconfig.c b/networking/ifconfig.c
index 22b1682..863d6e4 100644
--- a/networking/ifconfig.c
+++ b/networking/ifconfig.c
@@ -424,7 +424,7 @@ int ifconfig_main(int argc, char **argv)
} else { /* A_CAST_HOST_COPY_IN_ETHER */
/* This is the "hw" arg case. */
smalluint hw_class= index_in_substrings("ether\0"
- USE_FEATURE_HWIB("infiniband\0"), *argv) + 1;
+ IF_FEATURE_HWIB("infiniband\0"), *argv) + 1;
if (!hw_class || !*++argv)
bb_show_usage();
/*safe_strncpy(host, *argv, sizeof(host));*/
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index dc7ed49..604a216 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -87,7 +87,7 @@ struct interfaces_file_t {
struct mapping_defn_t *mappings;
};
-#define OPTION_STR "anvf" USE_FEATURE_IFUPDOWN_MAPPING("m") "i:"
+#define OPTION_STR "anvf" IF_FEATURE_IFUPDOWN_MAPPING("m") "i:"
enum {
OPT_do_all = 0x1,
OPT_no_act = 0x2,
diff --git a/networking/ip.c b/networking/ip.c
index 9903c68..7a0f308 100644
--- a/networking/ip.c
+++ b/networking/ip.c
@@ -76,18 +76,18 @@ int ip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ip_main(int argc UNUSED_PARAM, char **argv)
{
static const char keywords[] ALIGN1 =
- USE_FEATURE_IP_ADDRESS("address\0")
- USE_FEATURE_IP_ROUTE("route\0")
- USE_FEATURE_IP_LINK("link\0")
- USE_FEATURE_IP_TUNNEL("tunnel\0" "tunl\0")
- USE_FEATURE_IP_RULE("rule\0")
+ IF_FEATURE_IP_ADDRESS("address\0")
+ IF_FEATURE_IP_ROUTE("route\0")
+ IF_FEATURE_IP_LINK("link\0")
+ IF_FEATURE_IP_TUNNEL("tunnel\0" "tunl\0")
+ IF_FEATURE_IP_RULE("rule\0")
;
enum {
- USE_FEATURE_IP_ADDRESS(IP_addr,)
- USE_FEATURE_IP_ROUTE(IP_route,)
- USE_FEATURE_IP_LINK(IP_link,)
- USE_FEATURE_IP_TUNNEL(IP_tunnel, IP_tunl,)
- USE_FEATURE_IP_RULE(IP_rule,)
+ IF_FEATURE_IP_ADDRESS(IP_addr,)
+ IF_FEATURE_IP_ROUTE(IP_route,)
+ IF_FEATURE_IP_LINK(IP_link,)
+ IF_FEATURE_IP_TUNNEL(IP_tunnel, IP_tunl,)
+ IF_FEATURE_IP_RULE(IP_rule,)
IP_none
};
int (*ip_func)(char**) = ip_print_help;
diff --git a/networking/ipcalc.c b/networking/ipcalc.c
index d8fa5f3..b5cc3de 100644
--- a/networking/ipcalc.c
+++ b/networking/ipcalc.c
@@ -86,7 +86,7 @@ int ipcalc_main(int argc, char **argv)
#if ENABLE_FEATURE_IPCALC_LONG_OPTIONS
applet_long_options = ipcalc_longopts;
#endif
- opt = getopt32(argv, "mbn" USE_FEATURE_IPCALC_FANCY("phs"));
+ opt = getopt32(argv, "mbn" IF_FEATURE_IPCALC_FANCY("phs"));
argc -= optind;
argv += optind;
if (opt & (BROADCAST | NETWORK | NETPREFIX)) {
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
index 66557d8..3785952 100644
--- a/networking/libiproute/iproute.c
+++ b/networking/libiproute/iproute.c
@@ -287,14 +287,14 @@ static int print_route(const struct sockaddr_nl *who UNUSED_PARAM,
static int iproute_modify(int cmd, unsigned flags, char **argv)
{
static const char keywords[] ALIGN1 =
- "src\0""via\0""mtu\0""lock\0""protocol\0"USE_FEATURE_IP_RULE("table\0")
+ "src\0""via\0""mtu\0""lock\0""protocol\0"IF_FEATURE_IP_RULE("table\0")
"dev\0""oif\0""to\0""metric\0";
enum {
ARG_src,
ARG_via,
ARG_mtu, PARM_lock,
ARG_protocol,
-USE_FEATURE_IP_RULE(ARG_table,)
+IF_FEATURE_IP_RULE(ARG_table,)
ARG_dev,
ARG_oif,
ARG_to,
diff --git a/networking/nc.c b/networking/nc.c
index fe845f5..857d635 100644
--- a/networking/nc.c
+++ b/networking/nc.c
@@ -29,11 +29,11 @@ int nc_main(int argc, char **argv)
int sfd = sfd; /* for gcc */
int cfd = 0;
unsigned lport = 0;
- SKIP_NC_SERVER(const) unsigned do_listen = 0;
- SKIP_NC_EXTRA (const) unsigned wsecs = 0;
- SKIP_NC_EXTRA (const) unsigned delay = 0;
- SKIP_NC_EXTRA (const int execparam = 0;)
- USE_NC_EXTRA (char **execparam = NULL;)
+ IF_NOT_NC_SERVER(const) unsigned do_listen = 0;
+ IF_NOT_NC_EXTRA (const) unsigned wsecs = 0;
+ IF_NOT_NC_EXTRA (const) unsigned delay = 0;
+ IF_NOT_NC_EXTRA (const int execparam = 0;)
+ IF_NC_EXTRA (char **execparam = NULL;)
len_and_sockaddr *lsa;
fd_set readfds, testfds;
int opt; /* must be signed (getopt returns -1) */
@@ -42,24 +42,24 @@ int nc_main(int argc, char **argv)
/* getopt32 is _almost_ usable:
** it cannot handle "... -e prog -prog-opt" */
while ((opt = getopt(argc, argv,
- "" USE_NC_SERVER("lp:") USE_NC_EXTRA("w:i:f:e:") )) > 0
+ "" IF_NC_SERVER("lp:") IF_NC_EXTRA("w:i:f:e:") )) > 0
) {
if (ENABLE_NC_SERVER && opt=='l')
- USE_NC_SERVER(do_listen++);
+ IF_NC_SERVER(do_listen++);
else if (ENABLE_NC_SERVER && opt=='p')
- USE_NC_SERVER(lport = bb_lookup_port(optarg, "tcp", 0));
+ IF_NC_SERVER(lport = bb_lookup_port(optarg, "tcp", 0));
else if (ENABLE_NC_EXTRA && opt=='w')
- USE_NC_EXTRA( wsecs = xatou(optarg));
+ IF_NC_EXTRA( wsecs = xatou(optarg));
else if (ENABLE_NC_EXTRA && opt=='i')
- USE_NC_EXTRA( delay = xatou(optarg));
+ IF_NC_EXTRA( delay = xatou(optarg));
else if (ENABLE_NC_EXTRA && opt=='f')
- USE_NC_EXTRA( cfd = xopen(optarg, O_RDWR));
+ IF_NC_EXTRA( cfd = xopen(optarg, O_RDWR));
else if (ENABLE_NC_EXTRA && opt=='e' && optind <= argc) {
/* We cannot just 'break'. We should let getopt finish.
** Or else we won't be able to find where
** 'host' and 'port' params are
** (think "nc -w 60 host port -e prog"). */
- USE_NC_EXTRA(
+ IF_NC_EXTRA(
char **p;
// +2: one for progname (optarg) and one for NULL
execparam = xzalloc(sizeof(char*) * (argc - optind + 2));
@@ -154,7 +154,7 @@ int nc_main(int argc, char **argv)
xmove_fd(cfd, 0);
xdup2(0, 1);
xdup2(0, 2);
- USE_NC_EXTRA(BB_EXECVP(execparam[0], execparam);)
+ IF_NC_EXTRA(BB_EXECVP(execparam[0], execparam);)
/* Don't print stuff or it will go over the wire.... */
_exit(127);
}
diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c
index 41db945..47940e9 100644
--- a/networking/nc_bloaty.c
+++ b/networking/nc_bloaty.c
@@ -675,7 +675,7 @@ int nc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int nc_main(int argc, char **argv)
{
char *str_p, *str_s;
- USE_NC_EXTRA(char *str_i, *str_o;)
+ IF_NC_EXTRA(char *str_i, *str_o;)
char *themdotted = themdotted; /* gcc */
char **proggie;
int x;
@@ -711,10 +711,10 @@ int nc_main(int argc, char **argv)
// -g -G -t -r deleted, unimplemented -a deleted too
opt_complementary = "?2:vv:w+"; /* max 2 params; -v is a counter; -w N */
- getopt32(argv, "hnp:s:uvw:" USE_NC_SERVER("l")
- USE_NC_EXTRA("i:o:z"),
+ getopt32(argv, "hnp:s:uvw:" IF_NC_SERVER("l")
+ IF_NC_EXTRA("i:o:z"),
&str_p, &str_s, &o_wait
- USE_NC_EXTRA(, &str_i, &str_o, &o_verbose));
+ IF_NC_EXTRA(, &str_i, &str_o, &o_verbose));
argv += optind;
#if ENABLE_NC_EXTRA
if (option_mask32 & OPT_i) /* line-interval time */
diff --git a/networking/netstat.c b/networking/netstat.c
index b246280..0c3f931 100644
--- a/networking/netstat.c
+++ b/networking/netstat.c
@@ -18,15 +18,15 @@
#include "inet_common.h"
#define NETSTAT_OPTS "laentuwx" \
- USE_ROUTE( "r") \
- USE_FEATURE_NETSTAT_WIDE("W") \
- USE_FEATURE_NETSTAT_PRG( "p")
+ IF_ROUTE( "r") \
+ IF_FEATURE_NETSTAT_WIDE("W") \
+ IF_FEATURE_NETSTAT_PRG( "p")
enum {
OPTBIT_KEEP_OLD = 7,
- USE_ROUTE( OPTBIT_ROUTE,)
- USE_FEATURE_NETSTAT_WIDE(OPTBIT_WIDE ,)
- USE_FEATURE_NETSTAT_PRG( OPTBIT_PRG ,)
+ IF_ROUTE( OPTBIT_ROUTE,)
+ IF_FEATURE_NETSTAT_WIDE(OPTBIT_WIDE ,)
+ IF_FEATURE_NETSTAT_PRG( OPTBIT_PRG ,)
OPT_sock_listen = 1 << 0, // l
OPT_sock_all = 1 << 1, // a
OPT_extended = 1 << 2, // e
@@ -35,9 +35,9 @@ enum {
OPT_sock_udp = 1 << 5, // u
OPT_sock_raw = 1 << 6, // w
OPT_sock_unix = 1 << 7, // x
- OPT_route = USE_ROUTE( (1 << OPTBIT_ROUTE)) + 0, // r
- OPT_wide = USE_FEATURE_NETSTAT_WIDE((1 << OPTBIT_WIDE )) + 0, // W
- OPT_prg = USE_FEATURE_NETSTAT_PRG( (1 << OPTBIT_PRG )) + 0, // p
+ OPT_route = IF_ROUTE( (1 << OPTBIT_ROUTE)) + 0, // r
+ OPT_wide = IF_FEATURE_NETSTAT_WIDE((1 << OPTBIT_WIDE )) + 0, // W
+ OPT_prg = IF_FEATURE_NETSTAT_PRG( (1 << OPTBIT_PRG )) + 0, // p
};
#define NETSTAT_CONNECTED 0x01
diff --git a/networking/ping.c b/networking/ping.c
index f2a612f..71b2a4b 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -224,7 +224,7 @@ int ping_main(int argc UNUSED_PARAM, char **argv)
/* full(er) version */
-#define OPT_STRING ("qvc:s:w:W:I:4" USE_PING6("6"))
+#define OPT_STRING ("qvc:s:w:W:I:4" IF_PING6("6"))
enum {
OPT_QUIET = 1 << 0,
OPT_VERBOSE = 1 << 1,
diff --git a/networking/telnetd.c b/networking/telnetd.c
index ccf3289..b7162ad 100644
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
@@ -201,8 +201,8 @@ static size_t iac_safe_write(int fd, const char *buf, size_t count)
static struct tsession *
make_new_session(
- USE_FEATURE_TELNETD_STANDALONE(int sock)
- SKIP_FEATURE_TELNETD_STANDALONE(void)
+ IF_FEATURE_TELNETD_STANDALONE(int sock)
+ IF_NOT_FEATURE_TELNETD_STANDALONE(void)
) {
const char *login_argv[2];
struct termios termbuf;
@@ -437,9 +437,9 @@ int telnetd_main(int argc UNUSED_PARAM, char **argv)
#endif
/* Even if !STANDALONE, we accept (and ignore) -i, thus people
* don't need to guess whether it's ok to pass -i to us */
- opt = getopt32(argv, "f:l:Ki" USE_FEATURE_TELNETD_STANDALONE("p:b:F"),
+ opt = getopt32(argv, "f:l:Ki" IF_FEATURE_TELNETD_STANDALONE("p:b:F"),
&issuefile, &loginpath
- USE_FEATURE_TELNETD_STANDALONE(, &opt_portnbr, &opt_bindaddr));
+ IF_FEATURE_TELNETD_STANDALONE(, &opt_portnbr, &opt_bindaddr));
if (!IS_INETD /*&& !re_execed*/) {
/* inform that we start in standalone mode?
* May be useful when people forget to give -i */
@@ -455,7 +455,7 @@ int telnetd_main(int argc UNUSED_PARAM, char **argv)
openlog(applet_name, LOG_PID, LOG_DAEMON);
logmode = LOGMODE_SYSLOG;
}
- USE_FEATURE_TELNETD_STANDALONE(
+ IF_FEATURE_TELNETD_STANDALONE(
if (opt & OPT_PORT)
portnbr = xatou16(opt_portnbr);
);
diff --git a/networking/telnetd.ctrlSQ.patch b/networking/telnetd.ctrlSQ.patch
index 885e105..7060e1c 100644
--- a/networking/telnetd.ctrlSQ.patch
+++ b/networking/telnetd.ctrlSQ.patch
@@ -104,7 +104,7 @@ exceptional conditions.
+#endif
/* Even if !STANDALONE, we accept (and ignore) -i, thus people
* don't need to guess whether it's ok to pass -i to us */
- opt = getopt32(argv, "f:l:Ki" USE_FEATURE_TELNETD_STANDALONE("p:b:F"),
+ opt = getopt32(argv, "f:l:Ki" IF_FEATURE_TELNETD_STANDALONE("p:b:F"),
@@ -475,7 +495,7 @@
FD_SET(ts->sockfd_read, &rdfdset);
if (ts->size2 > 0) /* can write to socket */
diff --git a/networking/tftp.c b/networking/tftp.c
index 9c78b6e..352037f 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -64,15 +64,15 @@ enum {
};
#if ENABLE_FEATURE_TFTP_GET && !ENABLE_FEATURE_TFTP_PUT
-#define USE_GETPUT(...)
+#define IF_GETPUT(...)
#define CMD_GET(cmd) 1
#define CMD_PUT(cmd) 0
#elif !ENABLE_FEATURE_TFTP_GET && ENABLE_FEATURE_TFTP_PUT
-#define USE_GETPUT(...)
+#define IF_GETPUT(...)
#define CMD_GET(cmd) 0
#define CMD_PUT(cmd) 1
#else
-#define USE_GETPUT(...) __VA_ARGS__
+#define IF_GETPUT(...) __VA_ARGS__
#define CMD_GET(cmd) ((cmd) & TFTP_OPT_GET)
#define CMD_PUT(cmd) ((cmd) & TFTP_OPT_PUT)
#endif
@@ -160,9 +160,9 @@ static int tftp_protocol(
len_and_sockaddr *our_lsa,
len_and_sockaddr *peer_lsa,
const char *local_file
- USE_TFTP(, const char *remote_file)
- USE_FEATURE_TFTP_BLOCKSIZE(USE_TFTPD(, void *tsize))
- USE_FEATURE_TFTP_BLOCKSIZE(, int blksize))
+ IF_TFTP(, const char *remote_file)
+ IF_FEATURE_TFTP_BLOCKSIZE(IF_TFTPD(, void *tsize))
+ IF_FEATURE_TFTP_BLOCKSIZE(, int blksize))
{
#if !ENABLE_TFTP
#define remote_file NULL
@@ -178,7 +178,7 @@ static int tftp_protocol(
#define socket_fd (pfd[0].fd)
int len;
int send_len;
- USE_FEATURE_TFTP_BLOCKSIZE(smallint want_option_ack = 0;)
+ IF_FEATURE_TFTP_BLOCKSIZE(smallint want_option_ack = 0;)
smallint finished = 0;
uint16_t opcode;
uint16_t block_nr;
@@ -564,19 +564,19 @@ int tftp_main(int argc UNUSED_PARAM, char **argv)
#endif
int result;
int port;
- USE_GETPUT(int opt;)
+ IF_GETPUT(int opt;)
INIT_G();
/* -p or -g is mandatory, and they are mutually exclusive */
- opt_complementary = "" USE_FEATURE_TFTP_GET("g:") USE_FEATURE_TFTP_PUT("p:")
- USE_GETPUT("g--p:p--g:");
+ opt_complementary = "" IF_FEATURE_TFTP_GET("g:") IF_FEATURE_TFTP_PUT("p:")
+ IF_GETPUT("g--p:p--g:");
- USE_GETPUT(opt =) getopt32(argv,
- USE_FEATURE_TFTP_GET("g") USE_FEATURE_TFTP_PUT("p")
- "l:r:" USE_FEATURE_TFTP_BLOCKSIZE("b:"),
+ IF_GETPUT(opt =) getopt32(argv,
+ IF_FEATURE_TFTP_GET("g") IF_FEATURE_TFTP_PUT("p")
+ "l:r:" IF_FEATURE_TFTP_BLOCKSIZE("b:"),
&local_file, &remote_file
- USE_FEATURE_TFTP_BLOCKSIZE(, &blksize_str));
+ IF_FEATURE_TFTP_BLOCKSIZE(, &blksize_str));
argv += optind;
#if ENABLE_FEATURE_TFTP_BLOCKSIZE
@@ -614,8 +614,8 @@ int tftp_main(int argc UNUSED_PARAM, char **argv)
result = tftp_protocol(
NULL /*our_lsa*/, peer_lsa,
local_file, remote_file
- USE_FEATURE_TFTP_BLOCKSIZE(USE_TFTPD(, NULL /*tsize*/))
- USE_FEATURE_TFTP_BLOCKSIZE(, blksize)
+ IF_FEATURE_TFTP_BLOCKSIZE(IF_TFTPD(, NULL /*tsize*/))
+ IF_FEATURE_TFTP_BLOCKSIZE(, blksize)
);
if (result != EXIT_SUCCESS && NOT_LONE_DASH(local_file) && CMD_GET(opt)) {
@@ -635,8 +635,8 @@ int tftpd_main(int argc UNUSED_PARAM, char **argv)
char *local_file, *mode;
const char *error_msg;
int opt, result, opcode;
- USE_FEATURE_TFTP_BLOCKSIZE(int blksize = TFTP_BLKSIZE_DEFAULT;)
- USE_FEATURE_TFTP_BLOCKSIZE(char *tsize = NULL;)
+ IF_FEATURE_TFTP_BLOCKSIZE(int blksize = TFTP_BLKSIZE_DEFAULT;)
+ IF_FEATURE_TFTP_BLOCKSIZE(char *tsize = NULL;)
INIT_G();
@@ -667,9 +667,9 @@ int tftpd_main(int argc UNUSED_PARAM, char **argv)
opcode = ntohs(*(uint16_t*)block_buf);
if (result < 4 || result >= sizeof(block_buf)
|| block_buf[result-1] != '\0'
- || (USE_FEATURE_TFTP_PUT(opcode != TFTP_RRQ) /* not download */
- USE_GETPUT(&&)
- USE_FEATURE_TFTP_GET(opcode != TFTP_WRQ) /* not upload */
+ || (IF_FEATURE_TFTP_PUT(opcode != TFTP_RRQ) /* not download */
+ IF_GETPUT(&&)
+ IF_FEATURE_TFTP_GET(opcode != TFTP_WRQ) /* not upload */
)
) {
goto err;
@@ -711,9 +711,9 @@ int tftpd_main(int argc UNUSED_PARAM, char **argv)
error_msg = bb_msg_write_error;
goto err;
}
- USE_GETPUT(option_mask32 |= TFTP_OPT_GET;) /* will receive file's data */
+ IF_GETPUT(option_mask32 |= TFTP_OPT_GET;) /* will receive file's data */
} else {
- USE_GETPUT(option_mask32 |= TFTP_OPT_PUT;) /* will send file's data */
+ IF_GETPUT(option_mask32 |= TFTP_OPT_PUT;) /* will send file's data */
}
/* NB: if error_pkt_str or error_pkt_reason is set up,
@@ -724,9 +724,9 @@ int tftpd_main(int argc UNUSED_PARAM, char **argv)
/* tftp_protocol() will create new one, bound to particular local IP */
result = tftp_protocol(
our_lsa, peer_lsa,
- local_file USE_TFTP(, NULL /*remote_file*/)
- USE_FEATURE_TFTP_BLOCKSIZE(, tsize)
- USE_FEATURE_TFTP_BLOCKSIZE(, blksize)
+ local_file IF_TFTP(, NULL /*remote_file*/)
+ IF_FEATURE_TFTP_BLOCKSIZE(, tsize)
+ IF_FEATURE_TFTP_BLOCKSIZE(, blksize)
);
return result;
diff --git a/networking/tunctl.c b/networking/tunctl.c
index a8e5270..02ff71d 100644
--- a/networking/tunctl.c
+++ b/networking/tunctl.c
@@ -48,9 +48,9 @@ int tunctl_main(int argc UNUSED_PARAM, char **argv)
};
opt_complementary = "=0:t--d:d--t"; // no arguments; t ^ d
- opts = getopt32(argv, "f:t:d:" USE_FEATURE_TUNCTL_UG("u:g:b"),
+ opts = getopt32(argv, "f:t:d:" IF_FEATURE_TUNCTL_UG("u:g:b"),
&opt_device, &opt_name, &opt_name
- USE_FEATURE_TUNCTL_UG(, &opt_user, &opt_group));
+ IF_FEATURE_TUNCTL_UG(, &opt_user, &opt_group));
// select device
memset(&ifr, 0, sizeof(ifr));
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index e9f99e3..2dd3cd0 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -133,7 +133,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
{
uint8_t *temp, *message;
char *str_c, *str_V, *str_h, *str_F, *str_r;
- USE_FEATURE_UDHCP_PORT(char *str_P;)
+ IF_FEATURE_UDHCP_PORT(char *str_P;)
llist_t *list_O = NULL;
int tryagain_timeout = 20;
int discover_timeout = 3;
@@ -175,8 +175,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
"no-default-options\0" No_argument "o"
"foreground\0" No_argument "f"
"background\0" No_argument "b"
- USE_FEATURE_UDHCPC_ARPING("arping\0" No_argument "a")
- USE_FEATURE_UDHCP_PORT("client-port\0" Required_argument "P")
+ IF_FEATURE_UDHCPC_ARPING("arping\0" No_argument "a")
+ IF_FEATURE_UDHCP_PORT("client-port\0" Required_argument "P")
;
#endif
enum {
@@ -204,33 +204,33 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
/* The rest has variable bit positions, need to be clever */
OPTBIT_f = 20,
USE_FOR_MMU( OPTBIT_b,)
- USE_FEATURE_UDHCPC_ARPING(OPTBIT_a,)
- USE_FEATURE_UDHCP_PORT( OPTBIT_P,)
+ IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,)
+ IF_FEATURE_UDHCP_PORT( OPTBIT_P,)
USE_FOR_MMU( OPT_b = 1 << OPTBIT_b,)
- USE_FEATURE_UDHCPC_ARPING(OPT_a = 1 << OPTBIT_a,)
- USE_FEATURE_UDHCP_PORT( OPT_P = 1 << OPTBIT_P,)
+ IF_FEATURE_UDHCPC_ARPING(OPT_a = 1 << OPTBIT_a,)
+ IF_FEATURE_UDHCP_PORT( OPT_P = 1 << OPTBIT_P,)
};
/* Default options. */
- USE_FEATURE_UDHCP_PORT(SERVER_PORT = 67;)
- USE_FEATURE_UDHCP_PORT(CLIENT_PORT = 68;)
+ IF_FEATURE_UDHCP_PORT(SERVER_PORT = 67;)
+ IF_FEATURE_UDHCP_PORT(CLIENT_PORT = 68;)
client_config.interface = "eth0";
client_config.script = DEFAULT_SCRIPT;
/* Parse command line */
/* Cc: mutually exclusive; O: list; -T,-t,-A take numeric param */
opt_complementary = "c--C:C--c:O::T+:t+:A+";
- USE_GETOPT_LONG(applet_long_options = udhcpc_longopts;)
+ IF_GETOPT_LONG(applet_long_options = udhcpc_longopts;)
opt = getopt32(argv, "c:CV:H:h:F:i:np:qRr:s:T:t:vSA:O:of"
USE_FOR_MMU("b")
- USE_FEATURE_UDHCPC_ARPING("a")
- USE_FEATURE_UDHCP_PORT("P:")
+ IF_FEATURE_UDHCPC_ARPING("a")
+ IF_FEATURE_UDHCP_PORT("P:")
, &str_c, &str_V, &str_h, &str_h, &str_F
, &client_config.interface, &client_config.pidfile, &str_r /* i,p */
, &client_config.script /* s */
, &discover_timeout, &discover_retries, &tryagain_timeout /* T,t,A */
, &list_O
- USE_FEATURE_UDHCP_PORT(, &str_P)
+ IF_FEATURE_UDHCP_PORT(, &str_P)
);
if (opt & OPT_c)
client_config.clientid = alloc_dhcp_option(DHCP_CLIENT_ID, str_c, 0);
diff --git a/networking/udhcp/dhcpc.h b/networking/udhcp/dhcpc.h
index 7b77942..361624f 100644
--- a/networking/udhcp/dhcpc.h
+++ b/networking/udhcp/dhcpc.h
@@ -10,7 +10,7 @@ struct client_config_t {
/* TODO: combine flag fields into single "unsigned opt" */
/* (can be set directly to the result of getopt32) */
char no_default_options; /* Do not include default optins in request */
- USE_FEATURE_UDHCP_PORT(uint16_t port;)
+ IF_FEATURE_UDHCP_PORT(uint16_t port;)
int ifindex; /* Index number of the interface to use */
uint8_t opt_mask[256 / 8]; /* Bitmask of options to send (-O option) */
const char *interface; /* The name of the interface to use */
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
index a82fd8c..ccdfd36 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -37,14 +37,14 @@ int udhcpd_main(int argc UNUSED_PARAM, char **argv)
unsigned opt;
struct option_set *option;
struct dhcpOfferedAddr *lease, static_lease;
- USE_FEATURE_UDHCP_PORT(char *str_P;)
+ IF_FEATURE_UDHCP_PORT(char *str_P;)
#if ENABLE_FEATURE_UDHCP_PORT
SERVER_PORT = 67;
CLIENT_PORT = 68;
#endif
- opt = getopt32(argv, "fS" USE_FEATURE_UDHCP_PORT("P:", &str_P));
+ opt = getopt32(argv, "fS" IF_FEATURE_UDHCP_PORT("P:", &str_P));
argv += optind;
if (!(opt & 1)) { /* no -f */
bb_daemonize_or_rexec(0, argv);
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c
index a061a9c..b138976 100644
--- a/networking/udhcp/files.c
+++ b/networking/udhcp/files.c
@@ -394,7 +394,7 @@ void FAST_FUNC read_leases(const char *file)
struct dhcpOfferedAddr lease;
int64_t written_at, time_passed;
int fd;
- USE_UDHCP_DEBUG(unsigned i;)
+ IF_UDHCP_DEBUG(unsigned i;)
fd = open_or_warn(file, O_RDONLY);
if (fd < 0)
@@ -410,7 +410,7 @@ void FAST_FUNC read_leases(const char *file)
if ((uint64_t)time_passed > 12 * 60 * 60)
goto ret;
- USE_UDHCP_DEBUG(i = 0;)
+ IF_UDHCP_DEBUG(i = 0;)
while (full_read(fd, &lease, sizeof(lease)) == sizeof(lease)) {
/* ADDME: what if it matches some static lease? */
uint32_t y = ntohl(lease.yiaddr);
@@ -424,7 +424,7 @@ void FAST_FUNC read_leases(const char *file)
bb_error_msg("too many leases while loading %s", file);
break;
}
- USE_UDHCP_DEBUG(i++;)
+ IF_UDHCP_DEBUG(i++;)
}
}
DEBUG("Read %d leases", i);
diff --git a/networking/wget.c b/networking/wget.c
index 4875904..ca3acd0 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -497,14 +497,14 @@ int wget_main(int argc UNUSED_PARAM, char **argv)
applet_long_options = wget_longopts;
#endif
/* server.allocated = target.allocated = NULL; */
- opt_complementary = "-1" USE_FEATURE_WGET_LONG_OPTIONS(":\xfe::");
+ opt_complementary = "-1" IF_FEATURE_WGET_LONG_OPTIONS(":\xfe::");
opt = getopt32(argv, "csqO:P:Y:U:" /*ignored:*/ "t:T:",
&fname_out, &dir_prefix,
&proxy_flag, &user_agent,
NULL, /* -t RETRIES */
NULL /* -T NETWORK_READ_TIMEOUT */
- USE_FEATURE_WGET_LONG_OPTIONS(, &headers_llist)
- USE_FEATURE_WGET_LONG_OPTIONS(, &post_data)
+ IF_FEATURE_WGET_LONG_OPTIONS(, &headers_llist)
+ IF_FEATURE_WGET_LONG_OPTIONS(, &post_data)
);
if (strcmp(proxy_flag, "off") == 0) {
/* Use the proxy if necessary */
diff --git a/procps/pidof.c b/procps/pidof.c
index 1942399..bf5e784 100644
--- a/procps/pidof.c
+++ b/procps/pidof.c
@@ -10,10 +10,10 @@
#include "libbb.h"
enum {
- USE_FEATURE_PIDOF_SINGLE(OPTBIT_SINGLE,)
- USE_FEATURE_PIDOF_OMIT( OPTBIT_OMIT ,)
- OPT_SINGLE = USE_FEATURE_PIDOF_SINGLE((1<<OPTBIT_SINGLE)) + 0,
- OPT_OMIT = USE_FEATURE_PIDOF_OMIT( (1<<OPTBIT_OMIT )) + 0,
+ IF_FEATURE_PIDOF_SINGLE(OPTBIT_SINGLE,)
+ IF_FEATURE_PIDOF_OMIT( OPTBIT_OMIT ,)
+ OPT_SINGLE = IF_FEATURE_PIDOF_SINGLE((1<<OPTBIT_SINGLE)) + 0,
+ OPT_OMIT = IF_FEATURE_PIDOF_OMIT( (1<<OPTBIT_OMIT )) + 0,
};
int pidof_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
@@ -28,8 +28,8 @@ int pidof_main(int argc UNUSED_PARAM, char **argv)
/* do unconditional option parsing */
opt = getopt32(argv, ""
- USE_FEATURE_PIDOF_SINGLE ("s")
- USE_FEATURE_PIDOF_OMIT("o:", &omits));
+ IF_FEATURE_PIDOF_SINGLE ("s")
+ IF_FEATURE_PIDOF_OMIT("o:", &omits));
#if ENABLE_FEATURE_PIDOF_OMIT
/* fill omit list. */
diff --git a/procps/ps.c b/procps/ps.c
index 395cfcf..b9a4aef 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -25,9 +25,9 @@ enum { MAX_WIDTH = 2*1024 };
#if ENABLE_SELINUX
#define SELINUX_O_PREFIX "label,"
-#define DEFAULT_O_STR (SELINUX_O_PREFIX "pid,user" USE_FEATURE_PS_TIME(",time") ",args")
+#define DEFAULT_O_STR (SELINUX_O_PREFIX "pid,user" IF_FEATURE_PS_TIME(",time") ",args")
#else
-#define DEFAULT_O_STR ("pid,user" USE_FEATURE_PS_TIME(",time") ",args")
+#define DEFAULT_O_STR ("pid,user" IF_FEATURE_PS_TIME(",time") ",args")
#endif
typedef struct {
@@ -425,7 +425,7 @@ int ps_main(int argc UNUSED_PARAM, char **argv)
{
procps_status_t *p;
llist_t* opt_o = NULL;
- USE_SELINUX(int opt;)
+ IF_SELINUX(int opt;)
// POSIX:
// -a Write information for all processes associated with terminals
@@ -439,7 +439,7 @@ int ps_main(int argc UNUSED_PARAM, char **argv)
// Select which columns to display
/* We allow (and ignore) most of the above. FIXME */
opt_complementary = "o::";
- USE_SELINUX(opt =) getopt32(argv, "Zo:aAdefl", &opt_o);
+ IF_SELINUX(opt =) getopt32(argv, "Zo:aAdefl", &opt_o);
if (opt_o) {
do {
parse_o(llist_pop(&opt_o));
@@ -486,8 +486,8 @@ int ps_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
procps_status_t *p = NULL;
int len;
- SKIP_SELINUX(const) int use_selinux = 0;
- USE_SELINUX(int i;)
+ IF_NOT_SELINUX(const) int use_selinux = 0;
+ IF_SELINUX(int i;)
#if !ENABLE_FEATURE_PS_WIDE
enum { terminal_width = 79 };
#else
@@ -498,7 +498,7 @@ int ps_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
#if ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX
#if ENABLE_FEATURE_PS_WIDE
opt_complementary = "-:ww";
- USE_SELINUX(i =) getopt32(argv, USE_SELINUX("Z") "w", &w_count);
+ IF_SELINUX(i =) getopt32(argv, IF_SELINUX("Z") "w", &w_count);
/* if w is given once, GNU ps sets the width to 132,
* if w is given more than once, it is "unlimited"
*/
diff --git a/procps/top.c b/procps/top.c
index b595142..8738156 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -889,7 +889,7 @@ int top_main(int argc UNUSED_PARAM, char **argv)
int lines_rem;
unsigned interval;
char *str_interval, *str_iterations;
- SKIP_FEATURE_TOPMEM(const) unsigned scan_mask = TOP_MASK;
+ IF_NOT_FEATURE_TOPMEM(const) unsigned scan_mask = TOP_MASK;
#if ENABLE_FEATURE_USE_TERMIOS
struct termios new_settings;
struct pollfd pfd[1];
@@ -1054,11 +1054,11 @@ int top_main(int argc UNUSED_PARAM, char **argv)
if (c == 'q')
break;
if (c == 'n') {
- USE_FEATURE_TOPMEM(scan_mask = TOP_MASK;)
+ IF_FEATURE_TOPMEM(scan_mask = TOP_MASK;)
sort_function[0] = pid_sort;
}
if (c == 'm') {
- USE_FEATURE_TOPMEM(scan_mask = TOP_MASK;)
+ IF_FEATURE_TOPMEM(scan_mask = TOP_MASK;)
sort_function[0] = mem_sort;
#if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
sort_function[1] = pcpu_sort;
@@ -1067,13 +1067,13 @@ int top_main(int argc UNUSED_PARAM, char **argv)
}
#if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
if (c == 'p') {
- USE_FEATURE_TOPMEM(scan_mask = TOP_MASK;)
+ IF_FEATURE_TOPMEM(scan_mask = TOP_MASK;)
sort_function[0] = pcpu_sort;
sort_function[1] = mem_sort;
sort_function[2] = time_sort;
}
if (c == 't') {
- USE_FEATURE_TOPMEM(scan_mask = TOP_MASK;)
+ IF_FEATURE_TOPMEM(scan_mask = TOP_MASK;)
sort_function[0] = time_sort;
sort_function[1] = mem_sort;
sort_function[2] = pcpu_sort;
diff --git a/runit/chpst.c b/runit/chpst.c
index 82a81f5..21297da 100644
--- a/runit/chpst.c
+++ b/runit/chpst.c
@@ -200,11 +200,11 @@ int chpst_main(int argc UNUSED_PARAM, char **argv)
// if yes -> getopt converts strings to numbers for us
opt_complementary = "-1:a+:c+:d+:f+:l+:m+:o+:p+:r+:s+:t+";
opt = getopt32(argv, "+a:c:d:f:l:m:o:p:r:s:t:u:U:e:"
- USE_CHPST("/:n:vP012"),
+ IF_CHPST("/:n:vP012"),
&limita, &limitc, &limitd, &limitf, &limitl,
&limitm, &limito, &limitp, &limitr, &limits, &limitt,
&set_user, &env_user, &env_dir
- USE_CHPST(, &root, &nicestr));
+ IF_CHPST(, &root, &nicestr));
argv += optind;
if (opt & OPT_m) { // -m means -asld
limita = limits = limitl = limitd = limitm;
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 811d48b..6d61044 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -225,32 +225,36 @@ void use_config(char *m, int slen)
void parse_config_file(char *map, size_t len)
{
/* modified for bbox */
- char *end_4 = map + len - 4; /* 4 == length of "USE_" */
+ char *end_3 = map + len - 3; /* 3 == length of "IF_" */
char *end_7 = map + len - 7;
char *p = map;
char *q;
int off;
- for (; p < end_4; p++) {
+ for (; p <= end_3; p++) {
+ /* Find next identifier's beginning */
+ if (!(isalnum(*p) || *p == '_'))
+ continue;
+
+ /* Check it */
if (p < end_7 && p[6] == '_') {
if (!memcmp(p, "CONFIG", 6)) goto conf7;
if (!memcmp(p, "ENABLE", 6)) goto conf7;
+ if (!memcmp(p, "IF_NOT", 6)) goto conf7;
}
- /* We have at least 5 chars: for() has
- * "p < end-4", not "p <= end-4"
- * therefore we don't need to check p <= end-5 here */
- if (p[4] == '_')
- if (!memcmp(p, "SKIP", 4)) goto conf5;
- /* Ehhh, gcc is too stupid to just compare it as 32bit int */
- if (p[0] == 'U')
- if (!memcmp(p, "USE_", 4)) goto conf4;
+ /* we have at least 3 chars because of p <= end_3 */
+ /*if (!memcmp(p, "IF_", 3)) goto conf3;*/
+ if (p[0] == 'I' && p[1] == 'F' && p[2] == '_') goto conf3;
+
+ /* This identifier is not interesting, skip it */
+ while (p <= end_3 && (isalnum(*p) || *p == '_'))
+ p++;
continue;
- conf4: off = 4;
- conf5: off = 5;
+ conf3: off = 3;
conf7: off = 7;
p += off;
- for (q = p; q < end_4+4; q++) {
+ for (q = p; q < end_3+3; q++) {
if (!(isalnum(*q) || *q == '_'))
break;
}
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 58ea96d..9365a12 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -458,8 +458,8 @@ int conf_write(const char *name)
fprintf(out_h, "#undef CONFIG_%s\n", sym->name);
/* bbox */
fprintf(out_h, "#define ENABLE_%s 0\n", sym->name);
- fprintf(out_h, "#define USE_%s(...)\n", sym->name);
- fprintf(out_h, "#define SKIP_%s(...) __VA_ARGS__\n", sym->name);
+ fprintf(out_h, "#define IF_%s(...)\n", sym->name);
+ fprintf(out_h, "#define IF_NOT_%s(...) __VA_ARGS__\n", sym->name);
}
break;
case mod:
@@ -473,8 +473,8 @@ int conf_write(const char *name)
fprintf(out_h, "#define CONFIG_%s 1\n", sym->name);
/* bbox */
fprintf(out_h, "#define ENABLE_%s 1\n", sym->name);
- fprintf(out_h, "#define USE_%s(...) __VA_ARGS__\n", sym->name);
- fprintf(out_h, "#define SKIP_%s(...)\n", sym->name);
+ fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name);
+ fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name);
}
break;
}
@@ -505,8 +505,8 @@ int conf_write(const char *name)
fputs("\"\n", out_h);
/* bbox */
fprintf(out_h, "#define ENABLE_%s 1\n", sym->name);
- fprintf(out_h, "#define USE_%s(...) __VA_ARGS__\n", sym->name);
- fprintf(out_h, "#define SKIP_%s(...)\n", sym->name);
+ fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name);
+ fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name);
}
break;
case S_HEX:
@@ -517,8 +517,8 @@ int conf_write(const char *name)
fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str);
/* bbox */
fprintf(out_h, "#define ENABLE_%s 1\n", sym->name);
- fprintf(out_h, "#define USE_%s(...) __VA_ARGS__\n", sym->name);
- fprintf(out_h, "#define SKIP_%s(...)\n", sym->name);
+ fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name);
+ fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name);
}
break;
}
@@ -531,8 +531,8 @@ int conf_write(const char *name)
fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str);
/* bbox */
fprintf(out_h, "#define ENABLE_%s 1\n", sym->name);
- fprintf(out_h, "#define USE_%s(...) __VA_ARGS__\n", sym->name);
- fprintf(out_h, "#define SKIP_%s(...)\n", sym->name);
+ fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name);
+ fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name);
}
break;
}
diff --git a/selinux/setfiles.c b/selinux/setfiles.c
index 8185d78..b410d7e 100644
--- a/selinux/setfiles.c
+++ b/selinux/setfiles.c
@@ -544,9 +544,9 @@ int setfiles_main(int argc, char **argv)
&exclude_dir, &input_filename, &out_filename, &verbose);
} else { /* setfiles */
flags = getopt32(argv, "de:f:ilnpqr:svo:FW"
- USE_FEATURE_SETFILES_CHECK_OPTION("c:"),
+ IF_FEATURE_SETFILES_CHECK_OPTION("c:"),
&exclude_dir, &input_filename, &rootpath, &out_filename,
- USE_FEATURE_SETFILES_CHECK_OPTION(&policyfile,)
+ IF_FEATURE_SETFILES_CHECK_OPTION(&policyfile,)
&verbose);
}
diff --git a/shell/ash.c b/shell/ash.c
index c53b080..b27b277 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -56,11 +56,11 @@
/* STANDALONE does not make sense, and won't compile */
#undef CONFIG_FEATURE_SH_STANDALONE
#undef ENABLE_FEATURE_SH_STANDALONE
-#undef USE_FEATURE_SH_STANDALONE
-#undef SKIP_FEATURE_SH_STANDALONE(...)
+#undef IF_FEATURE_SH_STANDALONE
+#undef IF_NOT_FEATURE_SH_STANDALONE(...)
#define ENABLE_FEATURE_SH_STANDALONE 0
-#define USE_FEATURE_SH_STANDALONE(...)
-#define SKIP_FEATURE_SH_STANDALONE(...) __VA_ARGS__
+#define IF_FEATURE_SH_STANDALONE(...)
+#define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__
#endif
#ifndef PIPE_BUF
@@ -349,7 +349,7 @@ raise_interrupt(void)
} while (0)
#endif
-static USE_ASH_OPTIMIZE_FOR_SIZE(inline) void
+static IF_ASH_OPTIMIZE_FOR_SIZE(inline) void
int_on(void)
{
xbarrier();
@@ -358,7 +358,7 @@ int_on(void)
}
}
#define INT_ON int_on()
-static USE_ASH_OPTIMIZE_FOR_SIZE(inline) void
+static IF_ASH_OPTIMIZE_FOR_SIZE(inline) void
force_int_on(void)
{
xbarrier();
@@ -4219,7 +4219,7 @@ cmdputs(const char *s)
static const char vstype[VSTYPE + 1][3] = {
"", "}", "-", "+", "?", "=",
"%", "%%", "#", "##"
- USE_ASH_BASH_COMPAT(, ":", "/", "//")
+ IF_ASH_BASH_COMPAT(, ":", "/", "//")
};
const char *p, *str;
@@ -6069,9 +6069,9 @@ subevalvar(char *p, char *str, int strloc, int subtype,
char *startp;
char *loc;
char *rmesc, *rmescend;
- USE_ASH_BASH_COMPAT(char *repl = NULL;)
- USE_ASH_BASH_COMPAT(char null = '\0';)
- USE_ASH_BASH_COMPAT(int pos, len, orig_len;)
+ IF_ASH_BASH_COMPAT(char *repl = NULL;)
+ IF_ASH_BASH_COMPAT(char null = '\0';)
+ IF_ASH_BASH_COMPAT(int pos, len, orig_len;)
int saveherefd = herefd;
int amount, workloc, resetloc;
int zero;
@@ -6157,7 +6157,7 @@ subevalvar(char *p, char *str, int strloc, int subtype,
* stack will need rebasing, and we'll need to remove our work
* areas each time
*/
- USE_ASH_BASH_COMPAT(restart:)
+ IF_ASH_BASH_COMPAT(restart:)
amount = expdest - ((char *)stackblock() + resetloc);
STADJUST(-amount, expdest);
@@ -7083,7 +7083,7 @@ static int builtinloc = -1; /* index in path of %builtin, or -1 */
static void
-tryexec(USE_FEATURE_SH_STANDALONE(int applet_no,) char *cmd, char **argv, char **envp)
+tryexec(IF_FEATURE_SH_STANDALONE(int applet_no,) char *cmd, char **argv, char **envp)
{
int repeated = 0;
@@ -7155,13 +7155,13 @@ shellexec(char **argv, const char *path, int idx)
|| (applet_no = find_applet_by_name(argv[0])) >= 0
#endif
) {
- tryexec(USE_FEATURE_SH_STANDALONE(applet_no,) argv[0], argv, envp);
+ tryexec(IF_FEATURE_SH_STANDALONE(applet_no,) argv[0], argv, envp);
e = errno;
} else {
e = ENOENT;
while ((cmdname = padvance(&path, argv[0])) != NULL) {
if (--idx < 0 && pathopt == NULL) {
- tryexec(USE_FEATURE_SH_STANDALONE(-1,) cmdname, argv, envp);
+ tryexec(IF_FEATURE_SH_STANDALONE(-1,) cmdname, argv, envp);
if (errno != ENOENT && errno != ENOTDIR)
e = errno;
}
@@ -10789,7 +10789,7 @@ readtoken1(int firstc, int syntax, char *eofmark, int striptabs)
int parenlevel; /* levels of parens in arithmetic */
int dqvarnest; /* levels of variables expansion within double quotes */
- USE_ASH_BASH_COMPAT(smallint bash_dollar_squote = 0;)
+ IF_ASH_BASH_COMPAT(smallint bash_dollar_squote = 0;)
#if __GNUC__
/* Avoid longjmp clobbering */
@@ -10895,7 +10895,7 @@ readtoken1(int firstc, int syntax, char *eofmark, int striptabs)
dblquote = 1;
goto quotemark;
case CENDQUOTE:
- USE_ASH_BASH_COMPAT(bash_dollar_squote = 0;)
+ IF_ASH_BASH_COMPAT(bash_dollar_squote = 0;)
if (eofmark != NULL && arinest == 0
&& varnest == 0
) {
@@ -10994,7 +10994,7 @@ readtoken1(int firstc, int syntax, char *eofmark, int striptabs)
len = out - (char *)stackblock();
out = stackblock();
if (eofmark == NULL) {
- if ((c == '>' || c == '<' USE_ASH_BASH_COMPAT( || c == 0x100 + '>'))
+ if ((c == '>' || c == '<' IF_ASH_BASH_COMPAT( || c == 0x100 + '>'))
&& quotef == 0
) {
if (isdigit_str9(out)) {
@@ -11488,7 +11488,7 @@ xxreadtoken(void)
startlinno = g_parsefile->linno;
for (;;) { /* until token or start of word found */
c = pgetc_fast();
- if (c == ' ' || c == '\t' USE_ASH_ALIAS( || c == PEOA))
+ if (c == ' ' || c == '\t' IF_ASH_ALIAS( || c == PEOA))
continue;
if (c == '#') {
@@ -12454,8 +12454,8 @@ readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
rflag = 0;
prompt = NULL;
while ((i = nextopt("p:u:r"
- USE_ASH_READ_TIMEOUT("t:")
- USE_ASH_READ_NCHARS("n:s")
+ IF_ASH_READ_TIMEOUT("t:")
+ IF_ASH_READ_NCHARS("n:s")
)) != '\0') {
switch (i) {
case 'p':
diff --git a/shell/hush.c b/shell/hush.c
index d59a5de..58a57d9 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -97,11 +97,11 @@
/* STANDALONE does not make sense, and won't compile */
# undef CONFIG_FEATURE_SH_STANDALONE
# undef ENABLE_FEATURE_SH_STANDALONE
-# undef USE_FEATURE_SH_STANDALONE
-# define SKIP_FEATURE_SH_STANDALONE(...) __VA_ARGS__
+# undef IF_FEATURE_SH_STANDALONE
+# define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__
# define ENABLE_FEATURE_SH_STANDALONE 0
-# define USE_FEATURE_SH_STANDALONE(...)
-# define SKIP_FEATURE_SH_STANDALONE(...) __VA_ARGS__
+# define IF_FEATURE_SH_STANDALONE(...)
+# define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__
#endif
#if !ENABLE_HUSH_INTERACTIVE
@@ -2443,11 +2443,11 @@ static void re_execute_shell(char ***to_free, const char *s, char *g_argv0, char
goto do_exec;
}
- sprintf(param_buf, "-$%x:%x:%x" USE_HUSH_LOOPS(":%x")
+ sprintf(param_buf, "-$%x:%x:%x" IF_HUSH_LOOPS(":%x")
, (unsigned) G.root_pid
, (unsigned) G.last_bg_pid
, (unsigned) G.last_exitcode
- USE_HUSH_LOOPS(, G.depth_of_loop)
+ IF_HUSH_LOOPS(, G.depth_of_loop)
);
/* 1:hush 2:-$<pid>:<pid>:<exitcode>:<depth> <vars...> <funcs...>
* 3:-c 4:<cmd> 5:<arg0> <argN...> 6:NULL
@@ -3386,7 +3386,7 @@ static int run_pipe(struct pipe *pi)
debug_printf_exec("run_pipe start: members:%d\n", pi->num_cmds);
debug_enter();
- USE_HUSH_JOB(pi->pgrp = -1;)
+ IF_HUSH_JOB(pi->pgrp = -1;)
pi->stopped_cmds = 0;
command = &(pi->cmds[0]);
argv_expanded = NULL;
@@ -3821,7 +3821,7 @@ static int run_list(struct pipe *pi)
rcode = G.last_exitcode;
/* Go through list of pipes, (maybe) executing them. */
- for (; pi; pi = USE_HUSH_LOOPS(rword == RES_DONE ? loop_top : ) pi->next) {
+ for (; pi; pi = IF_HUSH_LOOPS(rword == RES_DONE ? loop_top : ) pi->next) {
if (G.flag_SIGINT)
break;
@@ -4773,7 +4773,7 @@ static FILE *generate_stream_from_string(const char *s)
close(channel[0]); /* NB: close _first_, then move fd! */
xmove_fd(channel[1], 1);
/* Prevent it from trying to handle ctrl-z etc */
- USE_HUSH_JOB(G.run_list_level = 1;)
+ IF_HUSH_JOB(G.run_list_level = 1;)
#if BB_MMU
reset_traps_to_defaults();
parse_and_run_string(s);
@@ -5441,7 +5441,7 @@ static struct pipe *parse_stream(char **pstring,
nommu_addchr(&ctx.as_string, ch);
is_ifs = strchr(G.ifs, ch);
is_special = strchr("<>;&|(){}#'" /* special outside of "str" */
- "\\$\"" USE_HUSH_TICK("`") /* always special */
+ "\\$\"" IF_HUSH_TICK("`") /* always special */
, ch);
if (!is_special && !is_ifs) { /* ordinary char */
@@ -5832,7 +5832,7 @@ static struct pipe *parse_stream(char **pstring,
}
/* Discard cached input, force prompt */
input->p = NULL;
- USE_HUSH_INTERACTIVE(input->promptme = 1;)
+ IF_HUSH_INTERACTIVE(input->promptme = 1;)
goto reset;
}
}
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index 8939103..7ab9620 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -66,7 +66,7 @@ struct shbuf_ds {
/*int markInterval;*/ \
/* level of messages to be logged */ \
int logLevel; \
-USE_FEATURE_ROTATE_LOGFILE( \
+IF_FEATURE_ROTATE_LOGFILE( \
/* max size of file before rotation */ \
unsigned logFileSize; \
/* number of rotated message files */ \
@@ -74,12 +74,12 @@ USE_FEATURE_ROTATE_LOGFILE( \
unsigned curFileSize; \
smallint isRegular; \
) \
-USE_FEATURE_REMOTE_LOG( \
+IF_FEATURE_REMOTE_LOG( \
/* udp socket for remote logging */ \
int remoteFD; \
len_and_sockaddr* remoteAddr; \
) \
-USE_FEATURE_IPC_SYSLOG( \
+IF_FEATURE_IPC_SYSLOG( \
int shmid; /* ipc shared memory id */ \
int s_semid; /* ipc semaphore id */ \
int shm_size; \
@@ -153,41 +153,41 @@ enum {
OPTBIT_outfile, // -O
OPTBIT_loglevel, // -l
OPTBIT_small, // -S
- USE_FEATURE_ROTATE_LOGFILE(OPTBIT_filesize ,) // -s
- USE_FEATURE_ROTATE_LOGFILE(OPTBIT_rotatecnt ,) // -b
- USE_FEATURE_REMOTE_LOG( OPTBIT_remotelog ,) // -R
- USE_FEATURE_REMOTE_LOG( OPTBIT_locallog ,) // -L
- USE_FEATURE_IPC_SYSLOG( OPTBIT_circularlog,) // -C
- USE_FEATURE_SYSLOGD_DUP( OPTBIT_dup ,) // -D
+ IF_FEATURE_ROTATE_LOGFILE(OPTBIT_filesize ,) // -s
+ IF_FEATURE_ROTATE_LOGFILE(OPTBIT_rotatecnt ,) // -b
+ IF_FEATURE_REMOTE_LOG( OPTBIT_remotelog ,) // -R
+ IF_FEATURE_REMOTE_LOG( OPTBIT_locallog ,) // -L
+ IF_FEATURE_IPC_SYSLOG( OPTBIT_circularlog,) // -C
+ IF_FEATURE_SYSLOGD_DUP( OPTBIT_dup ,) // -D
OPT_mark = 1 << OPTBIT_mark ,
OPT_nofork = 1 << OPTBIT_nofork ,
OPT_outfile = 1 << OPTBIT_outfile ,
OPT_loglevel = 1 << OPTBIT_loglevel,
OPT_small = 1 << OPTBIT_small ,
- OPT_filesize = USE_FEATURE_ROTATE_LOGFILE((1 << OPTBIT_filesize )) + 0,
- OPT_rotatecnt = USE_FEATURE_ROTATE_LOGFILE((1 << OPTBIT_rotatecnt )) + 0,
- OPT_remotelog = USE_FEATURE_REMOTE_LOG( (1 << OPTBIT_remotelog )) + 0,
- OPT_locallog = USE_FEATURE_REMOTE_LOG( (1 << OPTBIT_locallog )) + 0,
- OPT_circularlog = USE_FEATURE_IPC_SYSLOG( (1 << OPTBIT_circularlog)) + 0,
- OPT_dup = USE_FEATURE_SYSLOGD_DUP( (1 << OPTBIT_dup )) + 0,
+ OPT_filesize = IF_FEATURE_ROTATE_LOGFILE((1 << OPTBIT_filesize )) + 0,
+ OPT_rotatecnt = IF_FEATURE_ROTATE_LOGFILE((1 << OPTBIT_rotatecnt )) + 0,
+ OPT_remotelog = IF_FEATURE_REMOTE_LOG( (1 << OPTBIT_remotelog )) + 0,
+ OPT_locallog = IF_FEATURE_REMOTE_LOG( (1 << OPTBIT_locallog )) + 0,
+ OPT_circularlog = IF_FEATURE_IPC_SYSLOG( (1 << OPTBIT_circularlog)) + 0,
+ OPT_dup = IF_FEATURE_SYSLOGD_DUP( (1 << OPTBIT_dup )) + 0,
};
#define OPTION_STR "m:nO:l:S" \
- USE_FEATURE_ROTATE_LOGFILE("s:" ) \
- USE_FEATURE_ROTATE_LOGFILE("b:" ) \
- USE_FEATURE_REMOTE_LOG( "R:" ) \
- USE_FEATURE_REMOTE_LOG( "L" ) \
- USE_FEATURE_IPC_SYSLOG( "C::") \
- USE_FEATURE_SYSLOGD_DUP( "D" )
+ IF_FEATURE_ROTATE_LOGFILE("s:" ) \
+ IF_FEATURE_ROTATE_LOGFILE("b:" ) \
+ IF_FEATURE_REMOTE_LOG( "R:" ) \
+ IF_FEATURE_REMOTE_LOG( "L" ) \
+ IF_FEATURE_IPC_SYSLOG( "C::") \
+ IF_FEATURE_SYSLOGD_DUP( "D" )
#define OPTION_DECL *opt_m, *opt_l \
- USE_FEATURE_ROTATE_LOGFILE(,*opt_s) \
- USE_FEATURE_ROTATE_LOGFILE(,*opt_b) \
- USE_FEATURE_IPC_SYSLOG( ,*opt_C = NULL)
+ IF_FEATURE_ROTATE_LOGFILE(,*opt_s) \
+ IF_FEATURE_ROTATE_LOGFILE(,*opt_b) \
+ IF_FEATURE_IPC_SYSLOG( ,*opt_C = NULL)
#define OPTION_PARAM &opt_m, &G.logFilePath, &opt_l \
- USE_FEATURE_ROTATE_LOGFILE(,&opt_s) \
- USE_FEATURE_ROTATE_LOGFILE(,&opt_b) \
- USE_FEATURE_REMOTE_LOG( ,&G.remoteAddrStr) \
- USE_FEATURE_IPC_SYSLOG( ,&opt_C)
+ IF_FEATURE_ROTATE_LOGFILE(,&opt_s) \
+ IF_FEATURE_ROTATE_LOGFILE(,&opt_b) \
+ IF_FEATURE_REMOTE_LOG( ,&G.remoteAddrStr) \
+ IF_FEATURE_IPC_SYSLOG( ,&opt_C)
/* circular buffer variables/structures */
diff --git a/testsuite/all_sourcecode.tests b/testsuite/all_sourcecode.tests
index 45f4011..5b3f038 100755
--- a/testsuite/all_sourcecode.tests
+++ b/testsuite/all_sourcecode.tests
@@ -33,7 +33,7 @@ rm -f src.usage.escaped
# verify the applet order is correct in applets.h, otherwise
# applets won't be called properly.
#
-sed -n -e '/^USE_[A-Z]*(APPLET/{s:,.*::;s:.*(::;s:"::g;p}' \
+sed -n -e '/^IF_[A-Z]*(APPLET/{s:,.*::;s:.*(::;s:"::g;p}' \
$srcdir/../include/applets.h > applet.order.current
LC_ALL=C sort applet.order.current > applet.order.correct
testing "Applet order" "diff -u applet.order.current applet.order.correct" "" "" ""
diff --git a/util-linux/acpid.c b/util-linux/acpid.c
index 49ea52d..7dd4f5b 100644
--- a/util-linux/acpid.c
+++ b/util-linux/acpid.c
@@ -61,9 +61,9 @@ int acpid_main(int argc, char **argv)
const char *opt_logfile = "/var/log/acpid.log";
getopt32(argv, "c:e:l:d"
- USE_FEATURE_ACPID_COMPAT("g:m:s:S:v"),
+ IF_FEATURE_ACPID_COMPAT("g:m:s:S:v"),
&opt_conf, &opt_input, &opt_logfile
- USE_FEATURE_ACPID_COMPAT(, NULL, NULL, NULL, NULL, NULL)
+ IF_FEATURE_ACPID_COMPAT(, NULL, NULL, NULL, NULL, NULL)
);
// daemonize unless -d given
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index dc61e23..514b5d7 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -17,7 +17,7 @@
/* Looks like someone forgot to add this to config system */
#ifndef ENABLE_FEATURE_FDISK_BLKSIZE
# define ENABLE_FEATURE_FDISK_BLKSIZE 0
-# define USE_FEATURE_FDISK_BLKSIZE(a)
+# define IF_FEATURE_FDISK_BLKSIZE(a)
#endif
#define DEFAULT_SECTOR_SIZE 512
@@ -1302,7 +1302,7 @@ static int get_boot(void)
// or get_boot() [table is bad] -> create_sunlabel() -> get_boot(CREATE_EMPTY_SUN).
// (just factor out re-init of ptes[0,1,2,3] in a separate fn instead?)
// So skip opening device _again_...
- if (what == CREATE_EMPTY_DOS USE_FEATURE_SUN_LABEL(|| what == CREATE_EMPTY_SUN))
+ if (what == CREATE_EMPTY_DOS IF_FEATURE_SUN_LABEL(|| what == CREATE_EMPTY_SUN))
goto created_table;
fd = open(disk_device, (option_mask32 & OPT_l) ? O_RDONLY : O_RDWR);
@@ -1372,7 +1372,7 @@ static int get_boot(void)
"partition table, nor Sun, SGI or OSF "
"disklabel\n");
#ifdef __sparc__
- USE_FEATURE_SUN_LABEL(create_sunlabel();)
+ IF_FEATURE_SUN_LABEL(create_sunlabel();)
#else
create_doslabel();
#endif
@@ -1385,7 +1385,7 @@ static int get_boot(void)
#endif /* FEATURE_FDISK_WRITABLE */
- USE_FEATURE_FDISK_WRITABLE(warn_cylinders();)
+ IF_FEATURE_FDISK_WRITABLE(warn_cylinders();)
warn_geometry();
for (i = 0; i < 4; i++) {
@@ -1406,7 +1406,7 @@ static int get_boot(void)
pe->sectorbuffer[510],
pe->sectorbuffer[511],
i + 1);
- USE_FEATURE_FDISK_WRITABLE(pe->changed = 1;)
+ IF_FEATURE_FDISK_WRITABLE(pe->changed = 1;)
}
}
@@ -2797,7 +2797,7 @@ int fdisk_main(int argc, char **argv)
close_dev_fd(); /* needed: fd 3 must not stay closed */
opt_complementary = "b+:C+:H+:S+"; /* numeric params */
- opt = getopt32(argv, "b:C:H:lS:u" USE_FEATURE_FDISK_BLKSIZE("s"),
+ opt = getopt32(argv, "b:C:H:lS:u" IF_FEATURE_FDISK_BLKSIZE("s"),
&sector_size, &user_cylinders, &user_heads, &user_sectors);
argc -= optind;
argv += optind;
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index 78a7c82..0c33c1b 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -151,7 +151,7 @@ struct globals {
char superblock_buffer[BLOCK_SIZE];
char add_zone_ind_blk[BLOCK_SIZE];
char add_zone_dind_blk[BLOCK_SIZE];
- USE_FEATURE_MINIX2(char add_zone_tind_blk[BLOCK_SIZE];)
+ IF_FEATURE_MINIX2(char add_zone_tind_blk[BLOCK_SIZE];)
char check_file_blk[BLOCK_SIZE];
/* File-name data */
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c
index 48edd70..98d1ac2 100644
--- a/util-linux/hexdump.c
+++ b/util-linux/hexdump.c
@@ -41,7 +41,7 @@ static const char *const add_strings[] = {
static const char add_first[] ALIGN1 = "\"%07.7_Ax\n\"";
-static const char hexdump_opts[] ALIGN1 = "bcdoxCe:f:n:s:v" USE_FEATURE_HEXDUMP_REVERSE("R");
+static const char hexdump_opts[] ALIGN1 = "bcdoxCe:f:n:s:v" IF_FEATURE_HEXDUMP_REVERSE("R");
static const struct suffix_mult suffixes[] = {
{ "b", 512 },
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 694057b..d954feb 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -105,22 +105,22 @@ enum {
static const int32_t mount_options[] = {
// MS_FLAGS set a bit. ~MS_FLAGS disable that bit. 0 flags are NOPs.
- USE_FEATURE_MOUNT_LOOP(
+ IF_FEATURE_MOUNT_LOOP(
/* "loop" */ 0,
)
- USE_FEATURE_MOUNT_FSTAB(
+ IF_FEATURE_MOUNT_FSTAB(
/* "defaults" */ 0,
/* "quiet" 0 - do not filter out, vfat wants to see it */
/* "noauto" */ MOUNT_NOAUTO,
/* "sw" */ MOUNT_SWAP,
/* "swap" */ MOUNT_SWAP,
- USE_DESKTOP(/* "user" */ MOUNT_USERS,)
- USE_DESKTOP(/* "users" */ MOUNT_USERS,)
+ IF_DESKTOP(/* "user" */ MOUNT_USERS,)
+ IF_DESKTOP(/* "users" */ MOUNT_USERS,)
/* "_netdev" */ 0,
)
- USE_FEATURE_MOUNT_FLAGS(
+ IF_FEATURE_MOUNT_FLAGS(
// vfs flags
/* "nosuid" */ MS_NOSUID,
/* "suid" */ ~MS_NOSUID,
@@ -161,20 +161,20 @@ static const int32_t mount_options[] = {
};
static const char mount_option_str[] =
- USE_FEATURE_MOUNT_LOOP(
+ IF_FEATURE_MOUNT_LOOP(
"loop\0"
)
- USE_FEATURE_MOUNT_FSTAB(
+ IF_FEATURE_MOUNT_FSTAB(
"defaults\0"
// "quiet\0" - do not filter out, vfat wants to see it
"noauto\0"
"sw\0"
"swap\0"
- USE_DESKTOP("user\0")
- USE_DESKTOP("users\0")
+ IF_DESKTOP("user\0")
+ IF_DESKTOP("users\0")
"_netdev\0"
)
- USE_FEATURE_MOUNT_FLAGS(
+ IF_FEATURE_MOUNT_FLAGS(
// vfs flags
"nosuid\0"
"suid\0"
@@ -1781,9 +1781,9 @@ int mount_main(int argc UNUSED_PARAM, char **argv)
int i, j, rc = 0;
unsigned opt;
struct mntent mtpair[2], *mtcur = mtpair;
- SKIP_DESKTOP(const int nonroot = 0;)
+ IF_NOT_DESKTOP(const int nonroot = 0;)
- USE_DESKTOP(int nonroot = ) sanitize_env_if_suid();
+ IF_DESKTOP(int nonroot = ) sanitize_env_if_suid();
// Parse long options, like --bind and --move. Note that -o option
// and --option are synonymous. Yes, this means --remount,rw works.
@@ -1797,9 +1797,9 @@ int mount_main(int argc UNUSED_PARAM, char **argv)
// Parse remaining options
// Max 2 params; -o is a list, -v is a counter
- opt_complementary = "?2o::" USE_FEATURE_MOUNT_VERBOSE("vv");
+ opt_complementary = "?2o::" IF_FEATURE_MOUNT_VERBOSE("vv");
opt = getopt32(argv, OPTION_STR, &lst_o, &fstype, &O_optmatch
- USE_FEATURE_MOUNT_VERBOSE(, &verbose));
+ IF_FEATURE_MOUNT_VERBOSE(, &verbose));
while (lst_o) append_mount_options(&cmdopts, llist_pop(&lst_o)); // -o
if (opt & OPT_r) append_mount_options(&cmdopts, "ro"); // -r
if (opt & OPT_w) append_mount_options(&cmdopts, "rw"); // -w