svn commit: trunk/busybox: applets archival coreutils include libbb etc...
vda at busybox.net
vda at busybox.net
Mon Dec 18 13:49:09 PST 2006
Author: vda
Date: 2006-12-18 13:49:06 -0800 (Mon, 18 Dec 2006)
New Revision: 16996
Log:
A bunch of defined(__GLIBC__) added. static-linking warning expanded
Modified:
trunk/busybox/applets/applets.c
trunk/busybox/archival/gzip.c
trunk/busybox/coreutils/tail.c
trunk/busybox/include/libbb.h
trunk/busybox/libbb/vdprintf.c
trunk/busybox/networking/ifconfig.c
trunk/busybox/networking/interface.c
trunk/busybox/networking/libiproute/ll_proto.c
trunk/busybox/networking/udhcp/clientpacket.c
trunk/busybox/networking/udhcp/clientsocket.c
trunk/busybox/networking/udhcp/packet.c
trunk/busybox/networking/udhcp/socket.c
trunk/busybox/shell/ash.c
Changeset:
Modified: trunk/busybox/applets/applets.c
===================================================================
--- trunk/busybox/applets/applets.c 2006-12-18 21:22:16 UTC (rev 16995)
+++ trunk/busybox/applets/applets.c 2006-12-18 21:49:06 UTC (rev 16996)
@@ -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
Modified: trunk/busybox/archival/gzip.c
===================================================================
--- trunk/busybox/archival/gzip.c 2006-12-18 21:22:16 UTC (rev 16995)
+++ trunk/busybox/archival/gzip.c 2006-12-18 21:49:06 UTC (rev 16996)
@@ -1215,7 +1215,7 @@
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
Modified: trunk/busybox/coreutils/tail.c
===================================================================
--- trunk/busybox/coreutils/tail.c 2006-12-18 21:22:16 UTC (rev 16995)
+++ trunk/busybox/coreutils/tail.c 2006-12-18 21:49:06 UTC (rev 16996)
@@ -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[] = {
Modified: trunk/busybox/include/libbb.h
===================================================================
--- trunk/busybox/include/libbb.h 2006-12-18 21:22:16 UTC (rev 16995)
+++ trunk/busybox/include/libbb.h 2006-12-18 21:49:06 UTC (rev 16996)
@@ -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
Modified: trunk/busybox/libbb/vdprintf.c
===================================================================
--- trunk/busybox/libbb/vdprintf.c 2006-12-18 21:22:16 UTC (rev 16995)
+++ trunk/busybox/libbb/vdprintf.c 2006-12-18 21:49:06 UTC (rev 16996)
@@ -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];
Modified: trunk/busybox/networking/ifconfig.c
===================================================================
--- trunk/busybox/networking/ifconfig.c 2006-12-18 21:22:16 UTC (rev 16995)
+++ trunk/busybox/networking/ifconfig.c 2006-12-18 21:49:06 UTC (rev 16996)
@@ -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
Modified: trunk/busybox/networking/interface.c
===================================================================
--- trunk/busybox/networking/interface.c 2006-12-18 21:22:16 UTC (rev 16995)
+++ trunk/busybox/networking/interface.c 2006-12-18 21:49:06 UTC (rev 16996)
@@ -741,7 +741,7 @@
#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>
Modified: trunk/busybox/networking/libiproute/ll_proto.c
===================================================================
--- trunk/busybox/networking/libiproute/ll_proto.c 2006-12-18 21:22:16 UTC (rev 16995)
+++ trunk/busybox/networking/libiproute/ll_proto.c 2006-12-18 21:49:06 UTC (rev 16996)
@@ -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>
Modified: trunk/busybox/networking/udhcp/clientpacket.c
===================================================================
--- trunk/busybox/networking/udhcp/clientpacket.c 2006-12-18 21:22:16 UTC (rev 16995)
+++ trunk/busybox/networking/udhcp/clientpacket.c 2006-12-18 21:49:06 UTC (rev 16996)
@@ -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
Modified: trunk/busybox/networking/udhcp/clientsocket.c
===================================================================
--- trunk/busybox/networking/udhcp/clientsocket.c 2006-12-18 21:22:16 UTC (rev 16995)
+++ trunk/busybox/networking/udhcp/clientsocket.c 2006-12-18 21:49:06 UTC (rev 16996)
@@ -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
Modified: trunk/busybox/networking/udhcp/packet.c
===================================================================
--- trunk/busybox/networking/udhcp/packet.c 2006-12-18 21:22:16 UTC (rev 16995)
+++ trunk/busybox/networking/udhcp/packet.c 2006-12-18 21:49:06 UTC (rev 16996)
@@ -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
Modified: trunk/busybox/networking/udhcp/socket.c
===================================================================
--- trunk/busybox/networking/udhcp/socket.c 2006-12-18 21:22:16 UTC (rev 16995)
+++ trunk/busybox/networking/udhcp/socket.c 2006-12-18 21:49:06 UTC (rev 16996)
@@ -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
Modified: trunk/busybox/shell/ash.c
===================================================================
--- trunk/busybox/shell/ash.c 2006-12-18 21:22:16 UTC (rev 16995)
+++ trunk/busybox/shell/ash.c 2006-12-18 21:49:06 UTC (rev 16996)
@@ -12567,11 +12567,9 @@
#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
/*
More information about the busybox-cvs
mailing list