*: mass renaming of USE_XXXX to IF_XXXX
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially
badly named. It was not skipping anything!
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 @@
/* 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 @@
/* 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_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 @@
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 @@
);
#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 @@
}
#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 @@
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 @@
}
#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);
}