summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/basename.c2
-rw-r--r--coreutils/cal.c2
-rw-r--r--coreutils/cat.c2
-rw-r--r--coreutils/catv.c2
-rw-r--r--coreutils/chgrp.c2
-rw-r--r--coreutils/chmod.c2
-rw-r--r--coreutils/chown.c2
-rw-r--r--coreutils/chroot.c2
-rw-r--r--coreutils/cksum.c2
-rw-r--r--coreutils/comm.c2
-rw-r--r--coreutils/cp.c2
-rw-r--r--coreutils/cut.c2
-rw-r--r--coreutils/date.c2
-rw-r--r--coreutils/dd.c2
-rw-r--r--coreutils/df.c2
-rw-r--r--coreutils/dirname.c2
-rw-r--r--coreutils/dos2unix.c2
-rw-r--r--coreutils/du.c2
-rw-r--r--coreutils/echo.c4
-rw-r--r--coreutils/env.c4
-rw-r--r--coreutils/expand.c2
-rw-r--r--coreutils/expr.c2
-rw-r--r--coreutils/false.c2
-rw-r--r--coreutils/fold.c2
-rw-r--r--coreutils/head.c2
-rw-r--r--coreutils/hostid.c2
-rw-r--r--coreutils/id.c2
-rw-r--r--coreutils/install.c2
-rw-r--r--coreutils/length.c2
-rw-r--r--coreutils/ln.c2
-rw-r--r--coreutils/logname.c2
-rw-r--r--coreutils/ls.c2
-rw-r--r--coreutils/md5_sha1_sum.c2
-rw-r--r--coreutils/mkdir.c2
-rw-r--r--coreutils/mkfifo.c2
-rw-r--r--coreutils/mknod.c2
-rw-r--r--coreutils/mv.c2
-rw-r--r--coreutils/nice.c2
-rw-r--r--coreutils/nohup.c2
-rw-r--r--coreutils/od.c2
-rw-r--r--coreutils/od_bloaty.c2
-rw-r--r--coreutils/printenv.c2
-rw-r--r--coreutils/printf.c2
-rw-r--r--coreutils/pwd.c2
-rw-r--r--coreutils/readlink.c2
-rw-r--r--coreutils/realpath.c2
-rw-r--r--coreutils/rm.c2
-rw-r--r--coreutils/rmdir.c2
-rw-r--r--coreutils/seq.c2
-rw-r--r--coreutils/sleep.c2
-rw-r--r--coreutils/sort.c2
-rw-r--r--coreutils/split.c2
-rw-r--r--coreutils/stat.c2
-rw-r--r--coreutils/stty.c2
-rw-r--r--coreutils/sum.c2
-rw-r--r--coreutils/sync.c2
-rw-r--r--coreutils/tail.c2
-rw-r--r--coreutils/tee.c2
-rw-r--r--coreutils/touch.c2
-rw-r--r--coreutils/tr.c2
-rw-r--r--coreutils/true.c2
-rw-r--r--coreutils/tty.c2
-rw-r--r--coreutils/uname.c2
-rw-r--r--coreutils/uniq.c2
-rw-r--r--coreutils/usleep.c2
-rw-r--r--coreutils/uudecode.c2
-rw-r--r--coreutils/uuencode.c2
-rw-r--r--coreutils/wc.c2
-rw-r--r--coreutils/who.c2
-rw-r--r--coreutils/whoami.c2
-rw-r--r--coreutils/yes.c2
71 files changed, 73 insertions, 73 deletions
diff --git a/coreutils/basename.c b/coreutils/basename.c
index ec1f85b..d536a1b 100644
--- a/coreutils/basename.c
+++ b/coreutils/basename.c
@@ -24,7 +24,7 @@
/* This is a NOFORK applet. Be very careful! */
-int basename_main(int argc, char **argv);
+int basename_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int basename_main(int argc, char **argv)
{
size_t m, n;
diff --git a/coreutils/cal.c b/coreutils/cal.c
index 3116e1e..8a08a9a 100644
--- a/coreutils/cal.c
+++ b/coreutils/cal.c
@@ -75,7 +75,7 @@ static char *build_row(char *p, unsigned *dp);
#define J_WEEK_LEN (WEEK_LEN + 7)
#define HEAD_SEP 2 /* spaces between day headings */
-int cal_main(int argc, char **argv);
+int cal_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cal_main(int argc, char **argv)
{
struct tm *local_time;
diff --git a/coreutils/cat.c b/coreutils/cat.c
index cd52778..a1db4cd 100644
--- a/coreutils/cat.c
+++ b/coreutils/cat.c
@@ -43,7 +43,7 @@ int bb_cat(char **argv)
return retval;
}
-int cat_main(int argc, char **argv);
+int cat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cat_main(int argc, char **argv)
{
getopt32(argv, "u");
diff --git a/coreutils/catv.c b/coreutils/catv.c
index 5d5a550..5f5f1bf 100644
--- a/coreutils/catv.c
+++ b/coreutils/catv.c
@@ -12,7 +12,7 @@
#include "libbb.h"
-int catv_main(int argc, char **argv);
+int catv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int catv_main(int argc, char **argv)
{
int retval = EXIT_SUCCESS;
diff --git a/coreutils/chgrp.c b/coreutils/chgrp.c
index 90a1cfe..7f39048 100644
--- a/coreutils/chgrp.c
+++ b/coreutils/chgrp.c
@@ -16,7 +16,7 @@
/* This is a NOEXEC applet. Be very careful! */
-int chgrp_main(int argc, char **argv);
+int chgrp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chgrp_main(int argc, char **argv)
{
/* "chgrp [opts] abc file(s)" == "chown [opts] :abc file(s)" */
diff --git a/coreutils/chmod.c b/coreutils/chmod.c
index dd7b784..a58e4f8 100644
--- a/coreutils/chmod.c
+++ b/coreutils/chmod.c
@@ -67,7 +67,7 @@ static int fileAction(const char *fileName, struct stat *statbuf, void* param, i
return FALSE;
}
-int chmod_main(int argc, char **argv);
+int chmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chmod_main(int argc, char **argv)
{
int retval = EXIT_SUCCESS;
diff --git a/coreutils/chown.c b/coreutils/chown.c
index d974493..df3b77d 100644
--- a/coreutils/chown.c
+++ b/coreutils/chown.c
@@ -61,7 +61,7 @@ static int fileAction(const char *fileName, struct stat *statbuf,
return FALSE;
}
-int chown_main(int argc, char **argv);
+int chown_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chown_main(int argc, char **argv)
{
int retval = EXIT_SUCCESS;
diff --git a/coreutils/chroot.c b/coreutils/chroot.c
index 192daa8..a3e70e9 100644
--- a/coreutils/chroot.c
+++ b/coreutils/chroot.c
@@ -11,7 +11,7 @@
#include "libbb.h"
-int chroot_main(int argc, char **argv);
+int chroot_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chroot_main(int argc, char **argv)
{
if (argc < 2) {
diff --git a/coreutils/cksum.c b/coreutils/cksum.c
index 987f5f3..dd274af 100644
--- a/coreutils/cksum.c
+++ b/coreutils/cksum.c
@@ -8,7 +8,7 @@
#include "libbb.h"
-int cksum_main(int argc, char **argv);
+int cksum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cksum_main(int argc, char **argv)
{
uint32_t *crc32_table = crc32_filltable(NULL, 1);
diff --git a/coreutils/comm.c b/coreutils/comm.c
index a4ab148..67088e0 100644
--- a/coreutils/comm.c
+++ b/coreutils/comm.c
@@ -35,7 +35,7 @@ static void writeline(char *line, int class, int flags)
fputs(line, stdout);
}
-int comm_main(int argc, char **argv);
+int comm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int comm_main(int argc, char **argv)
{
#define LINE_LEN 100
diff --git a/coreutils/cp.c b/coreutils/cp.c
index 046067f..6cf1e21 100644
--- a/coreutils/cp.c
+++ b/coreutils/cp.c
@@ -21,7 +21,7 @@
/* This is a NOEXEC applet. Be very careful! */
-int cp_main(int argc, char **argv);
+int cp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cp_main(int argc, char **argv)
{
struct stat source_stat;
diff --git a/coreutils/cut.c b/coreutils/cut.c
index 1cf49c2..257f3d6 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -165,7 +165,7 @@ static void cut_file(FILE * file)
static const char _op_on_field[] ALIGN1 = " only when operating on fields";
-int cut_main(int argc, char **argv);
+int cut_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cut_main(int argc, char **argv)
{
char *sopt, *ltok;
diff --git a/coreutils/date.c b/coreutils/date.c
index e33a977..a8e3393 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -38,7 +38,7 @@ static void maybe_set_utc(int opt)
putenv((char*)"TZ=UTC0");
}
-int date_main(int argc, char **argv);
+int date_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int date_main(int argc, char **argv)
{
time_t tm;
diff --git a/coreutils/dd.c b/coreutils/dd.c
index b9f5b4c..fd4e7e8 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -73,7 +73,7 @@ static bool write_and_stats(int fd, const void *buf, size_t len, size_t obs,
#define XATOU_SFX xatoul_sfx
#endif
-int dd_main(int argc, char **argv);
+int dd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dd_main(int argc, char **argv)
{
enum {
diff --git a/coreutils/df.c b/coreutils/df.c
index 6fe8e2f..ad6a4f3 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -29,7 +29,7 @@ static unsigned long kscale(unsigned long b, unsigned long bs)
}
#endif
-int df_main(int argc, char **argv);
+int df_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int df_main(int argc, char **argv)
{
unsigned long blocks_used;
diff --git a/coreutils/dirname.c b/coreutils/dirname.c
index fd2c381..c0c0925 100644
--- a/coreutils/dirname.c
+++ b/coreutils/dirname.c
@@ -14,7 +14,7 @@
/* This is a NOFORK applet. Be very careful! */
-int dirname_main(int argc, char **argv);
+int dirname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dirname_main(int argc, char **argv)
{
if (argc != 2) {
diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c
index 2811098..295be29 100644
--- a/coreutils/dos2unix.c
+++ b/coreutils/dos2unix.c
@@ -78,7 +78,7 @@ static int convert(char *fn, int conv_type)
return 0;
}
-int dos2unix_main(int argc, char **argv);
+int dos2unix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dos2unix_main(int argc, char **argv)
{
int o, conv_type;
diff --git a/coreutils/du.c b/coreutils/du.c
index 2697acf..3941151 100644
--- a/coreutils/du.c
+++ b/coreutils/du.c
@@ -140,7 +140,7 @@ static unsigned long du(const char *filename)
return sum;
}
-int du_main(int argc, char **argv);
+int du_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int du_main(int argc, char **argv)
{
unsigned long total;
diff --git a/coreutils/echo.c b/coreutils/echo.c
index 851d2ef..860853f 100644
--- a/coreutils/echo.c
+++ b/coreutils/echo.c
@@ -119,8 +119,8 @@ int bb_echo(char **argv)
/* This is a NOFORK applet. Be very careful! */
-int echo_main(int argc, char** argv);
-int echo_main(int argc, char** argv)
+int echo_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int echo_main(int argc, char **argv)
{
return bb_echo(argv);
}
diff --git a/coreutils/env.c b/coreutils/env.c
index 5d0cd82..b45cbcc 100644
--- a/coreutils/env.c
+++ b/coreutils/env.c
@@ -41,8 +41,8 @@ static const char env_longopts[] ALIGN1 =
;
#endif
-int env_main(int argc, char** argv);
-int env_main(int argc, char** argv)
+int env_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int env_main(int argc, char **argv)
{
/* cleanenv was static - why? */
char *cleanenv[1];
diff --git a/coreutils/expand.c b/coreutils/expand.c
index 0ef106d..96a74a3 100644
--- a/coreutils/expand.c
+++ b/coreutils/expand.c
@@ -125,7 +125,7 @@ static void unexpand(FILE *file, unsigned int tab_size, unsigned opt)
}
#endif
-int expand_main(int argc, char **argv);
+int expand_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int expand_main(int argc, char **argv)
{
/* Default 8 spaces for 1 tab */
diff --git a/coreutils/expr.c b/coreutils/expr.c
index c2d9669..959f520 100644
--- a/coreutils/expr.c
+++ b/coreutils/expr.c
@@ -483,7 +483,7 @@ static VALUE *eval(void)
return l;
}
-int expr_main(int argc, char **argv);
+int expr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int expr_main(int argc, char **argv)
{
VALUE *v;
diff --git a/coreutils/false.c b/coreutils/false.c
index 07cf9e8..5beb58a 100644
--- a/coreutils/false.c
+++ b/coreutils/false.c
@@ -14,7 +14,7 @@
/* This is a NOFORK applet. Be very careful! */
-int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv);
+int false_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv)
{
return EXIT_FAILURE;
diff --git a/coreutils/fold.c b/coreutils/fold.c
index bf4b198..ed484ed 100644
--- a/coreutils/fold.c
+++ b/coreutils/fold.c
@@ -38,7 +38,7 @@ static int adjust_column(int column, char c)
return column;
}
-int fold_main(int argc, char **argv);
+int fold_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int fold_main(int argc, char **argv)
{
char *line_out = NULL;
diff --git a/coreutils/head.c b/coreutils/head.c
index af9e9f4..6293077 100644
--- a/coreutils/head.c
+++ b/coreutils/head.c
@@ -31,7 +31,7 @@ static const struct suffix_mult head_suffixes[] = {
static const char header_fmt_str[] ALIGN1 = "\n==> %s <==\n";
-int head_main(int argc, char **argv);
+int head_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int head_main(int argc, char **argv)
{
unsigned long count = 10;
diff --git a/coreutils/hostid.c b/coreutils/hostid.c
index 7d96651..433eccc 100644
--- a/coreutils/hostid.c
+++ b/coreutils/hostid.c
@@ -13,7 +13,7 @@
/* This is a NOFORK applet. Be very careful! */
-int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv);
+int hostid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv)
{
if (argc > 1) {
diff --git a/coreutils/id.c b/coreutils/id.c
index f72a027..7dba802 100644
--- a/coreutils/id.c
+++ b/coreutils/id.c
@@ -36,7 +36,7 @@ static int printf_full(unsigned int id, const char *arg, const char prefix)
return status;
}
-int id_main(int argc, char **argv);
+int id_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int id_main(int argc, char **argv)
{
struct passwd *p;
diff --git a/coreutils/install.c b/coreutils/install.c
index 5162084..4adcadb 100644
--- a/coreutils/install.c
+++ b/coreutils/install.c
@@ -66,7 +66,7 @@ static void setdefaultfilecon(const char *path)
#endif
-int install_main(int argc, char **argv);
+int install_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int install_main(int argc, char **argv)
{
struct stat statbuf;
diff --git a/coreutils/length.c b/coreutils/length.c
index a310b3b..c7523a0 100644
--- a/coreutils/length.c
+++ b/coreutils/length.c
@@ -6,7 +6,7 @@
/* This is a NOFORK applet. Be very careful! */
-int length_main(int argc, char **argv);
+int length_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int length_main(int argc, char **argv)
{
if ((argc != 2) || (**(++argv) == '-')) {
diff --git a/coreutils/ln.c b/coreutils/ln.c
index 658e32e..eb71719 100644
--- a/coreutils/ln.c
+++ b/coreutils/ln.c
@@ -22,7 +22,7 @@
#define LN_BACKUP 8
#define LN_SUFFIX 16
-int ln_main(int argc, char **argv);
+int ln_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ln_main(int argc, char **argv)
{
int status = EXIT_SUCCESS;
diff --git a/coreutils/logname.c b/coreutils/logname.c
index 2e628bc..09fd396 100644
--- a/coreutils/logname.c
+++ b/coreutils/logname.c
@@ -24,7 +24,7 @@
/* This is a NOFORK applet. Be very careful! */
-int logname_main(int argc, char ATTRIBUTE_UNUSED **argv);
+int logname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int logname_main(int argc, char ATTRIBUTE_UNUSED **argv)
{
char buf[128];
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 92a9a28..dbf1c5b 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -783,7 +783,7 @@ static const unsigned opt_flags[] = {
/* THIS IS A "SAFE" APPLET, main() MAY BE CALLED INTERNALLY FROM SHELL */
/* BE CAREFUL! */
-int ls_main(int argc, char **argv);
+int ls_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ls_main(int argc, char **argv)
{
struct dnode **dnd;
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c
index 7f8b084..e94f2ce 100644
--- a/coreutils/md5_sha1_sum.c
+++ b/coreutils/md5_sha1_sum.c
@@ -77,7 +77,7 @@ static uint8_t *hash_file(const char *filename, hash_algo_t hash_algo)
return hash_value;
}
-int md5_sha1_sum_main(int argc, char **argv);
+int md5_sha1_sum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int md5_sha1_sum_main(int argc, char **argv)
{
int return_value = EXIT_SUCCESS;
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c
index d1a4380..6bdf76d 100644
--- a/coreutils/mkdir.c
+++ b/coreutils/mkdir.c
@@ -34,7 +34,7 @@ static const char mkdir_longopts[] ALIGN1 =
;
#endif
-int mkdir_main(int argc, char **argv);
+int mkdir_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mkdir_main(int argc, char **argv)
{
mode_t mode = (mode_t)(-1);
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c
index e66f817..d298ada 100644
--- a/coreutils/mkfifo.c
+++ b/coreutils/mkfifo.c
@@ -13,7 +13,7 @@
#include "libbb.h"
#include "libcoreutils/coreutils.h"
-int mkfifo_main(int argc, char **argv);
+int mkfifo_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mkfifo_main(int argc, char **argv)
{
mode_t mode;
diff --git a/coreutils/mknod.c b/coreutils/mknod.c
index a876daa..ee539e3 100644
--- a/coreutils/mknod.c
+++ b/coreutils/mknod.c
@@ -17,7 +17,7 @@
static const char modes_chars[] ALIGN1 = { 'p', 'c', 'u', 'b', 0, 1, 1, 2 };
static const mode_t modes_cubp[] = { S_IFIFO, S_IFCHR, S_IFBLK };
-int mknod_main(int argc, char **argv);
+int mknod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mknod_main(int argc, char **argv)
{
mode_t mode;
diff --git a/coreutils/mv.c b/coreutils/mv.c
index d13f4d5..5d0b515 100644
--- a/coreutils/mv.c
+++ b/coreutils/mv.c
@@ -33,7 +33,7 @@ static const char mv_longopts[] ALIGN1 =
static const char fmt[] ALIGN1 =
"cannot overwrite %sdirectory with %sdirectory";
-int mv_main(int argc, char **argv);
+int mv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int mv_main(int argc, char **argv)
{
struct stat dest_stat;
diff --git a/coreutils/nice.c b/coreutils/nice.c
index 0cb31e4..d24a95b 100644
--- a/coreutils/nice.c
+++ b/coreutils/nice.c
@@ -10,7 +10,7 @@
#include <sys/resource.h>
#include "libbb.h"
-int nice_main(int argc, char **argv);
+int nice_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int nice_main(int argc, char **argv)
{
int old_priority, adjustment;
diff --git a/coreutils/nohup.c b/coreutils/nohup.c
index e27bd2e..da8f58c 100644
--- a/coreutils/nohup.c
+++ b/coreutils/nohup.c
@@ -12,7 +12,7 @@
#include "libbb.h"
-int nohup_main(int argc, char **argv);
+int nohup_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int nohup_main(int argc, char **argv)
{
int nullfd;
diff --git a/coreutils/od.c b/coreutils/od.c
index 114a746..85e979f 100644
--- a/coreutils/od.c
+++ b/coreutils/od.c
@@ -156,7 +156,7 @@ static const char od_o2si[] ALIGN1 = {
0xb, 1, 8, 9,
};
-int od_main(int argc, char **argv);
+int od_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int od_main(int argc, char **argv)
{
int ch;
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c
index 1bd1b0c..9655c23 100644
--- a/coreutils/od_bloaty.c
+++ b/coreutils/od_bloaty.c
@@ -1196,7 +1196,7 @@ dump_strings(void)
check_and_close();
}
-int od_main(int argc, char **argv);
+int od_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int od_main(int argc, char **argv)
{
static const struct suffix_mult bkm[] = {
diff --git a/coreutils/printenv.c b/coreutils/printenv.c
index 19fa832..bac77e2 100644
--- a/coreutils/printenv.c
+++ b/coreutils/printenv.c
@@ -11,7 +11,7 @@
#include "libbb.h"
extern char **environ;
-int printenv_main(int argc, char **argv);
+int printenv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int printenv_main(int argc, char **argv)
{
/* no variables specified, show whole env */
diff --git a/coreutils/printf.c b/coreutils/printf.c
index d5ef32e..a9ef61f 100644
--- a/coreutils/printf.c
+++ b/coreutils/printf.c
@@ -285,7 +285,7 @@ static int print_formatted(char *format, int argc, char **argv)
return save_argc - argc;
}
-int printf_main(int argc, char **argv);
+int printf_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int printf_main(int argc, char **argv)
{
char *format;
diff --git a/coreutils/pwd.c b/coreutils/pwd.c
index 73a9d5b..ac604db 100644
--- a/coreutils/pwd.c
+++ b/coreutils/pwd.c
@@ -11,7 +11,7 @@
/* This is a NOFORK applet. Be very careful! */
-int pwd_main(int argc, char **argv);
+int pwd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int pwd_main(int argc, char **argv)
{
char *buf;
diff --git a/coreutils/readlink.c b/coreutils/readlink.c
index 39edc05..b6e389a 100644
--- a/coreutils/readlink.c
+++ b/coreutils/readlink.c
@@ -11,7 +11,7 @@
#include "libbb.h"
-int readlink_main(int argc, char **argv);
+int readlink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int readlink_main(int argc, char **argv)
{
char *buf;
diff --git a/coreutils/realpath.c b/coreutils/realpath.c
index 9c42987..bcb73a8 100644
--- a/coreutils/realpath.c
+++ b/coreutils/realpath.c
@@ -12,7 +12,7 @@
#include "libbb.h"
-int realpath_main(int argc, char **argv);
+int realpath_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int realpath_main(int argc, char **argv)
{
int retval = EXIT_SUCCESS;
diff --git a/coreutils/rm.c b/coreutils/rm.c
index a686fc4..a123156 100644
--- a/coreutils/rm.c
+++ b/coreutils/rm.c
@@ -19,7 +19,7 @@
/* This is a NOFORK applet. Be very careful! */
-int rm_main(int argc, char **argv);
+int rm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int rm_main(int argc, char **argv)
{
int status = 0;
diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c
index 315401e..71d29dd 100644
--- a/coreutils/rmdir.c
+++ b/coreutils/rmdir.c
@@ -16,7 +16,7 @@
/* This is a NOFORK applet. Be very careful! */
-int rmdir_main(int argc, char **argv);
+int rmdir_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int rmdir_main(int argc, char **argv)
{
int status = EXIT_SUCCESS;
diff --git a/coreutils/seq.c b/coreutils/seq.c
index 050c333..01d71f2 100644
--- a/coreutils/seq.c
+++ b/coreutils/seq.c
@@ -12,7 +12,7 @@
/* This is a NOFORK applet. Be very careful! */
-int seq_main(int argc, char **argv);
+int seq_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int seq_main(int argc, char **argv)
{
double last, increment, i;
diff --git a/coreutils/sleep.c b/coreutils/sleep.c
index 26cdbc4..6890e35 100644
--- a/coreutils/sleep.c
+++ b/coreutils/sleep.c
@@ -33,7 +33,7 @@ static const struct suffix_mult sfx[] = {
};
#endif
-int sleep_main(int argc, char **argv);
+int sleep_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sleep_main(int argc, char **argv)
{
unsigned duration;
diff --git a/coreutils/sort.c b/coreutils/sort.c
index 311c774..3132346 100644
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -274,7 +274,7 @@ static unsigned str2u(char **str)
}
#endif
-int sort_main(int argc, char **argv);
+int sort_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sort_main(int argc, char **argv)
{
FILE *fp, *outfile = stdout;
diff --git a/coreutils/split.c b/coreutils/split.c
index 6d8924a..51a631c 100644
--- a/coreutils/split.c
+++ b/coreutils/split.c
@@ -55,7 +55,7 @@ enum { READ_BUFFER_SIZE = COMMON_BUFSIZE - 1 };
#define SPLIT_OPT_b (1<<1)
#define SPLIT_OPT_a (1<<2)
-int split_main(int argc, char **argv);
+int split_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int split_main(int argc, char **argv)
{
unsigned suffix_len = 2;
diff --git a/coreutils/stat.c b/coreutils/stat.c
index ed6580e..a5a3054 100644
--- a/coreutils/stat.c
+++ b/coreutils/stat.c
@@ -609,7 +609,7 @@ static bool do_stat(const char *filename, const char *format)
return 1;
}
-int stat_main(int argc, char **argv);
+int stat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int stat_main(int argc, char **argv)
{
char *format = NULL;
diff --git a/coreutils/stty.c b/coreutils/stty.c
index 1f0d422..8ad12e6 100644
--- a/coreutils/stty.c
+++ b/coreutils/stty.c
@@ -911,7 +911,7 @@ static void set_control_char_or_die(const struct control_info *info,
#define STTY_verbose_output (1<<2)
#define STTY_recoverable_output (1<<3)
#define STTY_noargs (1<<4)
-int stty_main(int argc, char **argv);
+int stty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int stty_main(int argc, char **argv)
{
struct termios mode;
diff --git a/coreutils/sum.c b/coreutils/sum.c
index a75dd32..65478b0 100644
--- a/coreutils/sum.c
+++ b/coreutils/sum.c
@@ -74,7 +74,7 @@ static unsigned sum_file(const char *file, const unsigned type)
#undef buf
}
-int sum_main(int argc, char **argv);
+int sum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sum_main(int argc, char **argv)
{
unsigned n;
diff --git a/coreutils/sync.c b/coreutils/sync.c
index d562f3f..9dbdd98 100644
--- a/coreutils/sync.c
+++ b/coreutils/sync.c
@@ -13,7 +13,7 @@
/* This is a NOFORK applet. Be very careful! */
-int sync_main(int argc, char **argv);
+int sync_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sync_main(int argc, char **argv)
{
bb_warn_ignoring_args(argc - 1);
diff --git a/coreutils/tail.c b/coreutils/tail.c
index 53dbf33..beecbae 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -79,7 +79,7 @@ static unsigned eat_num(const char *p)
return xatou_sfx(p, tail_suffixes);
}
-int tail_main(int argc, char **argv);
+int tail_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tail_main(int argc, char **argv)
{
unsigned count = 10;
diff --git a/coreutils/tee.c b/coreutils/tee.c
index 8313258..13fb4a3 100644
--- a/coreutils/tee.c
+++ b/coreutils/tee.c
@@ -13,7 +13,7 @@
#include "libbb.h"
#include <signal.h>
-int tee_main(int argc, char **argv);
+int tee_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tee_main(int argc, char **argv)
{
const char *mode = "w\0a";
diff --git a/coreutils/touch.c b/coreutils/touch.c
index d8498d8..1b83dc4 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -21,7 +21,7 @@
/* This is a NOFORK applet. Be very careful! */
-int touch_main(int argc, char **argv);
+int touch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int touch_main(int argc, char **argv)
{
int fd;
diff --git a/coreutils/tr.c b/coreutils/tr.c
index 6a34e30..9521bbc 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -165,7 +165,7 @@ static int complement(char *buffer, int buffer_len)
return ix;
}
-int tr_main(int argc, char **argv);
+int tr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tr_main(int argc, char **argv)
{
unsigned char *ptr;
diff --git a/coreutils/true.c b/coreutils/true.c
index 9dcd69a..2b59193 100644
--- a/coreutils/true.c
+++ b/coreutils/true.c
@@ -14,7 +14,7 @@
/* This is a NOFORK applet. Be very careful! */
-int true_main(int argc, char **argv);
+int true_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int true_main(int argc, char **argv)
{
return EXIT_SUCCESS;
diff --git a/coreutils/tty.c b/coreutils/tty.c
index d8ce78c..b0a50ff 100644
--- a/coreutils/tty.c
+++ b/coreutils/tty.c
@@ -12,7 +12,7 @@
#include "libbb.h"
-int tty_main(int argc, char **argv);
+int tty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tty_main(int argc, char **argv)
{
const char *s;
diff --git a/coreutils/uname.c b/coreutils/uname.c
index e70b1f9..2eecb5d 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -48,7 +48,7 @@ static const unsigned short utsname_offset[] ALIGN2 = {
offsetof(uname_info_t,processor)
};
-int uname_main(int argc, char **argv);
+int uname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int uname_main(int argc, char **argv)
{
uname_info_t uname_info;
diff --git a/coreutils/uniq.c b/coreutils/uniq.c
index 719bbb5..cda1e61 100644
--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -27,7 +27,7 @@ static FILE *xgetoptfile_uniq_s(char **argv, int read0write2)
return (read0write2) ? stdout : stdin;
}
-int uniq_main(int argc, char **argv);
+int uniq_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int uniq_main(int argc, char **argv)
{
FILE *in, *out;
diff --git a/coreutils/usleep.c b/coreutils/usleep.c
index e0cd56e..1c90223 100644
--- a/coreutils/usleep.c
+++ b/coreutils/usleep.c
@@ -13,7 +13,7 @@
/* This is a NOFORK applet. Be very careful! */
-int usleep_main(int argc, char **argv);
+int usleep_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int usleep_main(int argc, char **argv)
{
if (argc != 2) {
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c
index 7a52bdb..4683662 100644
--- a/coreutils/uudecode.c
+++ b/coreutils/uudecode.c
@@ -126,7 +126,7 @@ static void read_base64(FILE *src_stream, FILE *dst_stream)
}
}
-int uudecode_main(int argc, char **argv);
+int uudecode_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int uudecode_main(int argc, char **argv)
{
FILE *src_stream = stdin;
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index 17def8d..e19f996 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -15,7 +15,7 @@ enum {
DST_BUF_SIZE = 4 * ((SRC_BUF_SIZE + 2) / 3),
};
-int uuencode_main(int argc, char **argv);
+int uuencode_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int uuencode_main(int argc, char **argv)
{
struct stat stat_buf;
diff --git a/coreutils/wc.c b/coreutils/wc.c
index c8a4865..291af41 100644
--- a/coreutils/wc.c
+++ b/coreutils/wc.c
@@ -68,7 +68,7 @@ enum {
WC_LENGTH = 3
};
-int wc_main(int argc, char **argv);
+int wc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int wc_main(int argc, char **argv)
{
FILE *fp;
diff --git a/coreutils/who.c b/coreutils/who.c
index 546050a..6e7710c 100644
--- a/coreutils/who.c
+++ b/coreutils/who.c
@@ -39,7 +39,7 @@ static void idle_string(char *str6, time_t t)
strcpy(str6, "old");
}
-int who_main(int argc, char **argv);
+int who_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int who_main(int argc, char **argv)
{
char str6[6];
diff --git a/coreutils/whoami.c b/coreutils/whoami.c
index 3718358..e2fdfc9 100644
--- a/coreutils/whoami.c
+++ b/coreutils/whoami.c
@@ -13,7 +13,7 @@
/* This is a NOFORK applet. Be very careful! */
-int whoami_main(int argc, char **argv);
+int whoami_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int whoami_main(int argc, char **argv)
{
if (argc > 1)
diff --git a/coreutils/yes.c b/coreutils/yes.c
index 5529eab..269d2a0 100644
--- a/coreutils/yes.c
+++ b/coreutils/yes.c
@@ -18,7 +18,7 @@
/* This is a NOFORK applet. Be very careful! */
-int yes_main(int argc, char **argv);
+int yes_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int yes_main(int argc, char **argv)
{
char **first_arg;