From 0c15e5feb333b88b5a5a525d588601d381df654c Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 5 Jan 2010 15:04:20 +0200 Subject: [PATCH] Include as necessary instead of system.h - also loose the related ancient compatibility goo --- lib/merge.c | 1 + lib/rpmps.c | 1 + misc/fnmatch.c | 1 + misc/glob.c | 1 + rpmio/argv.c | 1 + rpmio/rpmlog.c | 1 + rpmio/rpmmalloc.c | 4 +--- system.h | 14 -------------- tools/javadeps.c | 1 + 9 files changed, 8 insertions(+), 17 deletions(-) diff --git a/lib/merge.c b/lib/merge.c index b4163e2..9b541a6 100644 --- a/lib/merge.c +++ b/lib/merge.c @@ -54,6 +54,7 @@ static char sccsid[] = "@(#)merge.c 8.2 (Berkeley) 2/14/94"; */ #include "system.h" +#include #include "lib/rpmdb_internal.h" /* XXX for mergesort */ #define ISIZE sizeof(int) diff --git a/lib/rpmps.c b/lib/rpmps.c index 2b114f0..bcee732 100644 --- a/lib/rpmps.c +++ b/lib/rpmps.c @@ -5,6 +5,7 @@ #include "system.h" #include +#include #include #include diff --git a/misc/fnmatch.c b/misc/fnmatch.c index 618317a..77fbd93 100644 --- a/misc/fnmatch.c +++ b/misc/fnmatch.c @@ -17,6 +17,7 @@ Boston, MA 02111-1307, USA. */ # include "system.h" +# include /* Find the first occurrence of C in S or the final NUL byte. */ static inline char * diff --git a/misc/glob.c b/misc/glob.c index 8ba181e..be393f8 100644 --- a/misc/glob.c +++ b/misc/glob.c @@ -24,6 +24,7 @@ # include "system.h" +# include # include # include diff --git a/rpmio/argv.c b/rpmio/argv.c index 7a1aa5d..d633462 100644 --- a/rpmio/argv.c +++ b/rpmio/argv.c @@ -4,6 +4,7 @@ #include "system.h" +#include #include #include diff --git a/rpmio/rpmlog.c b/rpmio/rpmlog.c index d288767..8023d5c 100644 --- a/rpmio/rpmlog.c +++ b/rpmio/rpmlog.c @@ -4,6 +4,7 @@ #include "system.h" #include +#include #include #include "debug.h" diff --git a/rpmio/rpmmalloc.c b/rpmio/rpmmalloc.c index fd93cbc..eec73ed 100644 --- a/rpmio/rpmmalloc.c +++ b/rpmio/rpmmalloc.c @@ -4,9 +4,7 @@ #include "system.h" -#if HAVE_MALLOC_H -#include -#endif +#include #include "debug.h" diff --git a/system.h b/system.h index 6d84f0c..a6e585e 100644 --- a/system.h +++ b/system.h @@ -58,20 +58,6 @@ extern int errno; #define getenv(_s) __secure_getenv(_s) #endif -#ifdef STDC_HEADERS -/* FIX: shrug */ -#define getopt system_getopt -#include -#undef getopt -#else /* not STDC_HEADERS */ -char *getenv (const char *name); -#endif /* STDC_HEADERS */ - -/* XXX solaris2.5.1 has not */ -#if !defined(EXIT_FAILURE) -#define EXIT_FAILURE 1 -#endif - #ifdef HAVE_FCNTL_H #include #else diff --git a/tools/javadeps.c b/tools/javadeps.c index 43e962e..40055b5 100644 --- a/tools/javadeps.c +++ b/tools/javadeps.c @@ -64,6 +64,7 @@ marc@redhat.com and ewt@redhat.com. #include */ +#include #include #include #include -- 2.7.4