diff options
| author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-12-18 21:49:06 +0000 |
|---|---|---|
| committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-12-18 21:49:06 +0000 |
| commit | ee81790a7d43f1de60d34d9bc2f0ffb0130d56bf (patch) | |
| tree | 84b352ca012bd713d990ef1d90b47777a6f6e2e7 | |
| parent | 077bb4f5c627e94acc22a69a76a8ff8fbea4e49e (diff) | |
| download | busybox-w32-ee81790a7d43f1de60d34d9bc2f0ffb0130d56bf.tar.gz busybox-w32-ee81790a7d43f1de60d34d9bc2f0ffb0130d56bf.tar.bz2 busybox-w32-ee81790a7d43f1de60d34d9bc2f0ffb0130d56bf.zip | |
A bunch of defined(__GLIBC__) added. static-linking warning expanded
git-svn-id: svn://busybox.net/trunk/busybox@16996 69ca8d6d-28ef-0310-b511-8ec308f3f277
| -rw-r--r-- | applets/applets.c | 6 | ||||
| -rw-r--r-- | archival/gzip.c | 2 | ||||
| -rw-r--r-- | coreutils/tail.c | 7 | ||||
| -rw-r--r-- | include/libbb.h | 2 | ||||
| -rw-r--r-- | libbb/vdprintf.c | 2 | ||||
| -rw-r--r-- | networking/ifconfig.c | 2 | ||||
| -rw-r--r-- | networking/interface.c | 2 | ||||
| -rw-r--r-- | networking/libiproute/ll_proto.c | 3 | ||||
| -rw-r--r-- | networking/udhcp/clientpacket.c | 2 | ||||
| -rw-r--r-- | networking/udhcp/clientsocket.c | 2 | ||||
| -rw-r--r-- | networking/udhcp/packet.c | 2 | ||||
| -rw-r--r-- | networking/udhcp/socket.c | 2 | ||||
| -rw-r--r-- | shell/ash.c | 4 |
13 files changed, 14 insertions, 24 deletions
diff --git a/applets/applets.c b/applets/applets.c index 23f9e4f92..f8abb2767 100644 --- a/applets/applets.c +++ b/applets/applets.c | |||
| @@ -13,8 +13,6 @@ | |||
| 13 | */ | 13 | */ |
| 14 | 14 | ||
| 15 | #include "busybox.h" | 15 | #include "busybox.h" |
| 16 | #include <unistd.h> | ||
| 17 | #include <string.h> | ||
| 18 | #include <assert.h> | 16 | #include <assert.h> |
| 19 | 17 | ||
| 20 | /* Apparently uclibc defines __GLIBC__ (compat trick?). Oh well. */ | 18 | /* Apparently uclibc defines __GLIBC__ (compat trick?). Oh well. */ |
| @@ -22,7 +20,9 @@ | |||
| 22 | #warning Static linking against glibc produces buggy executables | 20 | #warning Static linking against glibc produces buggy executables |
| 23 | #warning (glibc does not cope well with ld --gc-sections). | 21 | #warning (glibc does not cope well with ld --gc-sections). |
| 24 | #warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400 | 22 | #warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400 |
| 25 | #warning Note that glibc is utterly unsuitable for static linking anyway. | 23 | #warning Note that glibc is unsuitable for static linking anyway. |
| 24 | #warning If you still want to do it, remove -Wl,--gc-sections | ||
| 25 | #warning from top-level Makefile and remove this warning. | ||
| 26 | #endif | 26 | #endif |
| 27 | 27 | ||
| 28 | #if ENABLE_SHOW_USAGE && !ENABLE_FEATURE_COMPRESS_USAGE | 28 | #if ENABLE_SHOW_USAGE && !ENABLE_FEATURE_COMPRESS_USAGE |
diff --git a/archival/gzip.c b/archival/gzip.c index 7124e9bd4..5966c08e4 100644 --- a/archival/gzip.c +++ b/archival/gzip.c | |||
| @@ -1215,7 +1215,7 @@ int gzip_main(int argc, char **argv) | |||
| 1215 | path = xasprintf("%s.gz", argv[i]); | 1215 | path = xasprintf("%s.gz", argv[i]); |
| 1216 | 1216 | ||
| 1217 | /* Open output file */ | 1217 | /* Open output file */ |
| 1218 | #if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) && defined O_NOFOLLOW | 1218 | #if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 && defined(O_NOFOLLOW) |
| 1219 | outFileNum = | 1219 | outFileNum = |
| 1220 | open(path, O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW); | 1220 | open(path, O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW); |
| 1221 | #else | 1221 | #else |
diff --git a/coreutils/tail.c b/coreutils/tail.c index 4c3c3b901..505a8fd6b 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c | |||
| @@ -24,13 +24,6 @@ | |||
| 24 | * 7) lseek attempted when count==0 even if arg was +0 (from top) | 24 | * 7) lseek attempted when count==0 even if arg was +0 (from top) |
| 25 | */ | 25 | */ |
| 26 | 26 | ||
| 27 | #include <stdio.h> | ||
| 28 | #include <stdlib.h> | ||
| 29 | #include <string.h> | ||
| 30 | #include <ctype.h> | ||
| 31 | #include <unistd.h> | ||
| 32 | #include <fcntl.h> | ||
| 33 | #include <sys/stat.h> | ||
| 34 | #include "busybox.h" | 27 | #include "busybox.h" |
| 35 | 28 | ||
| 36 | static const struct suffix_mult tail_suffixes[] = { | 29 | static const struct suffix_mult tail_suffixes[] = { |
diff --git a/include/libbb.h b/include/libbb.h index fcd0dfa31..7dc7abd7f 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
| @@ -159,7 +159,7 @@ | |||
| 159 | #endif | 159 | #endif |
| 160 | 160 | ||
| 161 | 161 | ||
| 162 | #if (__GLIBC__ < 2) | 162 | #if defined(__GLIBC__) && __GLIBC__ < 2 |
| 163 | int vdprintf(int d, const char *format, va_list ap); | 163 | int vdprintf(int d, const char *format, va_list ap); |
| 164 | #endif | 164 | #endif |
| 165 | // This is declared here rather than #including <libgen.h> in order to avoid | 165 | // This is declared here rather than #including <libgen.h> in order to avoid |
diff --git a/libbb/vdprintf.c b/libbb/vdprintf.c index ffcb7a444..ea2a9d4bf 100644 --- a/libbb/vdprintf.c +++ b/libbb/vdprintf.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | #if (__GLIBC__ < 2) | 16 | #if defined(__GLIBC__) && __GLIBC__ < 2 |
| 17 | int vdprintf(int d, const char *format, va_list ap) | 17 | int vdprintf(int d, const char *format, va_list ap) |
| 18 | { | 18 | { |
| 19 | char buf[BUF_SIZE]; | 19 | char buf[BUF_SIZE]; |
diff --git a/networking/ifconfig.c b/networking/ifconfig.c index ae5b468ce..242bd0638 100644 --- a/networking/ifconfig.c +++ b/networking/ifconfig.c | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | #include <net/if.h> | 29 | #include <net/if.h> |
| 30 | #include <net/if_arp.h> | 30 | #include <net/if_arp.h> |
| 31 | #include <netinet/in.h> | 31 | #include <netinet/in.h> |
| 32 | #if __GLIBC__ >=2 && __GLIBC_MINOR__ >= 1 | 32 | #if defined(__GLIBC__) && __GLIBC__ >=2 && __GLIBC_MINOR__ >= 1 |
| 33 | #include <netpacket/packet.h> | 33 | #include <netpacket/packet.h> |
| 34 | #include <net/ethernet.h> | 34 | #include <net/ethernet.h> |
| 35 | #else | 35 | #else |
diff --git a/networking/interface.c b/networking/interface.c index dd455823b..1d194f38e 100644 --- a/networking/interface.c +++ b/networking/interface.c | |||
| @@ -741,7 +741,7 @@ static const struct hwtype loop_hwtype = { | |||
| 741 | 741 | ||
| 742 | #include <net/if_arp.h> | 742 | #include <net/if_arp.h> |
| 743 | 743 | ||
| 744 | #if (__GLIBC__ >=2 && __GLIBC_MINOR__ >= 1) || defined(_NEWLIB_VERSION) | 744 | #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined(_NEWLIB_VERSION) |
| 745 | #include <net/ethernet.h> | 745 | #include <net/ethernet.h> |
| 746 | #else | 746 | #else |
| 747 | #include <linux/if_ether.h> | 747 | #include <linux/if_ether.h> |
diff --git a/networking/libiproute/ll_proto.c b/networking/libiproute/ll_proto.c index a3fe9d376..20f26ca3f 100644 --- a/networking/libiproute/ll_proto.c +++ b/networking/libiproute/ll_proto.c | |||
| @@ -11,12 +11,11 @@ | |||
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | #include "libbb.h" | 13 | #include "libbb.h" |
| 14 | #include <string.h> | ||
| 15 | 14 | ||
| 16 | #include "rt_names.h" | 15 | #include "rt_names.h" |
| 17 | #include "utils.h" | 16 | #include "utils.h" |
| 18 | 17 | ||
| 19 | #if __GLIBC__ >=2 && __GLIBC_MINOR__ >= 1 | 18 | #if defined(__GLIBC__) && __GLIBC__ >=2 && __GLIBC_MINOR__ >= 1 |
| 20 | #include <net/ethernet.h> | 19 | #include <net/ethernet.h> |
| 21 | #else | 20 | #else |
| 22 | #include <linux/if_ether.h> | 21 | #include <linux/if_ether.h> |
diff --git a/networking/udhcp/clientpacket.c b/networking/udhcp/clientpacket.c index 15cbda2f5..69d7f2d38 100644 --- a/networking/udhcp/clientpacket.c +++ b/networking/udhcp/clientpacket.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | #include <features.h> | 11 | #include <features.h> |
| 12 | #if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION | 12 | #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION |
| 13 | #include <netpacket/packet.h> | 13 | #include <netpacket/packet.h> |
| 14 | #include <net/ethernet.h> | 14 | #include <net/ethernet.h> |
| 15 | #else | 15 | #else |
diff --git a/networking/udhcp/clientsocket.c b/networking/udhcp/clientsocket.c index 852061968..b8803f04e 100644 --- a/networking/udhcp/clientsocket.c +++ b/networking/udhcp/clientsocket.c | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| 24 | #include <features.h> | 24 | #include <features.h> |
| 25 | #if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined(_NEWLIB_VERSION) | 25 | #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined(_NEWLIB_VERSION) |
| 26 | #include <netpacket/packet.h> | 26 | #include <netpacket/packet.h> |
| 27 | #include <net/ethernet.h> | 27 | #include <net/ethernet.h> |
| 28 | #else | 28 | #else |
diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c index dec9d0ab3..25c55faab 100644 --- a/networking/udhcp/packet.c +++ b/networking/udhcp/packet.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
| 2 | 2 | ||
| 3 | #include <netinet/in.h> | 3 | #include <netinet/in.h> |
| 4 | #if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION | 4 | #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION |
| 5 | #include <netpacket/packet.h> | 5 | #include <netpacket/packet.h> |
| 6 | #include <net/ethernet.h> | 6 | #include <net/ethernet.h> |
| 7 | #else | 7 | #else |
diff --git a/networking/udhcp/socket.c b/networking/udhcp/socket.c index 2bae68f27..9ea200280 100644 --- a/networking/udhcp/socket.c +++ b/networking/udhcp/socket.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | 25 | ||
| 26 | #include <net/if.h> | 26 | #include <net/if.h> |
| 27 | #include <features.h> | 27 | #include <features.h> |
| 28 | #if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION | 28 | #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION |
| 29 | #include <netpacket/packet.h> | 29 | #include <netpacket/packet.h> |
| 30 | #include <net/ethernet.h> | 30 | #include <net/ethernet.h> |
| 31 | #else | 31 | #else |
diff --git a/shell/ash.c b/shell/ash.c index 8ba4cb8a0..2f7cc868a 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -12567,11 +12567,9 @@ letcmd(int argc, char **argv) | |||
| 12567 | 12567 | ||
| 12568 | #undef rflag | 12568 | #undef rflag |
| 12569 | 12569 | ||
| 12570 | #ifdef __GLIBC__ | 12570 | #if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 1 |
| 12571 | #if __GLIBC__ == 2 && __GLIBC_MINOR__ < 1 | ||
| 12572 | typedef enum __rlimit_resource rlim_t; | 12571 | typedef enum __rlimit_resource rlim_t; |
| 12573 | #endif | 12572 | #endif |
| 12574 | #endif | ||
| 12575 | 12573 | ||
| 12576 | 12574 | ||
| 12577 | /* | 12575 | /* |
