Dont include <pwd.h> from system.h, dont bother checking for it either
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 23 Dec 2009 11:40:10 +0000 (13:40 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 23 Dec 2009 11:40:10 +0000 (13:40 +0200)
- no much point conditionalizing something we can't live without
- just three places need, no point polluting include space everywhere

build/names.c
configure.ac
lib/misc.c
misc/glob.c
system.h

index 41f6f58..692bbe9 100644 (file)
@@ -5,6 +5,7 @@
 
 
 #include "system.h"
+#include <pwd.h>
 #include <grp.h>
 #include <rpm/rpmbuild.h>
 #include <rpm/rpmlog.h>
index d66c84f..0215e34 100644 (file)
@@ -377,7 +377,7 @@ AC_HEADER_TIME
 
 AC_CHECK_HEADERS(locale.h)
 AC_CHECK_HEADERS(limits.h)
-AC_CHECK_HEADERS(fcntl.h getopt.h memory.h netdb.h pwd.h utime.h)
+AC_CHECK_HEADERS(fcntl.h getopt.h memory.h netdb.h utime.h)
 
 AC_CHECK_HEADERS(sys/ipc.h sys/select.h)
 AC_CHECK_HEADERS(sys/types.h sys/stdtypes.h)
index 55ad6fa..1cbcaa3 100644 (file)
@@ -4,6 +4,7 @@
 
 #include "system.h"
 
+#include <pwd.h>
 #include <grp.h>
 #include <rpm/rpmlog.h>
 #include <rpm/rpmstring.h>
index a2ee18b..8ba181e 100644 (file)
@@ -24,6 +24,7 @@
 
 # include "system.h"
 
+# include <pwd.h>
 # include <assert.h>
 
 #define        __alloca        alloca
index 25573b9..a02ae24 100644 (file)
--- a/system.h
+++ b/system.h
@@ -240,10 +240,6 @@ extern const char *__progname;
 #include <netdb.h>
 #endif
 
-#if HAVE_PWD_H
-#include <pwd.h>
-#endif
-
 /* Take care of NLS matters.  */
 
 #if HAVE_LOCALE_H