Robert P. Day removed 8 gazillion occurrences of "extern" on function
authorRob Landley <rob@landley.net>
Mon, 6 Mar 2006 20:47:33 +0000 (20:47 -0000)
committerRob Landley <rob@landley.net>
Mon, 6 Mar 2006 20:47:33 +0000 (20:47 -0000)
definitions.  (That should only be on prototypes.)

168 files changed:
applets/applets.c
archival/ar.c
archival/cpio.c
archival/dpkg_deb.c
archival/gunzip.c
archival/libunarchive/archive_xread_all.c
archival/libunarchive/archive_xread_all_eof.c
archival/libunarchive/check_header_gzip.c
archival/libunarchive/data_align.c
archival/libunarchive/data_extract_all.c
archival/libunarchive/data_extract_to_buffer.c
archival/libunarchive/data_extract_to_stdout.c
archival/libunarchive/data_skip.c
archival/libunarchive/decompress_bunzip2.c
archival/libunarchive/decompress_uncompress.c
archival/libunarchive/decompress_unzip.c
archival/libunarchive/filter_accept_all.c
archival/libunarchive/filter_accept_list.c
archival/libunarchive/filter_accept_list_reassign.c
archival/libunarchive/filter_accept_reject_list.c
archival/libunarchive/find_list_entry.c
archival/libunarchive/get_header_ar.c
archival/libunarchive/get_header_cpio.c
archival/libunarchive/get_header_tar.c
archival/libunarchive/get_header_tar_bz2.c
archival/libunarchive/get_header_tar_gz.c
archival/libunarchive/header_list.c
archival/libunarchive/header_skip.c
archival/libunarchive/header_verbose_list.c
archival/libunarchive/open_transformer.c
archival/libunarchive/seek_by_char.c
archival/libunarchive/seek_by_jump.c
archival/libunarchive/unpack_ar_archive.c
archival/rpm2cpio.c
archival/uncompress.c
archival/unzip.c
console-tools/clear.c
console-tools/loadfont.c
console-tools/reset.c
coreutils/basename.c
coreutils/cat.c
coreutils/cp.c
coreutils/cut.c
coreutils/df.c
coreutils/dirname.c
coreutils/echo.c
coreutils/env.c
coreutils/false.c
coreutils/fold.c
coreutils/hostid.c
coreutils/id.c
coreutils/install.c
coreutils/length.c
coreutils/libcoreutils/cp_mv_stat.c
coreutils/libcoreutils/getopt_mk_fifo_nod.c
coreutils/ln.c
coreutils/logname.c
coreutils/ls.c
coreutils/mkdir.c
coreutils/mkfifo.c
coreutils/mknod.c
coreutils/mv.c
coreutils/pwd.c
coreutils/rm.c
coreutils/rmdir.c
coreutils/seq.c
coreutils/sleep.c
coreutils/stty.c
coreutils/sync.c
coreutils/test.c
coreutils/touch.c
coreutils/tr.c
coreutils/true.c
coreutils/tty.c
coreutils/usleep.c
coreutils/uudecode.c
coreutils/watch.c
coreutils/who.c
coreutils/whoami.c
coreutils/yes.c
debianutils/mktemp.c
debianutils/pipe_progress.c
debianutils/which.c
e2fsprogs/blkid/dev.c
e2fsprogs/blkid/tag.c
e2fsprogs/e2fsck.c
editors/awk.c
editors/patch.c
editors/sed.c
editors/vi.c
findutils/grep.c
init/init.c
init/init_shared.c
init/mesg.c
libbb/bb_echo.c
libbb/concat_path_file.c
libbb/concat_subpath_file.c
libbb/copyfd.c
libbb/device_open.c
libbb/error_msg.c
libbb/error_msg_and_die.c
libbb/find_mount_point.c
libbb/find_pid_by_name.c
libbb/find_root_device.c
libbb/get_line_from_file.c
libbb/herror_msg.c
libbb/herror_msg_and_die.c
libbb/kernel_version.c
libbb/llist.c
libbb/obscure.c
libbb/parse_mode.c
libbb/perror_msg.c
libbb/perror_msg_and_die.c
libbb/perror_nomsg.c
libbb/perror_nomsg_and_die.c
libbb/print_file.c
libbb/printf.c
libbb/procps.c
libbb/pw_encrypt.c
libbb/remove_file.c
libbb/run_parts.c
libbb/safe_strncpy.c
libbb/skip_whitespace.c
libbb/vdprintf.c
libbb/verror_msg.c
libbb/vherror_msg.c
libbb/vperror_msg.c
libbb/warn_ignoring_args.c
libbb/xfuncs.c
libbb/xgetlarg.c
libbb/xreadlink.c
loginutils/login.c
loginutils/passwd.c
loginutils/sulogin.c
loginutils/vlock.c
miscutils/eject.c
miscutils/last.c
miscutils/makedevs.c
miscutils/mt.c
miscutils/time.c
modutils/insmod.c
modutils/lsmod.c
modutils/modprobe.c
modutils/rmmod.c
networking/ifupdown.c
networking/libiproute/ipaddress.c
networking/ping.c
networking/ping6.c
networking/telnet.c
procps/free.c
procps/kill.c
procps/pidof.c
procps/ps.c
procps/uptime.c
shell/cmdedit.c
shell/msh.c
sysklogd/klogd.c
sysklogd/logger.c
sysklogd/logread.c
sysklogd/syslogd.c
util-linux/fbset.c
util-linux/fdflush.c
util-linux/fsck_minix.c
util-linux/hwclock.c
util-linux/mkfs_minix.c
util-linux/more.c
util-linux/swaponoff.c
util-linux/umount.c

index de1a871..bbe1203 100644 (file)
@@ -405,7 +405,7 @@ static void check_suid (struct BB_applet *applet)
 
 
 
-extern void bb_show_usage (void)
+void bb_show_usage (void)
 {
   const char *format_string;
   const char *usage_string = usage_messages;
index 05cb231..7782af8 100644 (file)
@@ -57,7 +57,7 @@ static void header_verbose_list_ar(const file_header_t *file_header)
 #define AR_OPT_CREATE          0x20
 #define AR_OPT_INSERT          0x40
 
-extern int ar_main(int argc, char **argv)
+int ar_main(int argc, char **argv)
 {
        archive_handle_t *archive_handle;
        unsigned long opt;
index 820f03e..26f845b 100644 (file)
@@ -38,7 +38,7 @@
 #define CPIO_OPT_CREATE_LEADING_DIR    0x20
 #define CPIO_OPT_PRESERVE_MTIME                0x40
 
-extern int cpio_main(int argc, char **argv)
+int cpio_main(int argc, char **argv)
 {
        archive_handle_t *archive_handle;
        char *cpio_filename = NULL;
index 29e9719..fa89e44 100644 (file)
@@ -28,7 +28,7 @@
 #define DPKG_DEB_OPT_EXTRACT   8
 #define DPKG_DEB_OPT_EXTRACT_VERBOSE   16
 
-extern int dpkg_deb_main(int argc, char **argv)
+int dpkg_deb_main(int argc, char **argv)
 {
        archive_handle_t *ar_archive;
        archive_handle_t *tar_archive;
index 76738b0..4fb7704 100644 (file)
@@ -75,7 +75,7 @@ static char *license_msg[] = {
 #define GUNZIP_OPT_TEST                4
 #define GUNZIP_OPT_DECOMPRESS  8
 
-extern int gunzip_main(int argc, char **argv)
+int gunzip_main(int argc, char **argv)
 {
        char status = EXIT_SUCCESS;
        unsigned long opt;
index ba9ade2..ebd64dc 100644 (file)
@@ -20,7 +20,7 @@
 #include "unarchive.h"
 #include "libbb.h"
 
-extern void archive_xread_all(const archive_handle_t *archive_handle, void *buf, const size_t count)
+void archive_xread_all(const archive_handle_t *archive_handle, void *buf, const size_t count)
 {
        ssize_t size;
 
index f1eea29..d858797 100644 (file)
@@ -20,7 +20,7 @@
 #include "unarchive.h"
 #include "libbb.h"
 
-extern ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned char *buf, size_t count)
+ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned char *buf, size_t count)
 {
        ssize_t size;
 
index 9e065c4..a8ecf37 100644 (file)
@@ -3,7 +3,7 @@
 #include "libbb.h"
 #include "unarchive.h" /* for external decl of check_header_gzip */
 
-extern void check_header_gzip(int src_fd)
+void check_header_gzip(int src_fd)
 {
        union {
                unsigned char raw[8];
index 1d43395..e4a3640 100644 (file)
@@ -22,7 +22,7 @@
 #include "libbb.h"
 #include "unarchive.h"
 
-extern void data_align(archive_handle_t *archive_handle, const unsigned short boundary)
+void data_align(archive_handle_t *archive_handle, const unsigned short boundary)
 {
        const unsigned short skip_amount = (boundary - (archive_handle->offset % boundary)) % boundary;
 
index 42e4423..588b081 100644 (file)
@@ -27,7 +27,7 @@
 #include "libbb.h"
 #include "unarchive.h"
 
-extern void data_extract_all(archive_handle_t *archive_handle)
+void data_extract_all(archive_handle_t *archive_handle)
 {
        file_header_t *file_header = archive_handle->file_header;
        int dst_fd;
index db5521b..1255fe1 100644 (file)
@@ -17,7 +17,7 @@
 #include "libbb.h"
 #include "unarchive.h"
 
-extern void data_extract_to_buffer(archive_handle_t *archive_handle)
+void data_extract_to_buffer(archive_handle_t *archive_handle)
 {
        const unsigned int size = archive_handle->file_header->size;
 
index df2bca6..f1be5dc 100644 (file)
@@ -17,7 +17,7 @@
 #include "unarchive.h"
 #include <unistd.h>
 
-extern void data_extract_to_stdout(archive_handle_t *archive_handle)
+void data_extract_to_stdout(archive_handle_t *archive_handle)
 {
        bb_copyfd_size(archive_handle->src_fd, STDOUT_FILENO, archive_handle->file_header->size);
 }
index b82c906..0c6e26e 100644 (file)
@@ -21,7 +21,7 @@
 #include "unarchive.h"
 #include "libbb.h"
 
-extern void data_skip(archive_handle_t *archive_handle)
+void data_skip(archive_handle_t *archive_handle)
 {
        archive_handle->seek(archive_handle, archive_handle->file_header->size);
 }
index 7f700ca..88d88b8 100644 (file)
@@ -684,7 +684,7 @@ static int start_bunzip(bunzip_data **bdp, int in_fd, unsigned char *inbuf,
 /* Example usage: decompress src_fd to dst_fd.  (Stops at end of bzip data,
    not end of file.) */
 
-extern int uncompressStream(int src_fd, int dst_fd)
+int uncompressStream(int src_fd, int dst_fd)
 {
        char *outbuf;
        bunzip_data *bd;
index c8d8b4a..539d4ef 100644 (file)
@@ -95,7 +95,7 @@ static unsigned short codetab[HSIZE];
  * with those of the compress() routine.  See the definitions above.
  */
 
-extern int uncompress(int fd_in, int fd_out)
+int uncompress(int fd_in, int fd_out)
 {
        unsigned char *stackp;
        long int code;
index ea81695..7776dee 100644 (file)
@@ -892,7 +892,7 @@ static int inflate_get_next_window(void)
 }
 
 /* Initialise bytebuffer, be careful not to overfill the buffer */
-extern void inflate_init(unsigned int bufsize)
+void inflate_init(unsigned int bufsize)
 {
        /* Set the bytebuffer size, default is same as gunzip_wsize */
        bytebuffer_max = bufsize + 8;
@@ -900,12 +900,12 @@ extern void inflate_init(unsigned int bufsize)
        bytebuffer_size = 0;
 }
 
-extern void inflate_cleanup(void)
+void inflate_cleanup(void)
 {
        free(bytebuffer);
 }
 
-extern int inflate_unzip(int in, int out)
+int inflate_unzip(int in, int out)
 {
        ssize_t nwrote;
        typedef void (*sig_type) (int);
@@ -952,7 +952,7 @@ extern int inflate_unzip(int in, int out)
        return 0;
 }
 
-extern int inflate_gunzip(int in, int out)
+int inflate_gunzip(int in, int out)
 {
        unsigned int stored_crc = 0;
        unsigned int count;
index baf9e4b..bf5d8aa 100644 (file)
@@ -22,7 +22,7 @@
 #include "unarchive.h"
 
 /* Accept any non-null name, its not really a filter at all */
-extern char filter_accept_all(archive_handle_t *archive_handle)
+char filter_accept_all(archive_handle_t *archive_handle)
 {
        if (archive_handle->file_header->name) {
                return(EXIT_SUCCESS);
index e1c4827..bedd0e1 100644 (file)
@@ -24,7 +24,7 @@
 /*
  * Accept names that are in the accept list, ignoring reject list.
  */
-extern char filter_accept_list(archive_handle_t *archive_handle)
+char filter_accept_list(archive_handle_t *archive_handle)
 {
        if (find_list_entry(archive_handle->accept, archive_handle->file_header->name)) {
                return(EXIT_SUCCESS);
index a09f564..5b8385c 100644 (file)
@@ -28,7 +28,7 @@
  *  e.g. if its a .tar.gz modify archive_handle->sub_archive to process a .tar.gz
  *       or if its a .tar.bz2 make archive_handle->sub_archive handle that
  */
-extern char filter_accept_list_reassign(archive_handle_t *archive_handle)
+char filter_accept_list_reassign(archive_handle_t *archive_handle)
 {
        /* Check the file entry is in the accept list */
        if (find_list_entry(archive_handle->accept, archive_handle->file_header->name)) {
index 657f7a0..1ac4146 100644 (file)
@@ -24,7 +24,7 @@
 /*
  * Accept names that are in the accept list and not in the reject list
  */
-extern char filter_accept_reject_list(archive_handle_t *archive_handle)
+char filter_accept_reject_list(archive_handle_t *archive_handle)
 {
        const char *key = archive_handle->file_header->name;
        const llist_t *accept_entry = find_list_entry(archive_handle->accept, key);
index 7ed9e33..d14e51a 100644 (file)
@@ -18,7 +18,7 @@
 #include <stdlib.h>
 #include "unarchive.h"
 
-extern const llist_t *find_list_entry(const llist_t *list, const char *filename)
+const llist_t *find_list_entry(const llist_t *list, const char *filename)
 {
        while (list) {
                if (fnmatch(list->data, filename, 0) == 0) {
index e3a7195..385f33d 100644 (file)
@@ -21,7 +21,7 @@
 #include "unarchive.h"
 #include "libbb.h"
 
-extern char get_header_ar(archive_handle_t *archive_handle)
+char get_header_ar(archive_handle_t *archive_handle)
 {
        file_header_t *typed = archive_handle->file_header;
        union {
index bdd80df..2bbcd8e 100644 (file)
@@ -28,7 +28,7 @@ typedef struct hardlinks_s {
        struct hardlinks_s *next;
 } hardlinks_t;
 
-extern char get_header_cpio(archive_handle_t *archive_handle)
+char get_header_cpio(archive_handle_t *archive_handle)
 {
        static hardlinks_t *saved_hardlinks = NULL;
        static unsigned short pending_hardlinks = 0;
index eeabf3f..682179a 100644 (file)
@@ -22,7 +22,7 @@ static char *longname = NULL;
 static char *linkname = NULL;
 #endif
 
-extern char get_header_tar(archive_handle_t *archive_handle)
+char get_header_tar(archive_handle_t *archive_handle)
 {
        file_header_t *file_header = archive_handle->file_header;
        union {
index d49d6b9..e874bee 100644 (file)
@@ -24,7 +24,7 @@
 #include "libbb.h"
 #include "unarchive.h"
 
-extern char get_header_tar_bz2(archive_handle_t *archive_handle)
+char get_header_tar_bz2(archive_handle_t *archive_handle)
 {
        /* Cant lseek over pipe's */
        archive_handle->seek = seek_by_char;
index 9c708a9..62df7b2 100644 (file)
@@ -19,7 +19,7 @@
 #include "libbb.h"
 #include "unarchive.h"
 
-extern char get_header_tar_gz(archive_handle_t *archive_handle)
+char get_header_tar_gz(archive_handle_t *archive_handle)
 {
        unsigned char magic[2];
 
index 5849a76..36a2d33 100644 (file)
@@ -1,7 +1,7 @@
 #include <stdio.h>
 #include "unarchive.h"
 
-extern void header_list(const file_header_t *file_header)
+void header_list(const file_header_t *file_header)
 {
        puts(file_header->name);
 }
index 963d113..5b3d46c 100644 (file)
@@ -1,6 +1,6 @@
 #include <stdio.h>
 #include "unarchive.h"
 
-extern void header_skip(const file_header_t *file_header ATTRIBUTE_UNUSED)
+void header_skip(const file_header_t *file_header ATTRIBUTE_UNUSED)
 {
 }
index f7601b7..7dc902e 100644 (file)
@@ -4,7 +4,7 @@
 #include "libbb.h"
 #include "unarchive.h"
 
-extern void header_verbose_list(const file_header_t *file_header)
+void header_verbose_list(const file_header_t *file_header)
 {
        struct tm *mtime = localtime(&(file_header->mtime));
 
index fb149fc..0d362a5 100644 (file)
@@ -20,7 +20,7 @@
 #include "libbb.h"
 
 /* transformer(), more than meets the eye */
-extern int open_transformer(int src_fd, int (*transformer)(int src_fd, int dst_fd))
+int open_transformer(int src_fd, int (*transformer)(int src_fd, int dst_fd))
 {
        int fd_pipe[2];
        int pid;
index a50d566..02874db 100644 (file)
@@ -24,7 +24,7 @@
  *
  *  TODO: rename to seek_by_read
  */
-extern void seek_by_char(const archive_handle_t *archive_handle, const unsigned int jump_size)
+void seek_by_char(const archive_handle_t *archive_handle, const unsigned int jump_size)
 {
        if (jump_size) {
                bb_copyfd_size(archive_handle->src_fd, -1, jump_size);
index 578870d..fb99b26 100644 (file)
@@ -22,7 +22,7 @@
 #include "libbb.h"
 #include "unarchive.h"
 
-extern void seek_by_jump(const archive_handle_t *archive_handle, const unsigned int amount)
+void seek_by_jump(const archive_handle_t *archive_handle, const unsigned int amount)
 {
        if (lseek(archive_handle->src_fd, (off_t) amount, SEEK_CUR) == (off_t) -1) {
 #ifdef CONFIG_FEATURE_UNARCHIVE_TAPE
index fa48c6f..7bb40af 100644 (file)
@@ -19,7 +19,7 @@
 #include "unarchive.h"
 #include "busybox.h"
 
-extern void unpack_ar_archive(archive_handle_t *ar_archive)
+void unpack_ar_archive(archive_handle_t *ar_archive)
 {
        char magic[7];
 
index 8316d22..45a6601 100644 (file)
@@ -66,7 +66,7 @@ static void skip_header(int rpm_fd)
 }
 
 /* No getopt required */
-extern int rpm2cpio_main(int argc, char **argv)
+int rpm2cpio_main(int argc, char **argv)
 {
        struct rpm_lead lead;
        int rpm_fd;
index 3bd8709..8a874d0 100644 (file)
@@ -30,7 +30,7 @@
 #define GUNZIP_TO_STDOUT       1
 #define GUNZIP_FORCE   2
 
-extern int uncompress_main(int argc, char **argv)
+int uncompress_main(int argc, char **argv)
 {
        int status = EXIT_SUCCESS;
        unsigned long flags;
index f95e312..9cf9876 100644 (file)
@@ -125,7 +125,7 @@ static void unzip_extract(zip_header_t *zip_header, int src_fd, int dst_fd)
        }
 }
 
-extern int unzip_main(int argc, char **argv)
+int unzip_main(int argc, char **argv)
 {
        zip_header_t zip_header;
        enum {v_silent, v_normal, v_list} verbosity = v_normal;
index 020cdfb..0548037 100644 (file)
@@ -27,7 +27,7 @@
 #include "busybox.h"
 
 
-extern int clear_main(int argc, char **argv)
+int clear_main(int argc, char **argv)
 {
        return printf("\033[H\033[J") != 6;
 }
index d9bbb20..31c6d24 100644 (file)
@@ -39,7 +39,7 @@ struct psf_header {
 
 static void loadnewfont(int fd);
 
-extern int loadfont_main(int argc, char **argv)
+int loadfont_main(int argc, char **argv)
 {
        int fd;
 
index 5a7e88d..792618f 100644 (file)
@@ -28,7 +28,7 @@
 #include <unistd.h>
 #include "busybox.h"
 
-extern int reset_main(int argc, char **argv)
+int reset_main(int argc, char **argv)
 {
        if (isatty(1)) {
                /* See 'man 4 console_codes' for details:
index 7b8b7b6..91652cf 100644 (file)
@@ -37,7 +37,7 @@
 #include <string.h>
 #include "busybox.h"
 
-extern int basename_main(int argc, char **argv)
+int basename_main(int argc, char **argv)
 {
        size_t m, n;
        char *s;
index 62af6c5..9645f61 100644 (file)
@@ -40,7 +40,7 @@
 #include <unistd.h>
 #include "busybox.h"
 
-extern int cat_main(int argc, char **argv)
+int cat_main(int argc, char **argv)
 {
        FILE *f;
        int retval = EXIT_SUCCESS;
index ac57254..87f2291 100644 (file)
@@ -28,7 +28,7 @@
 #include "busybox.h"
 #include "libcoreutils/coreutils.h"
 
-extern int cp_main(int argc, char **argv)
+int cp_main(int argc, char **argv)
 {
        struct stat source_stat;
        struct stat dest_stat;
index 839bab6..526a993 100644 (file)
@@ -289,7 +289,7 @@ static void cut_file(FILE *file)
 }
 
 
-extern int cut_main(int argc, char **argv)
+int cut_main(int argc, char **argv)
 {
        unsigned long opt;
        char *sopt, *sdopt;
index ef08f91..bd487ee 100644 (file)
@@ -46,7 +46,7 @@ static long kscale(long b, long bs)
 }
 #endif
 
-extern int df_main(int argc, char **argv)
+int df_main(int argc, char **argv)
 {
        long blocks_used;
        long blocks_percent_used;
index 5136e49..dfe40e4 100644 (file)
@@ -27,7 +27,7 @@
 #include <stdlib.h>
 #include "busybox.h"
 
-extern int dirname_main(int argc, char **argv)
+int dirname_main(int argc, char **argv)
 {
        if (argc != 2) {
                bb_show_usage();
index 595e6de..0dbb32f 100644 (file)
@@ -22,7 +22,7 @@
 #include <stdlib.h>
 #include "busybox.h"
 
-extern int echo_main(int argc, char** argv)
+int echo_main(int argc, char** argv)
 {
        (void)bb_echo(argc, argv);
        bb_fflush_stdout_and_exit(EXIT_SUCCESS);
index 156f4e7..fd58a23 100644 (file)
@@ -57,7 +57,7 @@ static const struct option env_long_options[] = {
        { 0, 0, 0, 0 }
 };
 
-extern int env_main(int argc, char** argv)
+int env_main(int argc, char** argv)
 {
        static char *cleanenv[1] = { NULL };
 
index b06ef8b..084bc0c 100644 (file)
@@ -13,7 +13,7 @@
 #include <stdlib.h>
 #include "busybox.h"
 
-extern int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv)
+int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv)
 {
        return EXIT_FAILURE;
 }
index f1ab1bd..833935a 100644 (file)
@@ -44,7 +44,7 @@ static int adjust_column(int column, char c)
        return column;
 }
 
-extern int fold_main(int argc, char **argv)
+int fold_main(int argc, char **argv)
 {
        char *w_opt;
        int width = 80;
index 0c11ca3..cda9672 100644 (file)
@@ -13,7 +13,7 @@
 #include <unistd.h>
 #include "busybox.h"
 
-extern int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv)
+int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv)
 {
        if (argc > 1) {
                bb_show_usage();
index 39a57c1..73c3c2e 100644 (file)
@@ -53,7 +53,7 @@ static short printf_full(unsigned int id, const char *arg, const char prefix)
        return status;
 }
 
-extern int id_main(int argc, char **argv)
+int id_main(int argc, char **argv)
 {
        struct passwd *p;
        uid_t uid;
index e58cac9..e8dd506 100644 (file)
@@ -49,7 +49,7 @@ static const struct option install_long_options[] = {
        { 0,    0,      0,      0 }
 };
 
-extern int install_main(int argc, char **argv)
+int install_main(int argc, char **argv)
 {
        mode_t mode;
        uid_t uid;
index bce43ab..55fef13 100644 (file)
@@ -7,7 +7,7 @@
 #include <stdio.h>
 #include "busybox.h"
 
-extern int length_main(int argc, char **argv)
+int length_main(int argc, char **argv)
 {
        if ((argc != 2) ||  (**(++argv) == '-')) {
            bb_show_usage();
index 5a70b02..d401bcc 100644 (file)
@@ -25,7 +25,7 @@
 #include "libbb.h"
 #include "coreutils.h"
 
-extern int cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf)
+int cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf)
 {
        if (sf(fn, fn_stat) < 0) {
                if (errno != ENOENT) {
@@ -39,7 +39,7 @@ extern int cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf)
        return 1;
 }
 
-extern int cp_mv_stat(const char *fn, struct stat *fn_stat)
+int cp_mv_stat(const char *fn, struct stat *fn_stat)
 {
        return cp_mv_stat2(fn, fn_stat, stat);
 }
index 090fefa..d1f5b1e 100644 (file)
@@ -26,7 +26,7 @@
 #include "libbb.h"
 #include "coreutils.h"
 
-extern mode_t getopt_mk_fifo_nod(int argc, char **argv)
+mode_t getopt_mk_fifo_nod(int argc, char **argv)
 {
        mode_t mode = 0666;
        char *smode = NULL;
index dcb70d4..229c682 100644 (file)
@@ -36,7 +36,7 @@
 #define LN_BACKUP           8
 #define LN_SUFFIX           16
 
-extern int ln_main(int argc, char **argv)
+int ln_main(int argc, char **argv)
 {
        int status = EXIT_SUCCESS;
        int flag;
index e2a74f9..da8a1cf 100644 (file)
@@ -25,7 +25,7 @@
 #include <unistd.h>
 #include "busybox.h"
 
-extern int logname_main(int argc, char ATTRIBUTE_UNUSED **argv)
+int logname_main(int argc, char ATTRIBUTE_UNUSED **argv)
 {
        const char *p;
 
index 79a583a..a575a02 100644 (file)
@@ -955,7 +955,7 @@ static const unsigned opt_flags[] = {
 
 /*----------------------------------------------------------------------*/
 
-extern int ls_main(int argc, char **argv)
+int ls_main(int argc, char **argv)
 {
        struct dnode **dnd;
        struct dnode **dnf;
index e24ef4f..48a95ba 100644 (file)
@@ -40,7 +40,7 @@ static const struct option mkdir_long_options[] = {
        { 0, 0, 0, 0 }
 };
 
-extern int mkdir_main (int argc, char **argv)
+int mkdir_main (int argc, char **argv)
 {
        mode_t mode = (mode_t)(-1);
        int status = EXIT_SUCCESS;
index 77e0e6d..2414be3 100644 (file)
@@ -29,7 +29,7 @@
 #include "busybox.h"
 #include "libcoreutils/coreutils.h"
 
-extern int mkfifo_main(int argc, char **argv)
+int mkfifo_main(int argc, char **argv)
 {
        mode_t mode;
        int retval = EXIT_SUCCESS;
index b6e8527..cb5980b 100644 (file)
@@ -32,7 +32,7 @@
 static const char modes_chars[] = { 'p', 'c', 'u', 'b', 0, 1, 1, 2 };
 static const mode_t modes_cubp[] = { S_IFIFO, S_IFCHR, S_IFBLK };
 
-extern int mknod_main(int argc, char **argv)
+int mknod_main(int argc, char **argv)
 {
        mode_t mode;
        dev_t dev;
index aef1ed1..1c0dc3d 100644 (file)
@@ -46,7 +46,7 @@ static const struct option mv_long_options[] = {
 
 static const char fmt[] = "cannot overwrite %sdirectory with %sdirectory";
 
-extern int mv_main(int argc, char **argv)
+int mv_main(int argc, char **argv)
 {
        struct stat dest_stat;
        const char *last;
index 7e0dc05..33f80d0 100644 (file)
@@ -24,7 +24,7 @@
 #include <stdlib.h>
 #include "busybox.h"
 
-extern int pwd_main(int argc, char **argv)
+int pwd_main(int argc, char **argv)
 {
        char *buf;
 
index e4e9bb0..59c639b 100644 (file)
@@ -32,7 +32,7 @@
 #include <unistd.h>
 #include "busybox.h"
 
-extern int rm_main(int argc, char **argv)
+int rm_main(int argc, char **argv)
 {
        int status = 0;
        int flags = 0;
index 1d6b2ca..cc21f5d 100644 (file)
@@ -28,7 +28,7 @@
 #include <libgen.h>
 #include "busybox.h"
 
-extern int rmdir_main(int argc, char **argv)
+int rmdir_main(int argc, char **argv)
 {
        int status = EXIT_SUCCESS;
        int flags;
index 51e3add..66141c4 100644 (file)
@@ -11,7 +11,7 @@
 #include <stdlib.h>
 #include "busybox.h"
 
-extern int seq_main(int argc, char **argv)
+int seq_main(int argc, char **argv)
 {
        double last, first, increment, i;
        
index 506192d..c46a4e5 100644 (file)
@@ -46,7 +46,7 @@ static const struct suffix_mult sleep_suffixes[] = {
 };
 #endif
 
-extern int sleep_main(int argc, char **argv)
+int sleep_main(int argc, char **argv)
 {
        unsigned int duration;
 
index 63d586e..a352613 100644 (file)
@@ -467,9 +467,9 @@ static const struct suffix_mult stty_suffixes[] = {
 };
 
 #ifndef TEST
-extern int stty_main(int argc, char **argv)
+int stty_main(int argc, char **argv)
 #else
-extern int main(int argc, char **argv)
+int main(int argc, char **argv)
 #endif
 {
        struct termios mode;
index 8474631..4e75e4f 100644 (file)
@@ -26,7 +26,7 @@
 #include <unistd.h>
 #include "busybox.h"
 
-extern int sync_main(int argc, char **argv)
+int sync_main(int argc, char **argv)
 {
        bb_warn_ignoring_args(argc - 1);
 
index d7bd5a0..ecd1549 100644 (file)
@@ -183,7 +183,7 @@ static int test_eaccess(char *path, int mode);
 static int is_a_group_member(gid_t gid);
 static void initialize_group_array(void);
 
-extern int test_main(int argc, char **argv)
+int test_main(int argc, char **argv)
 {
        int res;
 
index 645fb21..f78fe51 100644 (file)
@@ -39,7 +39,7 @@
 #include <stdlib.h>
 #include "busybox.h"
 
-extern int touch_main(int argc, char **argv)
+int touch_main(int argc, char **argv)
 {
        int fd;
        int flags;
index d6c5e34..adddf83 100644 (file)
@@ -202,7 +202,7 @@ static int complement(unsigned char *buffer, int buffer_len)
        return ix;
 }
 
-extern int tr_main(int argc, char **argv)
+int tr_main(int argc, char **argv)
 {
        register unsigned char *ptr;
        int output_length=0, input_length;
index 3e7eb01..1f27686 100644 (file)
@@ -26,7 +26,7 @@
 #include <stdlib.h>
 #include "busybox.h"
 
-extern int true_main(int argc, char **argv)
+int true_main(int argc, char **argv)
 {
        return EXIT_SUCCESS;
 }
index cd2c784..6aea7a3 100644 (file)
@@ -28,7 +28,7 @@
 #include <unistd.h>
 #include "busybox.h"
 
-extern int tty_main(int argc, char **argv)
+int tty_main(int argc, char **argv)
 {
        const char *s;
        int silent;             /* Note: No longer relevant in SUSv3. */
index f570f27..9dd643f 100644 (file)
@@ -27,7 +27,7 @@
 #include <unistd.h>
 #include "busybox.h"
 
-extern int usleep_main(int argc, char **argv)
+int usleep_main(int argc, char **argv)
 {
        if (argc != 2) {
                bb_show_usage();
index 5823afd..310d5b6 100644 (file)
@@ -138,7 +138,7 @@ static int read_base64(FILE *src_stream, FILE *dst_stream)
        }
 }
 
-extern int uudecode_main(int argc, char **argv)
+int uudecode_main(int argc, char **argv)
 {
        int (*decode_fn_ptr) (FILE * src, FILE * dst);
        FILE *src_stream;
index 31fadfb..9da591b 100644 (file)
@@ -39,7 +39,7 @@
 #include <sys/wait.h>
 #include "busybox.h"
 
-extern int watch_main(int argc, char **argv)
+int watch_main(int argc, char **argv)
 {
        const int header_len = 40;
        time_t t;
index e2ea227..1156ba2 100644 (file)
@@ -25,7 +25,7 @@
 #include <time.h>
 #include "busybox.h"
 
-extern int who_main(int argc, char **argv)
+int who_main(int argc, char **argv)
 {
     struct utmp *ut;
     struct stat st;
index 16d2808..71ef353 100644 (file)
@@ -27,7 +27,7 @@
 #include <unistd.h>
 #include "busybox.h"
 
-extern int whoami_main(int argc, char **argv)
+int whoami_main(int argc, char **argv)
 {
        if (argc > 1)
                bb_show_usage();
index 74f7571..cafc16b 100644 (file)
@@ -31,7 +31,7 @@
 #include <stdlib.h>
 #include "busybox.h"
 
-extern int yes_main(int argc, char **argv)
+int yes_main(int argc, char **argv)
 {
        static const char fmt_str[] = " %s";
        const char *fmt;
index 64b8281..09c79f5 100644 (file)
@@ -16,7 +16,7 @@
 #include <stdlib.h>
 #include "busybox.h"
 
-extern int mktemp_main(int argc, char **argv)
+int mktemp_main(int argc, char **argv)
 {
        unsigned long flags = bb_getopt_ulflags(argc, argv, "dq");
 
index ab05202..95db167 100644 (file)
@@ -31,7 +31,7 @@
 /*     Read a block of data from stdin, write it to stdout.
  *  Activity is indicated by a '.' to stderr
  */
-extern int pipe_progress_main(int argc, char **argv)
+int pipe_progress_main(int argc, char **argv)
 {
        RESERVE_CONFIG_BUFFER(buf, PIPE_PROGRESS_SIZE);
        time_t t = time(NULL);
index deb036a..4d206ab 100644 (file)
@@ -16,7 +16,7 @@
 #include <sys/stat.h>
 #include "busybox.h"
 
-extern int which_main(int argc, char **argv)
+int which_main(int argc, char **argv)
 {
        int status = EXIT_SUCCESS;
        size_t i, count;
index d2e4683..04cf8b5 100644 (file)
@@ -52,7 +52,7 @@ void blkid_free_dev(blkid_dev dev)
 /*
  * Given a blkid device, return its name
  */
-extern const char *blkid_dev_devname(blkid_dev dev)
+const char *blkid_dev_devname(blkid_dev dev)
 {
        return dev->bid_name;
 }
@@ -80,7 +80,7 @@ struct blkid_struct_dev_iterate {
        struct list_head        *p;
 };
 
-extern blkid_dev_iterate blkid_dev_iterate_begin(blkid_cache cache)
+blkid_dev_iterate blkid_dev_iterate_begin(blkid_cache cache)
 {
        blkid_dev_iterate       iter;
 
@@ -106,7 +106,7 @@ extern int blkid_dev_next(blkid_dev_iterate iter,
        return 0;
 }
 
-extern void blkid_dev_iterate_end(blkid_dev_iterate iter)
+void blkid_dev_iterate_end(blkid_dev_iterate iter)
 {
        if (!iter || iter->magic != DEV_ITERATE_MAGIC)
                return;
index 95112eb..51615d4 100644 (file)
@@ -236,7 +236,7 @@ struct blkid_struct_tag_iterate {
        struct list_head        *p;
 };
 
-extern blkid_tag_iterate blkid_tag_iterate_begin(blkid_dev dev)
+blkid_tag_iterate blkid_tag_iterate_begin(blkid_dev dev)
 {
        blkid_tag_iterate       iter;
 
@@ -267,7 +267,7 @@ extern int blkid_tag_next(blkid_tag_iterate iter,
        return 0;
 }
 
-extern void blkid_tag_iterate_end(blkid_tag_iterate iter)
+void blkid_tag_iterate_end(blkid_tag_iterate iter)
 {
        if (!iter || iter->magic != TAG_ITERATE_MAGIC)
                return;
index 489d2a8..18dfd00 100644 (file)
@@ -14897,7 +14897,7 @@ static float calc_percent(const struct percent_tbl *tbl, int pass, int curr,
                + tbl->table[pass-1]);
 }
 
-extern void e2fsck_clear_progbar(e2fsck_t ctx)
+void e2fsck_clear_progbar(e2fsck_t ctx)
 {
        if (!(ctx->flags & E2F_FLAG_PROG_BAR))
                return;
index 39717af..65856aa 100644 (file)
@@ -2612,7 +2612,7 @@ static rstream *next_input_file(void)
        return &rsm;
 }
 
-extern int awk_main(int argc, char **argv)
+int awk_main(int argc, char **argv)
 {
        char *s, *s1;
        int i, j, c, flen;
index 2248b61..9a37408 100644 (file)
@@ -88,7 +88,7 @@ static int file_doesnt_exist(const char *filename)
        return(stat(filename, &statbuf));
 }
 
-extern int patch_main(int argc, char **argv)
+int patch_main(int argc, char **argv)
 {
        int patch_level = -1;
        char *patch_line;
index 32116fd..93d3f89 100644 (file)
@@ -1108,7 +1108,7 @@ static void add_cmd_block(char *cmdstr)
        free(temp);
 }
 
-extern int sed_main(int argc, char **argv)
+int sed_main(int argc, char **argv)
 {
        int status = EXIT_SUCCESS, opt, getpat = 1;
 
index bf537ee..4dcef68 100644 (file)
@@ -332,7 +332,7 @@ static void write1(const char *out)
        fputs(out, stdout);
 }
 
-extern int vi_main(int argc, char **argv)
+int vi_main(int argc, char **argv)
 {
        int c;
        RESERVE_CONFIG_BUFFER(STATUS_BUFFER, STATUS_BUFFER_LEN);
index e1ce8e5..e5b5e32 100644 (file)
@@ -280,7 +280,7 @@ static void load_regexes_from_file(llist_t *fopt)
 }
 
 
-extern int grep_main(int argc, char **argv)
+int grep_main(int argc, char **argv)
 {
        FILE *file;
        int matched;
index c4d67a5..b7bc7ef 100644 (file)
@@ -1007,7 +1007,7 @@ static void reload_signal(int sig ATTRIBUTE_UNUSED)
 }
 #endif                                                 /* CONFIG_FEATURE_USE_INITTAB */
 
-extern int init_main(int argc, char **argv)
+int init_main(int argc, char **argv)
 {
        struct init_action *a;
        pid_t wpid;
index 7e3cc10..51e1496 100644 (file)
@@ -18,7 +18,7 @@
 
 #ifndef CONFIG_INIT
 const char * const bb_shutdown_format = "\r%s\n";
-extern int bb_shutdown_system(unsigned long magic)
+int bb_shutdown_system(unsigned long magic)
 {
        int pri = LOG_KERN|LOG_NOTICE|LOG_FACMASK;
        const char *message;
index f1cbe7e..874c220 100644 (file)
@@ -28,7 +28,7 @@
 #define S_IWGRP_OR_S_IWOTH     (S_IWGRP | S_IWOTH)
 #endif
 
-extern int mesg_main(int argc, char *argv[])
+int mesg_main(int argc, char *argv[])
 {
        struct stat sb;
        char *tty;
index 41e6e49..9ad73df 100644 (file)
@@ -28,7 +28,7 @@
 #include <string.h>
 #include "busybox.h"
 
-extern int bb_echo(int ATTRIBUTE_UNUSED argc, char **argv)
+int bb_echo(int ATTRIBUTE_UNUSED argc, char **argv)
 {
 #ifndef CONFIG_FEATURE_FANCY_ECHO
 #define eflag '\\'
index 029c232..3c5460d 100644 (file)
@@ -28,7 +28,7 @@
 #include <string.h>
 #include "libbb.h"
 
-extern char *concat_path_file(const char *path, const char *filename)
+char *concat_path_file(const char *path, const char *filename)
 {
        char *lc;
 
index 6d86f5e..e724419 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "libbb.h"
 
-extern char *concat_subpath_file(const char *path, const char *f)
+char *concat_subpath_file(const char *path, const char *f)
 {
        if(f && *f == '.' && (!f[1] || (f[1] == '.' && !f[2])))
                return NULL;
index 5152531..d138f3e 100644 (file)
@@ -62,7 +62,7 @@ out:
 }
 
 
-extern int bb_copyfd_size(int fd1, int fd2, const off_t size)
+int bb_copyfd_size(int fd1, int fd2, const off_t size)
 {
        if (size) {
                return(bb_full_fd_action(fd1, fd2, size));
@@ -70,7 +70,7 @@ extern int bb_copyfd_size(int fd1, int fd2, const off_t size)
        return(0);
 }
 
-extern int bb_copyfd_eof(int fd1, int fd2)
+int bb_copyfd_eof(int fd1, int fd2)
 {
        return(bb_full_fd_action(fd1, fd2, 0));
 }
index 61f954f..df5eae9 100644 (file)
@@ -25,7 +25,7 @@
 
 
 /* try to open up the specified device */
-extern int device_open(const char *device, int mode)
+int device_open(const char *device, int mode)
 {
        int m, f, fd = -1;
 
index 18811b8..2a90ba4 100644 (file)
@@ -25,7 +25,7 @@
 #include <stdlib.h>
 #include "libbb.h"
 
-extern void bb_error_msg(const char *s, ...)
+void bb_error_msg(const char *s, ...)
 {
        va_list p;
 
index 0937658..92043a5 100644 (file)
@@ -25,7 +25,7 @@
 #include <stdlib.h>
 #include "libbb.h"
 
-extern void bb_error_msg_and_die(const char *s, ...)
+void bb_error_msg_and_die(const char *s, ...)
 {
        va_list p;
 
index 4d27b48..83527a8 100644 (file)
@@ -32,7 +32,7 @@
  * Given any other file (or directory), find the mount table entry for its
  * filesystem.
  */
-extern struct mntent *find_mount_point(const char *name, const char *table)
+struct mntent *find_mount_point(const char *name, const char *table)
 {
        struct stat s;
        dev_t mountDevice;
index 24084a3..833c96f 100644 (file)
@@ -23,7 +23,7 @@
  *  Returns a list of all matching PIDs
  *  It is the caller's duty to free the returned pidlist.
  */
-extern long* find_pid_by_name( const char* pidName)
+long* find_pid_by_name( const char* pidName)
 {
        long* pidList;
        int i=0;
@@ -42,7 +42,7 @@ extern long* find_pid_by_name( const char* pidName)
        return pidList;
 }
 
-extern long *pidlist_reverse(long *pidList)
+long *pidlist_reverse(long *pidList)
 {
        int i=0;
        while (pidList[i] > 0 && ++i);
index dfe0cfa..d1ffc87 100644 (file)
@@ -26,7 +26,7 @@
 #include <stdlib.h>
 #include "libbb.h"
 
-extern char *find_block_device(char *path)
+char *find_block_device(char *path)
 {
        DIR *dir;
        struct dirent *entry;
index 5ad497f..44cf448 100644 (file)
@@ -45,14 +45,14 @@ char *bb_get_chunk_from_file(FILE *file, int *end)
 }
 
 /* Get line, including trailing /n if any */
-extern char *bb_get_line_from_file(FILE *file)
+char *bb_get_line_from_file(FILE *file)
 {
        int i;
        return bb_get_chunk_from_file(file, &i);
 }
 
 /* Get line.  Remove trailing /n */
-extern char *bb_get_chomped_line_from_file(FILE *file)
+char *bb_get_chomped_line_from_file(FILE *file)
 {
        int i;
        char *c=bb_get_chunk_from_file(file, &i);
index 87ec15a..d0d0a15 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "libbb.h"
 
-extern void bb_herror_msg(const char *s, ...)
+void bb_herror_msg(const char *s, ...)
 {
        va_list p;
 
index 5c765f1..9a76ef7 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "libbb.h"
 
-extern void bb_herror_msg_and_die(const char *s, ...)
+void bb_herror_msg_and_die(const char *s, ...)
 {
        va_list p;
 
index e01aafa..5f5d36d 100644 (file)
@@ -30,7 +30,7 @@
  * so, for example,  to check if the kernel is greater than 2.2.11:
  *     if (get_kernel_revision() <= 2*65536+2*256+11) { <stuff> }
  */
-extern int get_kernel_revision(void)
+int get_kernel_revision(void)
 {
        struct utsname name;
        char *s;
index ce7dadd..af0a994 100644 (file)
@@ -13,7 +13,7 @@
 
 #ifdef L_llist_add_to
 /* Add data to the start of the linked list.  */
-extern llist_t *llist_add_to(llist_t *old_head, char *new_item)
+llist_t *llist_add_to(llist_t *old_head, char *new_item)
 {
        llist_t *new_head;
 
@@ -27,7 +27,7 @@ extern llist_t *llist_add_to(llist_t *old_head, char *new_item)
 
 #ifdef L_llist_add_to_end
 /* Add data to the end of the linked list.  */
-extern llist_t *llist_add_to_end(llist_t *list_head, char *data)
+llist_t *llist_add_to_end(llist_t *list_head, char *data)
 {
        llist_t *new_item;
 
@@ -50,7 +50,7 @@ extern llist_t *llist_add_to_end(llist_t *list_head, char *data)
 #ifdef L_llist_free_one
 /* Free the current list element and advance to the next entry in the list.
  * Returns a pointer to the next element.  */
-extern llist_t *llist_free_one(llist_t *elm)
+llist_t *llist_free_one(llist_t *elm)
 {
        llist_t *next = elm ? elm->link : NULL;
 #if ENABLE_DMALLOC /* avoid warnings from dmalloc's error-free-null option */
@@ -64,7 +64,7 @@ extern llist_t *llist_free_one(llist_t *elm)
 
 #ifdef L_llist_free
 /* Recursively free all elements in the linked list.  */
-extern void llist_free(llist_t *elm)
+void llist_free(llist_t *elm)
 {
        while ((elm = llist_free_one(elm)));
 }
index 4d159a7..6244970 100644 (file)
@@ -244,7 +244,7 @@ obscure_msg(const char *old, const char *newval, const struct passwd *pwdp)
  *     check passwords.
  */
 
-extern int obscure(const char *old, const char *newval, const struct passwd *pwdp)
+int obscure(const char *old, const char *newval, const struct passwd *pwdp)
 {
        const char *msg = obscure_msg(old, newval, pwdp);
 
index 185957b..ffbf4e1 100644 (file)
@@ -29,7 +29,7 @@
 
 #define FILEMODEBITS    (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)
 
-extern int bb_parse_mode(const char *s, mode_t *current_mode)
+int bb_parse_mode(const char *s, mode_t *current_mode)
 {
        static const mode_t who_mask[] = {
                S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO, /* a */
index 8ba0531..a0fdabc 100644 (file)
@@ -25,7 +25,7 @@
 #include <stdlib.h>
 #include "libbb.h"
 
-extern void bb_perror_msg(const char *s, ...)
+void bb_perror_msg(const char *s, ...)
 {
        va_list p;
 
index 15bf042..4a26dcc 100644 (file)
@@ -25,7 +25,7 @@
 #include <stdlib.h>
 #include "libbb.h"
 
-extern void bb_perror_msg_and_die(const char *s, ...)
+void bb_perror_msg_and_die(const char *s, ...)
 {
        va_list p;
 
index 464cb86..479b2ba 100644 (file)
@@ -23,7 +23,7 @@
 #include <stddef.h>
 #include <libbb.h>
 
-extern void bb_perror_nomsg(void)
+void bb_perror_nomsg(void)
 {
        /* Ignore the gcc warning about a null format string. */
        bb_perror_msg(NULL);
index bab2284..7cbe35e 100644 (file)
@@ -23,7 +23,7 @@
 #include <stddef.h>
 #include "libbb.h"
 
-extern void bb_perror_nomsg_and_die(void)
+void bb_perror_nomsg_and_die(void)
 {
        /* Ignore the gcc warning about a null format string. */
        bb_perror_msg_and_die(NULL);
index 963db14..26bd0d4 100644 (file)
@@ -24,7 +24,7 @@
 #include <unistd.h>
 #include "libbb.h"
 
-extern void bb_xprint_and_close_file(FILE *file)
+void bb_xprint_and_close_file(FILE *file)
 {
        bb_xfflush_stdout();
        /* Note: Do not use STDOUT_FILENO here, as this is a lib routine
@@ -45,7 +45,7 @@ extern void bb_xprint_and_close_file(FILE *file)
  *  exits with default error code if an error occurs
  */
 
-extern int bb_xprint_file_by_name(const char *filename)
+int bb_xprint_file_by_name(const char *filename)
 {
        FILE *f;
 
index 2cba317..e617232 100644 (file)
@@ -145,7 +145,7 @@ extern int bb_vfprintf(FILE * __restrict stream,
 #endif
 
 #ifdef L_bb_vprintf
-extern int bb_vprintf(const char * __restrict format, va_list arg)
+int bb_vprintf(const char * __restrict format, va_list arg)
 {
        return bb_vfprintf(stdout, format, arg);
 }
@@ -167,7 +167,7 @@ extern int bb_fprintf(FILE * __restrict stream,
 #endif
 
 #ifdef L_bb_printf
-extern int bb_printf(const char * __restrict format, ...)
+int bb_printf(const char * __restrict format, ...)
 {
        va_list arg;
        int rv;
index 2ebe66e..e73c0dc 100644 (file)
@@ -34,7 +34,7 @@ static int read_to_buf(const char *filename, void *buf)
 }
 
 
-extern procps_status_t * procps_scan(int save_user_arg0)
+procps_status_t * procps_scan(int save_user_arg0)
 {
        static DIR *dir;
        struct dirent *entry;
index 727149d..a153399 100644 (file)
@@ -25,7 +25,7 @@
 #include "libbb.h"
 
 
-extern char *pw_encrypt(const char *clear, const char *salt)
+char *pw_encrypt(const char *clear, const char *salt)
 {
        static char cipher[128];
        char *cp;
index 8b45c58..ee1aaa5 100644 (file)
@@ -30,7 +30,7 @@
 #include <getopt.h>
 #include "libbb.h"
 
-extern int remove_file(const char *path, int flags)
+int remove_file(const char *path, int flags)
 {
        struct stat path_stat;
        int path_exists = 1;
index 4c8841f..7f5fe45 100644 (file)
@@ -47,7 +47,7 @@ static int valid_name(const struct dirent *d)
  * test_mode = 2 means to fail silently on missing directories
  */
 
-extern int run_parts(char **args, const unsigned char test_mode, char **env)
+int run_parts(char **args, const unsigned char test_mode, char **env)
 {
        struct dirent **namelist = 0;
        struct stat st;
index 2016e6b..d427569 100644 (file)
@@ -25,7 +25,7 @@
 
 
 /* Like strncpy but make sure the resulting string is always 0 terminated. */
-extern char * safe_strncpy(char *dst, const char *src, size_t size)
+char * safe_strncpy(char *dst, const char *src, size_t size)
 {
        dst[size-1] = '\0';
        return strncpy(dst, src, size-1);
index bf049a2..fd5d725 100644 (file)
@@ -23,7 +23,7 @@
 #include <ctype.h>
 #include "libbb.h"
 
-extern const char *bb_skip_whitespace(const char *s)
+const char *bb_skip_whitespace(const char *s)
 {
        while (isspace(*s)) {
                ++s;
index 53fdbd3..96c71ea 100644 (file)
@@ -26,7 +26,7 @@
 
 
 #if (__GLIBC__ < 2)
-extern int vdprintf(int d, const char *format, va_list ap)
+int vdprintf(int d, const char *format, va_list ap)
 {
        char buf[BUF_SIZE];
        int len;
index 07b37e4..d0fbb05 100644 (file)
@@ -25,7 +25,7 @@
 #include <stdlib.h>
 #include "libbb.h"
 
-extern void bb_verror_msg(const char *s, va_list p)
+void bb_verror_msg(const char *s, va_list p)
 {
        fflush(stdout);
        fprintf(stderr, "%s: ", bb_applet_name);
index 1560eb5..a5b1a70 100644 (file)
@@ -26,7 +26,7 @@
 #include "libbb.h"
 
 
-extern void bb_vherror_msg(const char *s, va_list p)
+void bb_vherror_msg(const char *s, va_list p)
 {
        if(s == 0)
                s = "";
index 5c44696..ed4ac83 100644 (file)
@@ -25,7 +25,7 @@
 #include <stdlib.h>
 #include "libbb.h"
 
-extern void bb_vperror_msg(const char *s, va_list p)
+void bb_vperror_msg(const char *s, va_list p)
 {
        int err=errno;
        if(s == 0) s = "";
index a1fa528..cc35fe2 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <libbb.h>
 
-extern void bb_warn_ignoring_args(int n)
+void bb_warn_ignoring_args(int n)
 {
        if (n) {
                bb_perror_msg("ignoring all arguments");
index 6d54c1a..4114090 100644 (file)
@@ -26,7 +26,7 @@
 
 #ifndef DMALLOC
 #ifdef L_xmalloc
-extern void *xmalloc(size_t size)
+void *xmalloc(size_t size)
 {
        void *ptr = malloc(size);
        if (ptr == NULL && size != 0)
@@ -36,7 +36,7 @@ extern void *xmalloc(size_t size)
 #endif
 
 #ifdef L_xrealloc
-extern void *xrealloc(void *ptr, size_t size)
+void *xrealloc(void *ptr, size_t size)
 {
        ptr = realloc(ptr, size);
        if (ptr == NULL && size != 0)
@@ -46,7 +46,7 @@ extern void *xrealloc(void *ptr, size_t size)
 #endif
 
 #ifdef L_xcalloc
-extern void *xcalloc(size_t nmemb, size_t size)
+void *xcalloc(size_t nmemb, size_t size)
 {
        void *ptr = calloc(nmemb, size);
        if (ptr == NULL && nmemb != 0 && size != 0)
@@ -96,7 +96,7 @@ FILE *bb_xfopen(const char *path, const char *mode)
 #endif
 
 #ifdef L_xopen
-extern int bb_xopen(const char *pathname, int flags)
+int bb_xopen(const char *pathname, int flags)
 {
        int ret;
 
@@ -109,7 +109,7 @@ extern int bb_xopen(const char *pathname, int flags)
 #endif
 
 #ifdef L_xread
-extern ssize_t bb_xread(int fd, void *buf, size_t count)
+ssize_t bb_xread(int fd, void *buf, size_t count)
 {
        ssize_t size;
 
@@ -122,7 +122,7 @@ extern ssize_t bb_xread(int fd, void *buf, size_t count)
 #endif
 
 #ifdef L_xread_all
-extern void bb_xread_all(int fd, void *buf, size_t count)
+void bb_xread_all(int fd, void *buf, size_t count)
 {
        ssize_t size;
 
@@ -138,7 +138,7 @@ extern void bb_xread_all(int fd, void *buf, size_t count)
 #endif
 
 #ifdef L_xread_char
-extern unsigned char bb_xread_char(int fd)
+unsigned char bb_xread_char(int fd)
 {
        char tmp;
 
@@ -149,7 +149,7 @@ extern unsigned char bb_xread_char(int fd)
 #endif
 
 #ifdef L_xferror
-extern void bb_xferror(FILE *fp, const char *fn)
+void bb_xferror(FILE *fp, const char *fn)
 {
        if (ferror(fp)) {
                bb_error_msg_and_die("%s", fn);
@@ -158,14 +158,14 @@ extern void bb_xferror(FILE *fp, const char *fn)
 #endif
 
 #ifdef L_xferror_stdout
-extern void bb_xferror_stdout(void)
+void bb_xferror_stdout(void)
 {
        bb_xferror(stdout, bb_msg_standard_output);
 }
 #endif
 
 #ifdef L_xfflush_stdout
-extern void bb_xfflush_stdout(void)
+void bb_xfflush_stdout(void)
 {
        if (fflush(stdout)) {
                bb_perror_msg_and_die(bb_msg_standard_output);
index f332bb3..6d3c4d1 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "busybox.h"
 
-extern long bb_xgetlarg(const char *arg, int base, long lower, long upper)
+long bb_xgetlarg(const char *arg, int base, long lower, long upper)
 {
        long result;
        char *endptr;
index b3e3eda..1bc166b 100644 (file)
@@ -13,7 +13,7 @@
 #include <unistd.h>
 #include "libbb.h"
 
-extern char *xreadlink(const char *path)
+char *xreadlink(const char *path)
 {
        static const int GROWBY = 80; /* how large we will grow strings by */
 
index 0f4b9ad..eadb17d 100644 (file)
@@ -59,7 +59,7 @@ static void alarm_handler ( int sig ATTRIBUTE_UNUSED)
 }
 
 
-extern int login_main(int argc, char **argv)
+int login_main(int argc, char **argv)
 {
        char tty[BUFSIZ];
        char full_tty[200];
index c6920ff..611ced3 100644 (file)
@@ -132,7 +132,7 @@ static int update_passwd(const struct passwd *pw, const char *crypt_pw)
 }
 
 
-extern int passwd_main(int argc, char **argv)
+int passwd_main(int argc, char **argv)
 {
        int amroot;
        char *cp;
index cecfa90..8c5d88a 100644 (file)
@@ -46,7 +46,7 @@ static void catchalarm(int ATTRIBUTE_UNUSED junk)
 }
 
 
-extern int sulogin_main(int argc, char **argv)
+int sulogin_main(int argc, char **argv)
 {
        char *cp;
        char *device = (char *) 0;
index 0975b51..6f39107 100644 (file)
@@ -66,7 +66,7 @@ static void restore_terminal(void)
        tcsetattr(STDIN_FILENO, TCSANOW, &oterm);
 }
 
-extern int vlock_main(int argc, char **argv)
+int vlock_main(int argc, char **argv)
 {
        sigset_t sig;
        struct sigaction sa;
index 189f545..d454862 100644 (file)
@@ -25,7 +25,7 @@
 #define CDROMEJECT                0x5309  /* Ejects the cdrom media */
 #define DEFAULT_CDROM             "/dev/cdrom"
 
-extern int eject_main(int argc, char **argv)
+int eject_main(int argc, char **argv)
 {
        unsigned long flags;
        char *device;
index 72386ea..e27e2f3 100644 (file)
@@ -43,7 +43,7 @@
 #error struct utmp member char[] size(s) have changed!
 #endif
 
-extern int last_main(int argc, char **argv)
+int last_main(int argc, char **argv)
 {
        struct utmp ut;
        int n, file = STDIN_FILENO;
index 0268fbb..fa7535f 100644 (file)
@@ -77,7 +77,7 @@ int makedevs_main(int argc, char **argv)
 
 /* Licensed under the GPL v2 or later, see the file LICENSE in this tarball. */
 
-extern int makedevs_main(int argc, char **argv)
+int makedevs_main(int argc, char **argv)
 {
        FILE *table = stdin;
        char *rootdir = NULL;
index b0cdacc..44efedb 100644 (file)
@@ -50,7 +50,7 @@ static const struct mt_opcodes opcodes[] = {
        {0, 0}
 };
 
-extern int mt_main(int argc, char **argv)
+int mt_main(int argc, char **argv)
 {
        const char *file = "/dev/tape";
        const struct mt_opcodes *code = opcodes;
index ca896a1..89c4854 100644 (file)
@@ -456,7 +456,7 @@ static void run_command (char *const *cmd, resource_t *resp)
     signal (SIGQUIT, quit_signal);
 }
 
-extern int time_main (int argc, char **argv)
+int time_main (int argc, char **argv)
 {
     int gotone;
     resource_t res;
index 14322d9..8b11278 100644 (file)
@@ -3903,7 +3903,7 @@ static void print_load_map(struct obj_file *f)
 
 #endif
 
-extern int insmod_main( int argc, char **argv)
+int insmod_main( int argc, char **argv)
 {
        int opt;
        int len;
@@ -4267,7 +4267,7 @@ static const char *moderror(int err)
        }
 }
 
-extern int insmod_ng_main( int argc, char **argv)
+int insmod_ng_main( int argc, char **argv)
 {
        int i;
        int fd;
index 018bc53..82136dd 100644 (file)
@@ -97,7 +97,7 @@ static const int NEW_MOD_VISITED = 8;
 static const int NEW_MOD_USED_ONCE = 16;
 static const int NEW_MOD_INITIALIZING = 64;
 
-extern int lsmod_main(int argc, char **argv)
+int lsmod_main(int argc, char **argv)
 {
        struct module_info info;
        char *module_names, *mn, *deps, *dn;
@@ -160,7 +160,7 @@ extern int lsmod_main(int argc, char **argv)
 
 #else /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */
 
-extern int lsmod_main(int argc, char **argv)
+int lsmod_main(int argc, char **argv)
 {
        printf("Module                  Size  Used by");
        check_tainted();
index d04c7ff..c161515 100644 (file)
@@ -823,7 +823,7 @@ static int mod_remove ( char *mod )
 
 }
 
-extern int modprobe_main(int argc, char** argv)
+int modprobe_main(int argc, char** argv)
 {
        int rc = EXIT_SUCCESS;
        char *unused;
index 44c606e..5302ab2 100644 (file)
@@ -55,7 +55,7 @@ static inline void filename2modname(char *modname, const char *afterslash)
 }
 #endif
 
-extern int rmmod_main(int argc, char **argv)
+int rmmod_main(int argc, char **argv)
 {
        int n, ret = EXIT_SUCCESS;
        unsigned int flags = O_NONBLOCK|O_EXCL;
index 9e6fc62..c3cfcd8 100644 (file)
@@ -1133,7 +1133,7 @@ static llist_t *find_iface_state(llist_t *state_list, const char *iface)
        return(NULL);
 }
 
-extern int ifupdown_main(int argc, char **argv)
+int ifupdown_main(int argc, char **argv)
 {
        int (*cmds) (struct interface_defn_t *) = NULL;
        struct interfaces_file_t *defn;
index d7a0c51..bcb4880 100644 (file)
@@ -414,7 +414,7 @@ static void ipaddr_reset_filter(int _oneline)
        filter.oneline = _oneline;
 }
 
-extern int ipaddr_list_or_flush(int argc, char **argv, int flush)
+int ipaddr_list_or_flush(int argc, char **argv, int flush)
 {
        static const char *const option[] = { "to", "scope", "up", "label", "dev", 0 };
 
@@ -805,7 +805,7 @@ static int ipaddr_modify(int cmd, int argc, char **argv)
        exit(0);
 }
 
-extern int do_ipaddr(int argc, char **argv)
+int do_ipaddr(int argc, char **argv)
 {
        static const char *const commands[] = {
                "add", "delete", "list", "show", "lst", "flush", 0
index 14373c8..47b9f8f 100644 (file)
@@ -138,7 +138,7 @@ static void ping(const char *host)
        return;
 }
 
-extern int ping_main(int argc, char **argv)
+int ping_main(int argc, char **argv)
 {
        argc--;
        argv++;
@@ -377,7 +377,7 @@ static void ping(const char *host)
        pingstats(0);
 }
 
-extern int ping_main(int argc, char **argv)
+int ping_main(int argc, char **argv)
 {
        char *thisarg;
 
index 1d7271d..42cf278 100644 (file)
@@ -139,7 +139,7 @@ static void ping(const char *host)
        return;
 }
 
-extern int ping6_main(int argc, char **argv)
+int ping6_main(int argc, char **argv)
 {
        argc--;
        argv++;
@@ -423,7 +423,7 @@ static void ping(const char *host)
        pingstats(0);
 }
 
-extern int ping6_main(int argc, char **argv)
+int ping6_main(int argc, char **argv)
 {
        char *thisarg;
 
index 05c7786..ca4896b 100644 (file)
@@ -613,7 +613,7 @@ static void cookmode(void)
        if (G.do_termios) tcsetattr(0, TCSADRAIN, &G.termios_def);
 }
 
-extern int telnet_main(int argc, char** argv)
+int telnet_main(int argc, char** argv)
 {
        int len;
        struct sockaddr_in s_in;
index 4fb047d..b4163f1 100644 (file)
@@ -27,7 +27,7 @@
 #include <stdlib.h>
 #include "busybox.h"
 
-extern int free_main(int argc, char **argv)
+int free_main(int argc, char **argv)
 {
        struct sysinfo info;
        sysinfo(&info);
index ff620ee..90114a4 100644 (file)
@@ -35,7 +35,7 @@
 #define KILL 0
 #define KILLALL 1
 
-extern int kill_main(int argc, char **argv)
+int kill_main(int argc, char **argv)
 {
        int whichApp, signo = SIGTERM;
        const char *name;
index c142e33..5b3e53f 100644 (file)
@@ -42,7 +42,7 @@
 #define omitted (0)
 #endif
 
-extern int pidof_main(int argc, char **argv)
+int pidof_main(int argc, char **argv)
 {
        unsigned n = 0;
        unsigned fail = 1;
index 9dd0e03..b6242d2 100644 (file)
@@ -22,7 +22,7 @@
 #include <selinux/selinux.h>  /* for is_selinux_enabled()  */
 #endif
 
-extern int ps_main(int argc, char **argv)
+int ps_main(int argc, char **argv)
 {
        procps_status_t * p;
        int i, len;
index 0042889..7784850 100644 (file)
@@ -43,7 +43,7 @@
 #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
 
 
-extern int uptime_main(int argc, char **argv)
+int uptime_main(int argc, char **argv)
 {
        int updays, uphours, upminutes;
        struct sysinfo info;
index f999b88..31f4c7b 100644 (file)
@@ -1191,7 +1191,7 @@ static int get_next_history(void)
 }
 
 #ifdef CONFIG_FEATURE_COMMAND_SAVEHISTORY
-extern void load_history ( const char *fromfile )
+void load_history ( const char *fromfile )
 {
        FILE *fp;
        int hi;
@@ -1225,7 +1225,7 @@ extern void load_history ( const char *fromfile )
        cur_history = n_history = hi;
 }
 
-extern void save_history ( const char *tofile )
+void save_history ( const char *tofile )
 {
        FILE *fp = fopen ( tofile, "w" );
 
index 375b126..b3bb06b 100644 (file)
@@ -819,7 +819,7 @@ static char *current_prompt;
  */
 
 
-extern int msh_main(int argc, char **argv)
+int msh_main(int argc, char **argv)
 {
        REGISTER int f;
        REGISTER char *s;
index 5be833f..51b0143 100644 (file)
@@ -103,7 +103,7 @@ static void doKlogd(const int console_log_level)
 #define OPT_LEVEL        1
 #define OPT_FOREGROUND   2
 
-extern int klogd_main(int argc, char **argv)
+int klogd_main(int argc, char **argv)
 {
        unsigned long opt;
        char *c_arg;
index 4e2e50f..0c6fb08 100644 (file)
@@ -100,7 +100,7 @@ static int pencode(char *s)
 }
 
 
-extern int logger_main(int argc, char **argv)
+int logger_main(int argc, char **argv)
 {
        int pri = LOG_USER | LOG_NOTICE;
        int option = 0;
index 8ea8047..73ad5a8 100644 (file)
@@ -75,7 +75,7 @@ static inline void sem_down(int semid)
                error_exit("semop[SMrdn]");
 }
 
-extern int logread_main(int argc, char **argv)
+int logread_main(int argc, char **argv)
 {
        int i;
        int follow=0;
index 447d891..bb8ba1b 100644 (file)
@@ -602,7 +602,7 @@ static void doSyslogd(void)
        }                                       /* for main loop */
 }
 
-extern int syslogd_main(int argc, char **argv)
+int syslogd_main(int argc, char **argv)
 {
        int opt;
 
index 49435c2..2e895be 100644 (file)
@@ -332,7 +332,7 @@ static inline void showmode(struct fb_var_screeninfo *v)
 #ifdef STANDALONE
 int main(int argc, char **argv)
 #else
-extern int fbset_main(int argc, char **argv)
+int fbset_main(int argc, char **argv)
 #endif
 {
        struct fb_var_screeninfo var, varset;
index f3afea3..79c8f45 100644 (file)
@@ -31,7 +31,7 @@
 /* From <linux/fd.h> */
 #define FDFLUSH  _IO(2,0x4b)
 
-extern int fdflush_main(int argc, char **argv)
+int fdflush_main(int argc, char **argv)
 {
        int fd, result;
 
index 1814537..1d3e90a 100644 (file)
@@ -1321,7 +1321,7 @@ static void free_name_list(void)
 }
 #endif
 
-extern int fsck_minix_main(int argc, char **argv)
+int fsck_minix_main(int argc, char **argv)
 {
        struct termios tmp;
        int count;
index 00abe10..126caf6 100644 (file)
@@ -192,7 +192,7 @@ static int check_utc(void)
 #define HWCLOCK_OPT_HCTOSYS            0x08
 #define HWCLOCK_OPT_SYSTOHC            0x10
 
-extern int hwclock_main ( int argc, char **argv )
+int hwclock_main ( int argc, char **argv )
 {
        unsigned long opt;
        int utc;
index b1d538d..904a58e 100644 (file)
@@ -694,7 +694,7 @@ static void get_list_blocks(char *filename)
                printf("one bad block\n");
 }
 
-extern int mkfs_minix_main(int argc, char **argv)
+int mkfs_minix_main(int argc, char **argv)
 {
        int i=1;
        char *tmp;
index e910388..beba642 100644 (file)
@@ -57,7 +57,7 @@ static void gotsig(int sig)
 #endif /* CONFIG_FEATURE_USE_TERMIOS */
 
 
-extern int more_main(int argc, char **argv)
+int more_main(int argc, char **argv)
 {
        int c, lines, input = 0;
        int please_display_more_prompt = 0;
index c624e74..ce55a13 100644 (file)
@@ -66,7 +66,7 @@ static int do_em_all(void)
 
 #define DO_ALL    0x01
 
-extern int swap_on_off_main(int argc, char **argv)
+int swap_on_off_main(int argc, char **argv)
 {
        int ret;
 
index 8c05584..71ddbd4 100644 (file)
@@ -30,7 +30,7 @@
 #define OPT_IGNORED                    32      // -v is ignored
 #define OPT_ALL                                (ENABLE_FEATURE_UMOUNT_ALL ? 64 : 0)
 
-extern int umount_main(int argc, char **argv)
+int umount_main(int argc, char **argv)
 {
        int doForce;
        char path[2*PATH_MAX];