diff options
Diffstat (limited to 'archival')
-rw-r--r-- | archival/gunzip.c | 2 | ||||
-rw-r--r-- | archival/gzip.c | 23 | ||||
-rw-r--r-- | archival/tar.c | 10 |
3 files changed, 12 insertions, 23 deletions
diff --git a/archival/gunzip.c b/archival/gunzip.c index bf8812d..8100003 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c @@ -57,7 +57,6 @@ static char *license_msg[] = { }; #endif -#include "busybox.h" #include <getopt.h> #include <ctype.h> #include <sys/types.h> @@ -71,6 +70,7 @@ static char *license_msg[] = { #include <stdlib.h> #include <time.h> #include <dirent.h> +#include "busybox.h" #define BB_DECLARE_EXTERN #define bb_need_memory_exhausted #define bb_need_name_too_long diff --git a/archival/gzip.c b/archival/gzip.c index 3cbef4e..6c058d2 100644 --- a/archival/gzip.c +++ b/archival/gzip.c @@ -29,11 +29,6 @@ * */ -#include "busybox.h" -#define BB_DECLARE_EXTERN -#define bb_need_memory_exhausted -#include "messages.c" - /* These defines are very important for BusyBox. Without these, * huge chunks of ram are pre-allocated making the BusyBox bss * size Freaking Huge(tm), which is a bad thing.*/ @@ -43,9 +38,15 @@ /* I don't like nested includes, but the string and io functions are used * too often */ +#include <stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h> +#include "busybox.h" +#define BB_DECLARE_EXTERN +#define bb_need_memory_exhausted +#include "messages.c" + #define memzero(s, n) memset ((void *)(s), 0, (n)) #ifndef RETSIGTYPE @@ -1628,12 +1629,6 @@ ulg deflate() # include <unistd.h> #endif -#if defined(STDC_HEADERS) || !defined(NO_STDLIB_H) -# include <stdlib.h> -#else -extern int errno; -#endif - #if defined(DIRENT) # include <dirent.h> typedef struct dirent dir_type; @@ -3098,12 +3093,6 @@ local void set_file_type() # include <fcntl.h> #endif -#if defined(STDC_HEADERS) || !defined(NO_STDLIB_H) -# include <stdlib.h> -#else -extern int errno; -#endif - /* =========================================================================== * Copy input to output unchanged: zcat == cat with --force. * IN assertion: insize bytes have already been read in inbuf. diff --git a/archival/tar.c b/archival/tar.c index 62f1b1d..a9363d5 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -36,11 +36,6 @@ */ -#include "busybox.h" -#define BB_DECLARE_EXTERN -#define bb_need_io_error -#define bb_need_name_longer_than_foo -#include "messages.c" #include <stdio.h> #include <dirent.h> #include <errno.h> @@ -55,6 +50,11 @@ #include <string.h> #include <stdlib.h> #include <unistd.h> +#include "busybox.h" +#define BB_DECLARE_EXTERN +#define bb_need_io_error +#define bb_need_name_longer_than_foo +#include "messages.c" #ifdef BB_FEATURE_TAR_GZIP extern int unzip(int in, int out); |