diff --git a/ChangeLog b/ChangeLog index 98704274..95335ff1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-01-06 Nicolas François + + * 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 * src/useradd.c, src/groupmems.c: Assume optarg and optind are diff --git a/lib/defines.h b/lib/defines.h index b3e88e40..e46b80fc 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -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 #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_ */