diff options
author | Bernhard Reutner-Fischer | 2006-09-12 13:27:55 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2006-09-12 13:27:55 +0000 |
commit | b5f50ea3446980984637ad5fac6bd3890102027b (patch) | |
tree | 98fdcda294822aa89f2e7bad386d53dac71e2ff7 | |
parent | 428a5cd0d32a3a4badf0a1f62f1126a24723545f (diff) | |
download | busybox-b5f50ea3446980984637ad5fac6bd3890102027b.zip busybox-b5f50ea3446980984637ad5fac6bd3890102027b.tar.gz |
- small trivia to be gentle to gcc-2.95.x which had no va_copy but only __va_copy.
-rw-r--r-- | include/platform.h | 8 | ||||
-rw-r--r-- | libbb/verror_msg.c | 6 | ||||
-rw-r--r-- | libbb/vherror_msg.c | 5 | ||||
-rw-r--r-- | libbb/vinfo_msg.c | 6 | ||||
-rw-r--r-- | libbb/vperror_msg.c | 4 |
5 files changed, 10 insertions, 19 deletions
diff --git a/include/platform.h b/include/platform.h index ca6f363..fdaf509 100644 --- a/include/platform.h +++ b/include/platform.h @@ -75,6 +75,14 @@ # endif #endif +/* gcc-2.95 had no va_copy but only __va_copy. */ +#if !__GNUC_PREREQ (3,0) +# include <stdarg.h> +# if !defined va_copy && defined __va_copy +# define va_copy(d,s) __va_copy((d),(s)) +# endif +#endif + /* ---- Endian Detection ------------------------------------ */ #if (defined __digital__ && defined __unix__) diff --git a/libbb/verror_msg.c b/libbb/verror_msg.c index 988a7a2..557b329 100644 --- a/libbb/verror_msg.c +++ b/libbb/verror_msg.c @@ -7,12 +7,8 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -#include <stdio.h> -#include <errno.h> -#include <string.h> -#include <stdlib.h> -#include <syslog.h> #include "libbb.h" +#include <syslog.h> int logmode = LOGMODE_STDIO; const char *msg_eol = "\n"; diff --git a/libbb/vherror_msg.c b/libbb/vherror_msg.c index 7d9fc43..04446a0 100644 --- a/libbb/vherror_msg.c +++ b/libbb/vherror_msg.c @@ -7,13 +7,8 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -#include <stdarg.h> -#include <netdb.h> -#include <stdio.h> - #include "libbb.h" - void bb_vherror_msg(const char *s, va_list p) { bb_verror_msg(s, p, hstrerror(h_errno)); diff --git a/libbb/vinfo_msg.c b/libbb/vinfo_msg.c index 613b013..fa27986 100644 --- a/libbb/vinfo_msg.c +++ b/libbb/vinfo_msg.c @@ -7,12 +7,8 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -#include <stdio.h> -#include <errno.h> -#include <string.h> -#include <stdlib.h> -#include <syslog.h> #include "libbb.h" +#include <syslog.h> void bb_vinfo_msg(const char *s, va_list p) { diff --git a/libbb/vperror_msg.c b/libbb/vperror_msg.c index 70fd671..c3f79c2 100644 --- a/libbb/vperror_msg.c +++ b/libbb/vperror_msg.c @@ -7,10 +7,6 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -#include <stdio.h> -#include <errno.h> -#include <string.h> -#include <stdlib.h> #include "libbb.h" void bb_vperror_msg(const char *s, va_list p) |