Robert P. Day removed 8 gazillion occurrences of "extern" on function
definitions. (That should only be on prototypes.)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 };
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user