several *.c files:
move 'extern environ' up to the location of #includes
This commit is contained in:
parent
cd5c7866e3
commit
5b34083004
@ -32,6 +32,7 @@
|
|||||||
#include "busybox.h"
|
#include "busybox.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <getopt.h> /* struct option */
|
#include <getopt.h> /* struct option */
|
||||||
|
extern char **environ;
|
||||||
|
|
||||||
#if ENABLE_FEATURE_ENV_LONG_OPTIONS
|
#if ENABLE_FEATURE_ENV_LONG_OPTIONS
|
||||||
static const struct option env_long_options[] = {
|
static const struct option env_long_options[] = {
|
||||||
@ -49,7 +50,6 @@ int env_main(int argc, char** argv)
|
|||||||
char **ep;
|
char **ep;
|
||||||
unsigned opt;
|
unsigned opt;
|
||||||
llist_t *unset_env = NULL;
|
llist_t *unset_env = NULL;
|
||||||
extern char **environ;
|
|
||||||
|
|
||||||
opt_complementary = "u::";
|
opt_complementary = "u::";
|
||||||
#if ENABLE_FEATURE_ENV_LONG_OPTIONS
|
#if ENABLE_FEATURE_ENV_LONG_OPTIONS
|
||||||
|
@ -12,11 +12,11 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "busybox.h"
|
#include "busybox.h"
|
||||||
|
extern char **environ;
|
||||||
|
|
||||||
int printenv_main(int argc, char **argv);
|
int printenv_main(int argc, char **argv);
|
||||||
int printenv_main(int argc, char **argv)
|
int printenv_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
extern char **environ;
|
|
||||||
int e = 0;
|
int e = 0;
|
||||||
|
|
||||||
/* no variables specified, show whole env */
|
/* no variables specified, show whole env */
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "busybox.h"
|
#include "busybox.h"
|
||||||
#include "xregex.h"
|
#include "xregex.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
extern char **environ;
|
||||||
|
|
||||||
/* This is a NOEXEC applet. Be very careful! */
|
/* This is a NOEXEC applet. Be very careful! */
|
||||||
|
|
||||||
@ -393,8 +394,6 @@ enum { NPRIMES = sizeof(PRIMES) / sizeof(unsigned) };
|
|||||||
|
|
||||||
/* globals */
|
/* globals */
|
||||||
|
|
||||||
extern char **environ;
|
|
||||||
|
|
||||||
static var * V[_intvarcount_];
|
static var * V[_intvarcount_];
|
||||||
static chain beginseq, mainseq, endseq, *seq;
|
static chain beginseq, mainseq, endseq, *seq;
|
||||||
static int nextrec, nextfile;
|
static int nextrec, nextfile;
|
||||||
|
@ -172,9 +172,11 @@
|
|||||||
#include <rpc/pmap_clnt.h>
|
#include <rpc/pmap_clnt.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _PATH_INETDPID "/var/run/inetd.pid"
|
extern char **environ;
|
||||||
|
|
||||||
|
|
||||||
|
#define _PATH_INETDPID "/var/run/inetd.pid"
|
||||||
|
|
||||||
#define CNT_INTVL 60 /* servers in CNT_INTVL sec. */
|
#define CNT_INTVL 60 /* servers in CNT_INTVL sec. */
|
||||||
#define RETRYTIME (60*10) /* retry after bind or server fail */
|
#define RETRYTIME (60*10) /* retry after bind or server fail */
|
||||||
|
|
||||||
@ -1263,7 +1265,6 @@ int inetd_main(int argc, char **argv)
|
|||||||
sigset_t omask, wait_mask;
|
sigset_t omask, wait_mask;
|
||||||
|
|
||||||
#ifdef INETD_SETPROCTITLE
|
#ifdef INETD_SETPROCTITLE
|
||||||
extern char **environ;
|
|
||||||
char **envp = environ;
|
char **envp = environ;
|
||||||
|
|
||||||
Argv = argv;
|
Argv = argv;
|
||||||
|
@ -60,6 +60,7 @@
|
|||||||
#if JOBS || ENABLE_ASH_READ_NCHARS
|
#if JOBS || ENABLE_ASH_READ_NCHARS
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#endif
|
#endif
|
||||||
|
extern char **environ;
|
||||||
|
|
||||||
#if defined(__uClinux__)
|
#if defined(__uClinux__)
|
||||||
#error "Do not even bother, ash will not run on uClinux"
|
#error "Do not even bother, ash will not run on uClinux"
|
||||||
@ -1747,7 +1748,6 @@ struct redirtab {
|
|||||||
|
|
||||||
static struct redirtab *redirlist;
|
static struct redirtab *redirlist;
|
||||||
static int nullredirs;
|
static int nullredirs;
|
||||||
extern char **environ;
|
|
||||||
static int preverrout_fd; /* save fd2 before print debug if xflag is set. */
|
static int preverrout_fd; /* save fd2 before print debug if xflag is set. */
|
||||||
|
|
||||||
#define VTABSIZE 39
|
#define VTABSIZE 39
|
||||||
|
Loading…
Reference in New Issue
Block a user