]> granicus.if.org Git - shadow/commitdiff
* Remove teh macro definition of SETXXENT_TYPE,
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 6 Jan 2008 13:12:09 +0000 (13:12 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 6 Jan 2008 13:12:09 +0000 (13:12 +0000)
  SETXXENT_RET, and SETXXENT_TEST. They were used by the now
  removed pwent.c and grent.c.
* Remove the definition of PASSWD_PAG_FILE,
  GROUP_PAG_FILE, SHADOW_PAG_FILE, and SGROUP_PAG_FILE. They are
  never used.
* Don't include "snprintf.h". The file does not
  exist in shadow.
* Add new macro unused to tag unused parameters.

ChangeLog
lib/defines.h

index 9870427426c11b1e57ddc59375491aa6dcc5f913..95335ff1897ee06fd2c664533b3b77e1bf6672ba 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2008-01-06  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * lib/defines.h: Remove teh macro definition of SETXXENT_TYPE,
+       SETXXENT_RET, and SETXXENT_TEST. They were used by the now
+       removed pwent.c and grent.c.
+       * lib/defines.h: Remove the definition of PASSWD_PAG_FILE,
+       GROUP_PAG_FILE, SHADOW_PAG_FILE, and SGROUP_PAG_FILE. They are
+       never used.
+       * lib/defines.h: Don't include "snprintf.h". The file does not
+       exist in shadow.
+       * lib/defines.h: Add new macro unused to tag unused parameters.
+
 2008-01-06  Nicolas François  <nicolas.francois@centraliens.net>
 
        * src/useradd.c, src/groupmems.c: Assume optarg and optind are
index b3e88e402b72e4e62b10c86ae660d09c9fda3476..e46b80fcf6da86da881312dfdb096dfe90bdf0e6 100644 (file)
@@ -262,19 +262,6 @@ char *strchr (), *strrchr (), *strtok ();
 #define STRFCPY(A,B) \
        (strncpy((A), (B), sizeof(A) - 1), (A)[sizeof(A) - 1] = '\0')
 
-/* get rid of a few ugly repeated #ifdefs in pwent.c and grent.c */
-/* XXX - this is ugly too, configure should test it and not check for
-   any hardcoded system names, if possible.  --marekm */
-#if defined(AIX) || defined(__linux__)
-#define SETXXENT_TYPE void
-#define SETXXENT_RET(x) return
-#define SETXXENT_TEST(x) x; if (0)     /* compiler should optimize this away */
-#else
-#define SETXXENT_TYPE int
-#define SETXXENT_RET(x) return(x)
-#define SETXXENT_TEST(x) if (x)
-#endif
-
 #ifndef PASSWD_FILE
 #define PASSWD_FILE "/etc/passwd"
 #endif
@@ -293,11 +280,6 @@ char *strchr (), *strrchr (), *strtok ();
 #endif
 #endif
 
-#define PASSWD_PAG_FILE  PASSWD_FILE ".pag"
-#define GROUP_PAG_FILE   GROUP_FILE  ".pag"
-#define SHADOW_PAG_FILE  SHADOW_FILE ".pag"
-#define SGROUP_PAG_FILE  SGROUP_FILE ".pag"
-
 #ifndef NULL
 #define NULL ((void *) 0)
 #endif
@@ -310,10 +292,6 @@ extern char *strerror ();
 # endif
 #endif
 
-#ifndef HAVE_SNPRINTF
-#include "snprintf.h"
-#endif
-
 /*
  * string to use for the pw_passwd field in /etc/passwd when using
  * shadow passwords - most systems use "x" but there are a few
@@ -334,4 +312,11 @@ extern char *strerror ();
 #include <libaudit.h>
 #endif
 
+/* To be used for verified unused parameters */
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+# define unused __attribute__((unused))
+#else
+# define unused
+#endif
+
 #endif                         /* _DEFINES_H_ */