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

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

index 4e8b1cc..41f6f58 100644 (file)
@@ -5,7 +5,7 @@
 
 
 #include "system.h"
-
+#include <grp.h>
 #include <rpm/rpmbuild.h>
 #include <rpm/rpmlog.h>
 #include "debug.h"
index 579198d..a81e6fc 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 grp.h memory.h netdb.h pwd.h utime.h)
+AC_CHECK_HEADERS(fcntl.h getopt.h memory.h netdb.h pwd.h utime.h)
 
 AC_CHECK_HEADERS(sys/ipc.h sys/socket.h sys/select.h)
 AC_CHECK_HEADERS(sys/types.h sys/stdtypes.h)
index 3d7fc14..55ad6fa 100644 (file)
@@ -4,16 +4,16 @@
 
 #include "system.h"
 
-/* just to put a marker in librpm.a */
-const char * const RPMVERSION = VERSION;
-
+#include <grp.h>
 #include <rpm/rpmlog.h>
 #include <rpm/rpmstring.h>
 
 #include "lib/misc.h"
-
 #include "debug.h"
 
+/* just to put a marker in librpm.a */
+const char * const RPMVERSION = VERSION;
+
 /* unameToUid(), uidTouname() and the group variants are really poorly
    implemented. They really ought to use hash tables. I just made the
    guess that most files would be owned by root or the same person/group
index 10a9cf7..da006b4 100644 (file)
--- a/system.h
+++ b/system.h
@@ -163,10 +163,6 @@ char *realpath(const char *path, char resolved_path []);
 #include <getopt.h>
 #endif
 
-#if HAVE_GRP_H
-#include <grp.h>
-#endif
-
 #if HAVE_LIMITS_H
 #include <limits.h>
 #endif