+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
#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
#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
# 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
#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_ */