* Remove teh macro definition of SETXXENT_TYPE,

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.
This commit is contained in:
nekral-guest 2008-01-06 13:12:09 +00:00
parent 116a76e528
commit 7b22265d4e
2 changed files with 19 additions and 22 deletions

View File

@ -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

View 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_ */