A bunch of defined(__GLIBC__) added. static-linking warning expanded
This commit is contained in:
		| @@ -13,8 +13,6 @@ | ||||
|  */ | ||||
|  | ||||
| #include "busybox.h" | ||||
| #include <unistd.h> | ||||
| #include <string.h> | ||||
| #include <assert.h> | ||||
|  | ||||
| /* Apparently uclibc defines __GLIBC__ (compat trick?). Oh well. */ | ||||
| @@ -22,7 +20,9 @@ | ||||
| #warning Static linking against glibc produces buggy executables | ||||
| #warning (glibc does not cope well with ld --gc-sections). | ||||
| #warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400 | ||||
| #warning Note that glibc is utterly unsuitable for static linking anyway. | ||||
| #warning Note that glibc is unsuitable for static linking anyway. | ||||
| #warning If you still want to do it, remove -Wl,--gc-sections | ||||
| #warning from top-level Makefile and remove this warning. | ||||
| #endif | ||||
|  | ||||
| #if ENABLE_SHOW_USAGE && !ENABLE_FEATURE_COMPRESS_USAGE | ||||
|   | ||||
| @@ -1215,7 +1215,7 @@ int gzip_main(int argc, char **argv) | ||||
| 					path = xasprintf("%s.gz", argv[i]); | ||||
|  | ||||
| 					/* Open output file */ | ||||
| #if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) && defined O_NOFOLLOW | ||||
| #if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 && defined(O_NOFOLLOW) | ||||
| 					outFileNum = | ||||
| 						open(path, O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW); | ||||
| #else | ||||
|   | ||||
| @@ -24,13 +24,6 @@ | ||||
|  * 7) lseek attempted when count==0 even if arg was +0 (from top) | ||||
|  */ | ||||
|  | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
| #include <ctype.h> | ||||
| #include <unistd.h> | ||||
| #include <fcntl.h> | ||||
| #include <sys/stat.h> | ||||
| #include "busybox.h" | ||||
|  | ||||
| static const struct suffix_mult tail_suffixes[] = { | ||||
|   | ||||
| @@ -159,7 +159,7 @@ | ||||
| #endif | ||||
|  | ||||
|  | ||||
| #if (__GLIBC__ < 2) | ||||
| #if defined(__GLIBC__) && __GLIBC__ < 2 | ||||
| int vdprintf(int d, const char *format, va_list ap); | ||||
| #endif | ||||
| // This is declared here rather than #including <libgen.h> in order to avoid | ||||
|   | ||||
| @@ -13,7 +13,7 @@ | ||||
|  | ||||
|  | ||||
|  | ||||
| #if (__GLIBC__ < 2) | ||||
| #if defined(__GLIBC__) && __GLIBC__ < 2 | ||||
| int vdprintf(int d, const char *format, va_list ap) | ||||
| { | ||||
| 	char buf[BUF_SIZE]; | ||||
|   | ||||
| @@ -29,7 +29,7 @@ | ||||
| #include <net/if.h> | ||||
| #include <net/if_arp.h> | ||||
| #include <netinet/in.h> | ||||
| #if __GLIBC__ >=2 && __GLIBC_MINOR__ >= 1 | ||||
| #if defined(__GLIBC__) && __GLIBC__ >=2 && __GLIBC_MINOR__ >= 1 | ||||
| #include <netpacket/packet.h> | ||||
| #include <net/ethernet.h> | ||||
| #else | ||||
|   | ||||
| @@ -741,7 +741,7 @@ static const struct hwtype loop_hwtype = { | ||||
|  | ||||
| #include <net/if_arp.h> | ||||
|  | ||||
| #if (__GLIBC__ >=2 && __GLIBC_MINOR__ >= 1) || defined(_NEWLIB_VERSION) | ||||
| #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined(_NEWLIB_VERSION) | ||||
| #include <net/ethernet.h> | ||||
| #else | ||||
| #include <linux/if_ether.h> | ||||
|   | ||||
| @@ -11,12 +11,11 @@ | ||||
|  */ | ||||
|  | ||||
| #include "libbb.h" | ||||
| #include <string.h> | ||||
|  | ||||
| #include "rt_names.h" | ||||
| #include "utils.h" | ||||
|  | ||||
| #if __GLIBC__ >=2 && __GLIBC_MINOR__ >= 1 | ||||
| #if defined(__GLIBC__) && __GLIBC__ >=2 && __GLIBC_MINOR__ >= 1 | ||||
| #include <net/ethernet.h> | ||||
| #else | ||||
| #include <linux/if_ether.h> | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
|  */ | ||||
|  | ||||
| #include <features.h> | ||||
| #if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION | ||||
| #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION | ||||
| #include <netpacket/packet.h> | ||||
| #include <net/ethernet.h> | ||||
| #else | ||||
|   | ||||
| @@ -22,7 +22,7 @@ | ||||
|  */ | ||||
|  | ||||
| #include <features.h> | ||||
| #if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined(_NEWLIB_VERSION) | ||||
| #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined(_NEWLIB_VERSION) | ||||
| #include <netpacket/packet.h> | ||||
| #include <net/ethernet.h> | ||||
| #else | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| /* vi: set sw=4 ts=4: */ | ||||
|  | ||||
| #include <netinet/in.h> | ||||
| #if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION | ||||
| #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION | ||||
| #include <netpacket/packet.h> | ||||
| #include <net/ethernet.h> | ||||
| #else | ||||
|   | ||||
| @@ -25,7 +25,7 @@ | ||||
|  | ||||
| #include <net/if.h> | ||||
| #include <features.h> | ||||
| #if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION | ||||
| #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION | ||||
| #include <netpacket/packet.h> | ||||
| #include <net/ethernet.h> | ||||
| #else | ||||
|   | ||||
| @@ -12567,11 +12567,9 @@ letcmd(int argc, char **argv) | ||||
|  | ||||
| #undef rflag | ||||
|  | ||||
| #ifdef __GLIBC__ | ||||
| #if __GLIBC__ == 2 && __GLIBC_MINOR__ < 1 | ||||
| #if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 1 | ||||
| typedef enum __rlimit_resource rlim_t; | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
|  | ||||
| /* | ||||
|   | ||||
		Reference in New Issue
	
	Block a user