diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-05-17 23:02:14 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-05-17 23:02:14 +0000 |
commit | 5b340830045aa3dc6ca01cd1c6082b09161877d2 (patch) | |
tree | 4b2514b790deaafc68d6c9caa8706a2ab94bbc52 | |
parent | cd5c7866e328b502d946485ad1886ce26cffabfa (diff) | |
download | busybox-w32-5b340830045aa3dc6ca01cd1c6082b09161877d2.tar.gz busybox-w32-5b340830045aa3dc6ca01cd1c6082b09161877d2.tar.bz2 busybox-w32-5b340830045aa3dc6ca01cd1c6082b09161877d2.zip |
several *.c files:
move 'extern environ' up to the location of #includes
-rw-r--r-- | coreutils/env.c | 2 | ||||
-rw-r--r-- | coreutils/printenv.c | 2 | ||||
-rw-r--r-- | editors/awk.c | 3 | ||||
-rw-r--r-- | networking/inetd.c | 5 | ||||
-rw-r--r-- | shell/ash.c | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/coreutils/env.c b/coreutils/env.c index f47d450c5..2a271f703 100644 --- a/coreutils/env.c +++ b/coreutils/env.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include "busybox.h" | 32 | #include "busybox.h" |
33 | #include <errno.h> | 33 | #include <errno.h> |
34 | #include <getopt.h> /* struct option */ | 34 | #include <getopt.h> /* struct option */ |
35 | extern char **environ; | ||
35 | 36 | ||
36 | #if ENABLE_FEATURE_ENV_LONG_OPTIONS | 37 | #if ENABLE_FEATURE_ENV_LONG_OPTIONS |
37 | static const struct option env_long_options[] = { | 38 | static const struct option env_long_options[] = { |
@@ -49,7 +50,6 @@ int env_main(int argc, char** argv) | |||
49 | char **ep; | 50 | char **ep; |
50 | unsigned opt; | 51 | unsigned opt; |
51 | llist_t *unset_env = NULL; | 52 | llist_t *unset_env = NULL; |
52 | extern char **environ; | ||
53 | 53 | ||
54 | opt_complementary = "u::"; | 54 | opt_complementary = "u::"; |
55 | #if ENABLE_FEATURE_ENV_LONG_OPTIONS | 55 | #if ENABLE_FEATURE_ENV_LONG_OPTIONS |
diff --git a/coreutils/printenv.c b/coreutils/printenv.c index 1d41eeb7b..935f52df3 100644 --- a/coreutils/printenv.c +++ b/coreutils/printenv.c | |||
@@ -12,11 +12,11 @@ | |||
12 | #include <string.h> | 12 | #include <string.h> |
13 | #include <stdlib.h> | 13 | #include <stdlib.h> |
14 | #include "busybox.h" | 14 | #include "busybox.h" |
15 | extern char **environ; | ||
15 | 16 | ||
16 | int printenv_main(int argc, char **argv); | 17 | int printenv_main(int argc, char **argv); |
17 | int printenv_main(int argc, char **argv) | 18 | int printenv_main(int argc, char **argv) |
18 | { | 19 | { |
19 | extern char **environ; | ||
20 | int e = 0; | 20 | int e = 0; |
21 | 21 | ||
22 | /* no variables specified, show whole env */ | 22 | /* no variables specified, show whole env */ |
diff --git a/editors/awk.c b/editors/awk.c index 9366a2398..76ebe0fb9 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include "busybox.h" | 10 | #include "busybox.h" |
11 | #include "xregex.h" | 11 | #include "xregex.h" |
12 | #include <math.h> | 12 | #include <math.h> |
13 | extern char **environ; | ||
13 | 14 | ||
14 | /* This is a NOEXEC applet. Be very careful! */ | 15 | /* This is a NOEXEC applet. Be very careful! */ |
15 | 16 | ||
@@ -393,8 +394,6 @@ enum { NPRIMES = sizeof(PRIMES) / sizeof(unsigned) }; | |||
393 | 394 | ||
394 | /* globals */ | 395 | /* globals */ |
395 | 396 | ||
396 | extern char **environ; | ||
397 | |||
398 | static var * V[_intvarcount_]; | 397 | static var * V[_intvarcount_]; |
399 | static chain beginseq, mainseq, endseq, *seq; | 398 | static chain beginseq, mainseq, endseq, *seq; |
400 | static int nextrec, nextfile; | 399 | static int nextrec, nextfile; |
diff --git a/networking/inetd.c b/networking/inetd.c index 0ba3b949a..dc191a40e 100644 --- a/networking/inetd.c +++ b/networking/inetd.c | |||
@@ -172,8 +172,10 @@ | |||
172 | #include <rpc/pmap_clnt.h> | 172 | #include <rpc/pmap_clnt.h> |
173 | #endif | 173 | #endif |
174 | 174 | ||
175 | #define _PATH_INETDPID "/var/run/inetd.pid" | 175 | extern char **environ; |
176 | |||
176 | 177 | ||
178 | #define _PATH_INETDPID "/var/run/inetd.pid" | ||
177 | 179 | ||
178 | #define CNT_INTVL 60 /* servers in CNT_INTVL sec. */ | 180 | #define CNT_INTVL 60 /* servers in CNT_INTVL sec. */ |
179 | #define RETRYTIME (60*10) /* retry after bind or server fail */ | 181 | #define RETRYTIME (60*10) /* retry after bind or server fail */ |
@@ -1263,7 +1265,6 @@ int inetd_main(int argc, char **argv) | |||
1263 | sigset_t omask, wait_mask; | 1265 | sigset_t omask, wait_mask; |
1264 | 1266 | ||
1265 | #ifdef INETD_SETPROCTITLE | 1267 | #ifdef INETD_SETPROCTITLE |
1266 | extern char **environ; | ||
1267 | char **envp = environ; | 1268 | char **envp = environ; |
1268 | 1269 | ||
1269 | Argv = argv; | 1270 | Argv = argv; |
diff --git a/shell/ash.c b/shell/ash.c index 4b37f403c..4417ee908 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -60,6 +60,7 @@ | |||
60 | #if JOBS || ENABLE_ASH_READ_NCHARS | 60 | #if JOBS || ENABLE_ASH_READ_NCHARS |
61 | #include <termios.h> | 61 | #include <termios.h> |
62 | #endif | 62 | #endif |
63 | extern char **environ; | ||
63 | 64 | ||
64 | #if defined(__uClinux__) | 65 | #if defined(__uClinux__) |
65 | #error "Do not even bother, ash will not run on uClinux" | 66 | #error "Do not even bother, ash will not run on uClinux" |
@@ -1747,7 +1748,6 @@ struct redirtab { | |||
1747 | 1748 | ||
1748 | static struct redirtab *redirlist; | 1749 | static struct redirtab *redirlist; |
1749 | static int nullredirs; | 1750 | static int nullredirs; |
1750 | extern char **environ; | ||
1751 | static int preverrout_fd; /* save fd2 before print debug if xflag is set. */ | 1751 | static int preverrout_fd; /* save fd2 before print debug if xflag is set. */ |
1752 | 1752 | ||
1753 | #define VTABSIZE 39 | 1753 | #define VTABSIZE 39 |