RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm-5_1: lua/ Makefile.am lua/chkconfig/ chkconfig.c lua/lo...

From: Jeff Johnson <jbj@rpm5.org>
Date: Mon 18 Aug 2008 - 21:47:18 CEST
Message-Id: <20080818194718.3843D4D387@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  jbj@rpm5.org
  Module: rpm lua                          Date:   18-Aug-2008 21:47:18
  Branch: rpm-5_1                          Handle: 200808181727438374

  Added files:              (Branch: rpm-5_1)
    lua/shadow              shadow_config.h
  Modified files:           (Branch: rpm-5_1)
    lua                     Makefile.am lualib.h
    lua/chkconfig           chkconfig.c
    lua/local               lshadow.c lwrs.c
    lua/shadow              chkname.h commonio.c commonio.h copydir.c
                            defines.h faillog.h fputsx.c getdef.c groupadd.c
                            groupio.c gshadow.c gshadow_.h list.c prototypes.h
                            pwauth.h pwio.c sgetgrent.c sgetpwent.c sgroupio.c
                            shadowio.c strtoday.c useradd.c
    rpm                     CHANGES configure.ac
  Removed files:            (Branch: rpm-5_1)
    lua/shadow              config.h getdate.c getdate.h xmalloc.c

  Log:
    - WR: eliminate most compiler warnings.
    - WR: eliminate duplicated AutoFu boilerplate, use system.h instead.
    - WR: eliminate getdate.[ch], use same from rpmio instead.
    - WR: eliminate dueling AutoFu defines from shadow_config.h, use RPM's
    	config.h (through system.h) instead.
    - WR: eliminate xmalloc.c, use system.h defines instead.
    - WR: rename config.h to shadow_config.h, include "system.h" instead.

  Summary:
    Revision    Changes     Path
    1.17.2.2    +29 -9      lua/Makefile.am
    1.1.2.3     +7  -7      lua/chkconfig/chkconfig.c
    1.1.2.3     +6  -3      lua/local/lshadow.c
    1.1.2.4     +5  -1      lua/local/lwrs.c
    1.2.2.1     +0  -1      lua/lualib.h
    1.1.2.3     +1  -1      lua/shadow/chkname.h
    1.1.2.3     +3  -2      lua/shadow/commonio.c
    1.1.2.3     +1  -1      lua/shadow/commonio.h
    1.2         +0  -412    lua/shadow/config.h
    1.1.2.3     +3  -2      lua/shadow/copydir.c
    1.1.2.3     +2  -68     lua/shadow/defines.h
    1.1.2.3     +1  -1      lua/shadow/faillog.h
    1.1.2.3     +5  -3      lua/shadow/fputsx.c
    1.3         +0  -2575   lua/shadow/getdate.c
    1.3         +0  -14     lua/shadow/getdate.h
    1.1.2.3     +3  -2      lua/shadow/getdef.c
    1.1.2.4     +6  -5      lua/shadow/groupadd.c
    1.1.2.3     +6  -2      lua/shadow/groupio.c
    1.1.2.3     +3  -5      lua/shadow/gshadow.c
    1.1.2.3     +1  -1      lua/shadow/gshadow_.h
    1.1.2.3     +7  -4      lua/shadow/list.c
    1.1.2.3     +7  -5      lua/shadow/prototypes.h
    1.1.2.3     +1  -1      lua/shadow/pwauth.h
    1.1.2.3     +6  -2      lua/shadow/pwio.c
    1.1.2.3     +6  -3      lua/shadow/sgetgrent.c
    1.1.2.3     +5  -3      lua/shadow/sgetpwent.c
    1.1.2.3     +6  -3      lua/shadow/sgroupio.c
    1.2.2.2     +260 -0     lua/shadow/shadow_config.h
    1.1.2.3     +6  -3      lua/shadow/shadowio.c
    1.1.2.3     +7  -4      lua/shadow/strtoday.c
    1.1.2.4     +13 -12     lua/shadow/useradd.c
    1.2         +0  -37     lua/shadow/xmalloc.c
    1.2288.2.87 +7  -0      rpm/CHANGES
    2.289.2.8   +7  -0      rpm/configure.ac
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: lua/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.17.2.1 -r1.17.2.2 Makefile.am
  --- lua/Makefile.am	17 Aug 2008 18:49:37 -0000	1.17.2.1
  +++ lua/Makefile.am	18 Aug 2008 19:47:16 -0000	1.17.2.2
  @@ -10,11 +10,18 @@
   AM_CPPFLAGS = \
   	-I$(top_srcdir) \
   	-I$(srcdir)/local \
  -	-I$(builddir)/local \
  +	-I$(builddir)/local
  +if USE_LUA_CHKCONFIG
  +AM_CPPFLAGS += \
   	-I$(srcdir)/chkconfig \
  -	-I$(builddir)/chkconfig \
  +	-I$(builddir)/chkconfig
  +endif
  +if USE_LUA_SHADOW
  +AM_CPPFLAGS += \
   	-I$(srcdir)/shadow \
  -	-I$(builddir)/shadow \
  +	-I$(builddir)/shadow
  +endif
  +AM_CPPFLAGS += \
   	-I$(srcdir)
   
   rpmlua_SOURCES = lua.c
  @@ -28,6 +35,14 @@
   bin2c_LDADD =
   
   liblua_la_CFLAGS = @WITH_LUA_SUBDIR_DEF@ -DLUA_USE_POSIX
  +if USE_LUA_SHADOW
  +liblua_la_CFLAGS += \
  +		-DUSE_LUA_SHADOW
  +endif
  +if USE_LUA_CHKCONFIG
  +liblua_la_CFLAGS += \
  +		-DUSE_LUA_CHKCONFIG
  +endif
   liblua_la_LIBADD = @WITH_LUA_SUBDIR_LIB@ -lm
   liblua_la_SOURCES = \
   		local/llocal.c \
  @@ -46,7 +61,9 @@
   		local/luuid.h \
   		local/luuid.c \
   		local/lwrs.h \
  -		local/lwrs.c \
  +		local/lwrs.c
  +if USE_LUA_SHADOW
  +liblua_la_SOURCES += \
   		shadow/chkname.h \
   		shadow/commonio.h \
   		shadow/commonio.c \
  @@ -55,8 +72,6 @@
   		shadow/defines.h \
   		shadow/faillog.h \
   		shadow/fputsx.c \
  -		shadow/getdate.h \
  -		shadow/getdate.c \
   		shadow/getdef.h \
   		shadow/getdef.c \
   		shadow/groupadd.c \
  @@ -77,11 +92,15 @@
   		shadow/shadowio.h \
   		shadow/shadowio.c \
   		shadow/strtoday.c \
  -		shadow/useradd.c \
  -		shadow/xmalloc.c \
  +		shadow/useradd.c
  +endif
  +if USE_LUA_CHKCONFIG
  +liblua_la_SOURCES += \
   		chkconfig/chkconfig.c \
   		chkconfig/leveldb.h \
  -		chkconfig/leveldb.c \
  +		chkconfig/leveldb.c
  +endif
  +liblua_la_SOURCES += \
   		linit.c \
   		lauxlib.h \
   		lauxlib.c \
  @@ -140,6 +159,7 @@
   
   $(builddir)/local/llocal.c: $(builddir)/local/llocal_lua.c
   $(builddir)/local/llocal_lua.c: $(builddir)/bin2c $(srcdir)/local/llocal.lua
  +	mkdir -p $(builddir)/local
   	$(builddir)/bin2c $(srcdir)/local/llocal.lua >$(builddir)/local/llocal_lua.c
   
   clean-local:
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/chkconfig/chkconfig.c
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 chkconfig.c
  --- lua/chkconfig/chkconfig.c	17 Aug 2008 18:49:37 -0000	1.1.2.2
  +++ lua/chkconfig/chkconfig.c	18 Aug 2008 19:47:16 -0000	1.1.2.3
  @@ -27,7 +27,7 @@
   #include <sys/stat.h>
   #include <unistd.h>
   
  -static char *progname;
  +static const char *progname;
   
   #define _(String) gettext((String))
   
  @@ -74,7 +74,7 @@
   
   
       if (!findServiceEntries(name, level, &globres)) {
  -	    for (i = 0; i < globres.gl_pathc; i++)
  +	    for (i = 0; i < (int)globres.gl_pathc; i++)
   		    unlink(globres.gl_pathv[i]);
   	    if (globres.gl_pathc) globfree(&globres);
       }
  @@ -94,7 +94,7 @@
   
       for (level = 0; level < 7; level++) {
   	    if (!findServiceEntries(name, level, &globres)) {
  -		    for (i = 0; i < globres.gl_pathc; i++)
  +		    for (i = 0; i < (int)globres.gl_pathc; i++)
   		      unlink(globres.gl_pathv[i]);
   		    if (globres.gl_pathc) globfree(&globres);
   	    }
  @@ -313,7 +313,7 @@
       if (configured && doChange) {
           for (level = 0; level < 7; level++) {
               if (!findServiceEntries(name, level, &globres)) {
  -                for (i = 0; i < globres.gl_pathc; i++)
  +                for (i = 0; i < (int)globres.gl_pathc; i++)
                       unlink(globres.gl_pathv[i]);
                   if (globres.gl_pathc)
                       globfree(&globres);
  @@ -366,7 +366,7 @@
       return 0;
   }
   
  -static int isXinetdEnabled() {
  +static int isXinetdEnabled(void) {
   	int i;
   	struct service s;
   
  @@ -511,7 +511,7 @@
       return 0;
   }
   
  -int setService(char * name, int where, int state) {
  +static int setService(char * name, int where, int state) {
       int i, rc;
       int what;
       struct service s;
  @@ -559,7 +559,7 @@
       return 0;
   }
   
  -int chkconfig_main(int argc, char ** argv) {
  +int chkconfig_main(int argc, const char ** argv) {
       int listItem = 0, addItem = 0, delItem = 0, overrideItem = 0;
       int rc, i, x;
       int LSB = 0;
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/local/lshadow.c
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 lshadow.c
  --- lua/local/lshadow.c	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/local/lshadow.c	18 Aug 2008 19:47:16 -0000	1.1.2.3
  @@ -1,7 +1,6 @@
   /*
  -** $Id: lshadow.c,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $
  -** Standard mathematical library
  -** See Copyright Notice in lua.h
  +** $Id: lshadow.c,v 1.1.2.3 2008/08/18 19:47:16 jbj Exp $
  +** Shadow utilities
   */
   
   
  @@ -124,9 +123,13 @@
   /*@unchecked@*/
   static const luaL_reg shadow[] = {
     {"version",   shadow_version},
  +#ifdef USE_LUA_SHADOW
     {"groupadd",  shadow_groupadd},
     {"useradd",  shadow_useradd},
  +#endif
  +#ifdef USE_LUA_CHKCONFIG
     {"chkconfig",  shadow_chkconfig},
  +#endif
     {NULL, NULL}
   };
   /*@=readonlytrans@*/
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/local/lwrs.c
  ============================================================================
  $ cvs diff -u -r1.1.2.3 -r1.1.2.4 lwrs.c
  --- lua/local/lwrs.c	17 Aug 2008 18:56:12 -0000	1.1.2.3
  +++ lua/local/lwrs.c	18 Aug 2008 19:47:16 -0000	1.1.2.4
  @@ -1,5 +1,5 @@
   /*
  -** $Id: lwrs.c,v 1.1.2.3 2008/08/17 18:56:12 jbj Exp $
  +** $Id: lwrs.c,v 1.1.2.4 2008/08/18 19:47:16 jbj Exp $
   ** WRLinux utilities
   */
   
  @@ -121,9 +121,13 @@
   /*@unchecked@*/
   static const luaL_reg wrs[] = {
     {"version",   wrs_version},
  +#ifdef USE_LUA_SHADOW
     {"groupadd",  wrs_groupadd},
     {"useradd",  wrs_useradd},
  +#endif
  +#ifdef USE_LUA_CHKCONFIG
     {"chkconfig",  wrs_chkconfig},
  +#endif
     {NULL, NULL}
   };
   /*@=readonlytrans@*/
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/lualib.h
  ============================================================================
  $ cvs diff -u -r1.2 -r1.2.2.1 lualib.h
  --- lua/lualib.h	25 Jan 2008 16:54:30 -0000	1.2
  +++ lua/lualib.h	18 Aug 2008 19:47:16 -0000	1.2.2.1
  @@ -39,7 +39,6 @@
   #define LUA_LOADLIBNAME	"package"
   LUALIB_API int (luaopen_package) (lua_State *L);
   
  -
   /* open all previous libraries */
   LUALIB_API void (luaL_openlibs) (lua_State *L); 
   
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/chkname.h
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 chkname.h
  --- lua/shadow/chkname.h	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/chkname.h	18 Aug 2008 19:47:16 -0000	1.1.2.3
  @@ -4,7 +4,7 @@
    * in WRLinux for inclusion in rpm.
    */
   
  -/* $Id: chkname.h,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $ */
  +/* $Id: chkname.h,v 1.1.2.3 2008/08/18 19:47:16 jbj Exp $ */
   #ifndef _CHKNAME_H_
   #define _CHKNAME_H_
   
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/commonio.c
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 commonio.c
  --- lua/shadow/commonio.c	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/commonio.c	18 Aug 2008 19:47:16 -0000	1.1.2.3
  @@ -5,9 +5,10 @@
    */
   
   
  -#include "config.h"
  +#include "system.h"
  +#include "shadow_config.h"
   
  -#ident "$Id: commonio.c,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $"
  +#ident "$Id: commonio.c,v 1.1.2.3 2008/08/18 19:47:16 jbj Exp $"
   
   #include "defines.h"
   #include <sys/stat.h>
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/commonio.h
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 commonio.h
  --- lua/shadow/commonio.h	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/commonio.h	18 Aug 2008 19:47:16 -0000	1.1.2.3
  @@ -4,7 +4,7 @@
    * in WRLinux for inclusion in rpm.
    */
   
  -/* $Id: commonio.h,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $ */
  +/* $Id: commonio.h,v 1.1.2.3 2008/08/18 19:47:16 jbj Exp $ */
   
   #ifdef WITH_SELINUX
   #include <selinux/selinux.h>
  @@ .
  rm -f lua/shadow/config.h <<'@@ .'
  Index: lua/shadow/config.h
  ============================================================================
  [NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/copydir.c
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 copydir.c
  --- lua/shadow/copydir.c	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/copydir.c	18 Aug 2008 19:47:16 -0000	1.1.2.3
  @@ -33,9 +33,10 @@
    * SUCH DAMAGE.
    */
   
  -#include "config.h"
  +#include "system.h"
  +#include "shadow_config.h"
   
  -#ident "$Id: copydir.c,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $"
  +#ident "$Id: copydir.c,v 1.1.2.3 2008/08/18 19:47:16 jbj Exp $"
   
   #include <sys/stat.h>
   #include <sys/types.h>
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/defines.h
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 defines.h
  --- lua/shadow/defines.h	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/defines.h	18 Aug 2008 19:47:16 -0000	1.1.2.3
  @@ -4,7 +4,7 @@
    * in WRLinux for inclusion in rpm.
    */
   
  -/* $Id: defines.h,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $ */
  +/* $Id: defines.h,v 1.1.2.3 2008/08/18 19:47:16 jbj Exp $ */
   /* some useful defines */
   
   #ifndef _DEFINES_H_
  @@ -12,37 +12,16 @@
   
   #define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c))
   
  -/* Take care of NLS matters.  */
  -
  -#if HAVE_LOCALE_H
  -# include <locale.h>
  -#endif
  -
   #define gettext_noop(String) (String)
   /* #define gettext_def(String) "#define String" */
   
  -#if ENABLE_NLS
  -# include <libintl.h>
  -# define _(Text) gettext (Text)
  -#else
  -# undef bindtextdomain
  -# define bindtextdomain(Domain, Directory)	/* empty */
  -# undef textdomain
  -# define textdomain(Domain)	/* empty */
  -# define _(Text) Text
  -# define ngettext(Msgid1, Msgid2, N) \
  -    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
  -#endif
  -
   #if STDC_HEADERS
  -# include <stdlib.h>
  -# include <string.h>
   #else				/* not STDC_HEADERS */
   # ifndef HAVE_STRCHR
   #  define strchr index
   #  define strrchr rindex
  -# endif
   char *strchr (), *strrchr (), *strtok ();
  +# endif
   
   # ifndef HAVE_MEMCPY
   #  define memcpy(d, s, n) bcopy((s), (d), (n))
  @@ -53,11 +32,6 @@
   # include <errno.h>
   #endif
   
  -#include <sys/stat.h>
  -#include <sys/types.h>
  -#if HAVE_SYS_WAIT_H
  -# include <sys/wait.h>
  -#endif
   #ifndef WEXITSTATUS
   # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
   #endif
  @@ -65,21 +39,6 @@
   # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
   #endif
   
  -#if HAVE_UNISTD_H
  -# include <unistd.h>
  -#endif
  -
  -#if TIME_WITH_SYS_TIME
  -# include <sys/time.h>
  -# include <time.h>
  -#else				/* not TIME_WITH_SYS_TIME */
  -# if HAVE_SYS_TIME_H
  -#  include <sys/time.h>
  -# else
  -#  include <time.h>
  -# endif
  -#endif				/* not TIME_WITH_SYS_TIME */
  -
   #ifdef HAVE_MEMSET
   # define memzero(ptr, size) memset((void *)(ptr), 0, (size))
   #else
  @@ -88,18 +47,8 @@
   #define strzero(s) memzero(s, strlen(s))	/* warning: evaluates twice */
   
   #ifdef HAVE_DIRENT_H		/* DIR_SYSV */
  -# include <dirent.h>
   # define DIRECT dirent
   #else
  -# ifdef HAVE_SYS_NDIR_H		/* DIR_XENIX */
  -#  include <sys/ndir.h>
  -# endif
  -# ifdef HAVE_SYS_DIR_H		/* DIR_??? */
  -#  include <sys/dir.h>
  -# endif
  -# ifdef HAVE_NDIR_H		/* DIR_BSD */
  -#  include <ndir.h>
  -# endif
   # define DIRECT direct
   #endif
   
  @@ -121,8 +70,6 @@
   #endif
   #endif				/* not HAVE_SHADOW_H */
   
  -#include <limits.h>
  -
   #ifndef	NGROUPS_MAX
   #ifdef	NGROUPS
   #define	NGROUPS_MAX	NGROUPS
  @@ -195,19 +142,6 @@
   
   #define OPENLOG(progname) openlog(progname, SYSLOG_OPTIONS, SYSLOG_FACILITY)
   
  -#ifndef F_OK
  -# define F_OK 0
  -# define X_OK 1
  -# define W_OK 2
  -# define R_OK 4
  -#endif
  -
  -#ifndef SEEK_SET
  -# define SEEK_SET 0
  -# define SEEK_CUR 1
  -# define SEEK_END 2
  -#endif
  -
   #ifdef STAT_MACROS_BROKEN
   # define S_ISDIR(x) ((x) & S_IFMT) == S_IFDIR)
   # define S_ISREG(x) ((x) & S_IFMT) == S_IFREG)
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/faillog.h
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 faillog.h
  --- lua/shadow/faillog.h	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/faillog.h	18 Aug 2008 19:47:16 -0000	1.1.2.3
  @@ -36,7 +36,7 @@
   /*
    * faillog.h - login failure logging file format
    *
  - *	$Id: faillog.h,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $
  + *	$Id: faillog.h,v 1.1.2.3 2008/08/18 19:47:16 jbj Exp $
    *
    * The login failure file is maintained by login(1) and faillog(8)
    * Each record in the file represents a separate UID and the file
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/fputsx.c
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 fputsx.c
  --- lua/shadow/fputsx.c	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/fputsx.c	18 Aug 2008 19:47:16 -0000	1.1.2.3
  @@ -33,12 +33,14 @@
    * SUCH DAMAGE.
    */
   
  -#include "config.h"
  +#include "system.h"
  +#include "shadow_config.h"
  +#include "defines.h"
  +#include "prototypes.h"
   
   #include <stdio.h>
  -#include "defines.h"
   
  -#ident "$Id: fputsx.c,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $"
  +#ident "$Id: fputsx.c,v 1.1.2.3 2008/08/18 19:47:16 jbj Exp $"
   
   
   char *fgetsx (char *buf, int cnt, FILE * f)
  @@ .
  rm -f lua/shadow/getdate.c <<'@@ .'
  Index: lua/shadow/getdate.c
  ============================================================================
  [NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
  @@ .
  rm -f lua/shadow/getdate.h <<'@@ .'
  Index: lua/shadow/getdate.h
  ============================================================================
  [NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/getdef.c
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 getdef.c
  --- lua/shadow/getdef.c	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/getdef.c	18 Aug 2008 19:47:17 -0000	1.1.2.3
  @@ -33,9 +33,10 @@
    * SUCH DAMAGE.
    */
   
  -#include "config.h"
  +#include "system.h"
  +#include "shadow_config.h"
   
  -#ident "$Id: getdef.c,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $"
  +#ident "$Id: getdef.c,v 1.1.2.3 2008/08/18 19:47:17 jbj Exp $"
   
   #include "prototypes.h"
   #include "defines.h"
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/groupadd.c
  ============================================================================
  $ cvs diff -u -r1.1.2.3 -r1.1.2.4 groupadd.c
  --- lua/shadow/groupadd.c	17 Aug 2008 18:56:13 -0000	1.1.2.3
  +++ lua/shadow/groupadd.c	18 Aug 2008 19:47:17 -0000	1.1.2.4
  @@ -33,9 +33,10 @@
    * SUCH DAMAGE.
    */
   
  -#include "config.h"
  +#include "system.h"
  +#include "shadow_config.h"
   
  -#ident "$Id: groupadd.c,v 1.1.2.3 2008/08/17 18:56:13 jbj Exp $"
  +#ident "$Id: groupadd.c,v 1.1.2.4 2008/08/18 19:47:17 jbj Exp $"
   
   #include <ctype.h>
   #include <fcntl.h>
  @@ -469,7 +470,7 @@
   
          /* field all lower level errors and exit */
   
  -       if (retval=setjmp(lclack))  return retval;
  +       if ((retval=setjmp(lclack)) != 0)  return retval;
   
   	{
   		/*
  @@ -617,11 +618,11 @@
   	 */
   	open_files ();
   
  -        if (retval=setjmp(lclack))   /* move longjump() target */
  +        if ((retval=setjmp(lclack)) != 0)   /* move longjump() target */
            {
              int r;
   
  -           if (r=setjmp(lclack))  return r;  /* failed doing next line */
  +           if ((r=setjmp(lclack)) != 0)  return r;  /* failed doing next line */
              close_files();
              return retval;
            }
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/groupio.c
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 groupio.c
  --- lua/shadow/groupio.c	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/groupio.c	18 Aug 2008 19:47:17 -0000	1.1.2.3
  @@ -5,9 +5,10 @@
    */
   
   
  -#include "config.h"
  +#include "system.h"
  +#include "shadow_config.h"
   
  -#ident "$Id: groupio.c,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $"
  +#ident "$Id: groupio.c,v 1.1.2.3 2008/08/18 19:47:17 jbj Exp $"
   
   #include "prototypes.h"
   #include "defines.h"
  @@ -159,16 +160,19 @@
   	group_db.changed = 1;
   }
   
  +struct commonio_entry *__gr_get_head (void);	/* XXX gcc warning. */
   struct commonio_entry *__gr_get_head (void)
   {
   	return group_db.head;
   }
   
  +struct commonio_db *__gr_get_db (void);	/* XXX gcc warning. */
   struct commonio_db *__gr_get_db (void)
   {
   	return &group_db;
   }
   
  +void __gr_del_entry (const struct commonio_entry *ent);	/* XXX gcc warning. */
   void __gr_del_entry (const struct commonio_entry *ent)
   {
   	commonio_del_entry (&group_db, ent);
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/gshadow.c
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 gshadow.c
  --- lua/shadow/gshadow.c	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/gshadow.c	18 Aug 2008 19:47:17 -0000	1.1.2.3
  @@ -33,12 +33,13 @@
    * SUCH DAMAGE.
    */
   
  -#include "config.h"
  +#include "system.h"
  +#include "shadow_config.h"
   
   /* Newer versions of Linux libc already have shadow support.  */
   #if defined(SHADOWGRP) && !defined(HAVE_SHADOWGRP)	/*{ */
   
  -#ident "$Id: gshadow.c,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $"
  +#ident "$Id: gshadow.c,v 1.1.2.3 2008/08/18 19:47:17 jbj Exp $"
   
   #include <stdio.h>
   #include "prototypes.h"
  @@ -51,9 +52,6 @@
   static size_t nadmins = 0;
   static struct sgrp sgroup;
   
  -extern char *fgetsx ();
  -extern int fputsx ();
  -
   #define	FIELDS	4
   
   #ifdef	USE_NIS
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/gshadow_.h
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 gshadow_.h
  --- lua/shadow/gshadow_.h	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/gshadow_.h	18 Aug 2008 19:47:17 -0000	1.1.2.3
  @@ -32,7 +32,7 @@
    * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    * SUCH DAMAGE.
    *
  - *	$Id: gshadow_.h,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $
  + *	$Id: gshadow_.h,v 1.1.2.3 2008/08/18 19:47:17 jbj Exp $
    */
   
   #ifndef	_H_GSHADOW
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/list.c
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 list.c
  --- lua/shadow/list.c	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/list.c	18 Aug 2008 19:47:17 -0000	1.1.2.3
  @@ -36,9 +36,10 @@
   /* Removed duplicated code from gpmain.c, useradd.c, userdel.c and
      usermod.c.  --marekm */
   
  -#include "config.h"
  +#include "system.h"
  +#include "shadow_config.h"
   
  -#ident "$Id: list.c,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $"
  +#ident "$Id: list.c,v 1.1.2.3 2008/08/18 19:47:17 jbj Exp $"
   
   #include "prototypes.h"
   #include "defines.h"
  @@ -142,8 +143,10 @@
   	tmp = (char **) xmalloc ((i + 1) * sizeof (char *));
   
   	i = 0;
  -	while (*list)
  -		tmp[i++] = xstrdup (*list++);
  +	while (*list) {
  +		tmp[i++] = xstrdup (*list);
  +		list++;
  +	}
   
   	tmp[i] = (char *) 0;
   	return tmp;
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/prototypes.h
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 prototypes.h
  --- lua/shadow/prototypes.h	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/prototypes.h	18 Aug 2008 19:47:17 -0000	1.1.2.3
  @@ -12,7 +12,7 @@
    * Juha Virtanen, <jiivee@hut.fi>; November 1995
    */
   /*
  - * $Id: prototypes.h,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $
  + * $Id: prototypes.h,v 1.1.2.3 2008/08/18 19:47:17 jbj Exp $
    *
    * Added a macro to work around ancient (non-ANSI) compilers, just in case
    * someone ever tries to compile this with SunOS cc...  --marekm
  @@ -150,6 +150,12 @@
   /* setupenv.c */
   extern void setup_env (struct passwd *);
   
  +/* sgetgrent.c */
  +extern struct group *sgetgrent (const char *buf);
  +
  +/* sgetpwent.c */
  +extern struct passwd *sgetpwent (const char *buf);
  +
   /* shell.c */
   extern int shell (const char *, const char *, char *const *);
   
  @@ -181,8 +187,4 @@
   /* valid.c */
   extern int valid (const char *, const struct passwd *);
   
  -/* xmalloc.c */
  -extern char *xmalloc (size_t);
  -extern char *xstrdup (const char *);
  -
   #endif				/* _PROTOTYPES_H */
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/pwauth.h
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 pwauth.h
  --- lua/shadow/pwauth.h	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/pwauth.h	18 Aug 2008 19:47:17 -0000	1.1.2.3
  @@ -32,7 +32,7 @@
    * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    * SUCH DAMAGE.
    *
  - *	$Id: pwauth.h,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $
  + *	$Id: pwauth.h,v 1.1.2.3 2008/08/18 19:47:17 jbj Exp $
    */
   
   #ifndef USE_PAM
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/pwio.c
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 pwio.c
  --- lua/shadow/pwio.c	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/pwio.c	18 Aug 2008 19:47:17 -0000	1.1.2.3
  @@ -5,9 +5,10 @@
    */
   
   
  -#include "config.h"
  +#include "system.h"
  +#include "shadow_config.h"
   
  -#ident "$Id: pwio.c,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $"
  +#ident "$Id: pwio.c,v 1.1.2.3 2008/08/18 19:47:17 jbj Exp $"
   
   #include "prototypes.h"
   #include "defines.h"
  @@ -149,16 +150,19 @@
   	return commonio_unlock (&passwd_db);
   }
   
  +struct commonio_entry *__pw_get_head (void);	/* XXX gcc warning */
   struct commonio_entry *__pw_get_head (void)
   {
   	return passwd_db.head;
   }
   
  +void __pw_del_entry (const struct commonio_entry *ent);	/* XXX gcc warning */
   void __pw_del_entry (const struct commonio_entry *ent)
   {
   	commonio_del_entry (&passwd_db, ent);
   }
   
  +struct commonio_db *__pw_get_db (void);	/* XXX gcc warning */
   struct commonio_db *__pw_get_db (void)
   {
   	return &passwd_db;
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/sgetgrent.c
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 sgetgrent.c
  --- lua/shadow/sgetgrent.c	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/sgetgrent.c	18 Aug 2008 19:47:17 -0000	1.1.2.3
  @@ -33,13 +33,16 @@
    * SUCH DAMAGE.
    */
   
  -#include "config.h"
  +#include "system.h"
  +#include "shadow_config.h"
  +#include "defines.h"
  +#include "prototypes.h"
   
  -#ident "$Id: sgetgrent.c,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $"
  +#ident "$Id: sgetgrent.c,v 1.1.2.3 2008/08/18 19:47:17 jbj Exp $"
   
   #include <stdio.h>
   #include <grp.h>
  -#include "defines.h"
  +
   #define	NFIELDS	4
   /*
    * list - turn a comma-separated string into an array of (char *)'s
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/sgetpwent.c
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 sgetpwent.c
  --- lua/shadow/sgetpwent.c	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/sgetpwent.c	18 Aug 2008 19:47:17 -0000	1.1.2.3
  @@ -33,12 +33,14 @@
    * SUCH DAMAGE.
    */
   
  -#include "config.h"
  +#include "system.h"
  +#include "shadow_config.h"
  +#include "defines.h"
  +#include "prototypes.h"
   
  -#ident "$Id: sgetpwent.c,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $"
  +#ident "$Id: sgetpwent.c,v 1.1.2.3 2008/08/18 19:47:17 jbj Exp $"
   
   #include <sys/types.h>
  -#include "defines.h"
   #include <stdio.h>
   #include <pwd.h>
   #define	NFIELDS	7
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/sgroupio.c
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 sgroupio.c
  --- lua/shadow/sgroupio.c	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/sgroupio.c	18 Aug 2008 19:47:17 -0000	1.1.2.3
  @@ -5,11 +5,12 @@
    */
   
   
  -#include "config.h"
  +#include "system.h"
  +#include "shadow_config.h"
   
   #ifdef SHADOWGRP
   
  -#ident "$Id: sgroupio.c,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $"
  +#ident "$Id: sgroupio.c,v 1.1.2.3 2008/08/18 19:47:17 jbj Exp $"
   
   #include "prototypes.h"
   #include "defines.h"
  @@ -182,11 +183,13 @@
   	gshadow_db.changed = 1;
   }
   
  +struct commonio_entry *__sgr_get_head (void);	/* XXX gcc warning */
   struct commonio_entry *__sgr_get_head (void)
   {
   	return gshadow_db.head;
   }
   
  +void __sgr_del_entry (const struct commonio_entry *ent); /* XXX gcc warning */
   void __sgr_del_entry (const struct commonio_entry *ent)
   {
   	commonio_del_entry (&gshadow_db, ent);
  @@ -195,7 +198,7 @@
   /* Sort with respect to group ordering. */
   int sgr_sort ()
   {
  -	extern struct commonio_db *__gr_get_db ();
  +	extern struct commonio_db *__gr_get_db (void);
   
   	return commonio_sort_wrt (&gshadow_db, __gr_get_db ());
   }
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/shadow_config.h
  ============================================================================
  $ cvs diff -u -r0 -r1.2.2.2 shadow_config.h
  --- /dev/null	2008-08-18 21:45:26 +0200
  +++ shadow_config.h	2008-08-18 21:47:17 +0200
  @@ -0,0 +1,260 @@
  +/*
  + * This file was originally distributed as part of
  + * shadow-utils-4.0.17-12.fc6.src.rpm and has been modified
  + * in WRLinux for inclusion in rpm.
  + */
  +
  +/* config.h.  Generated by configure.  */
  +/* config.h.in.  Generated from configure.in by autoheader.  */
  +
  +/* Path for faillog file. */
  +#define FAILLOG_FILE "/var/log/faillog"
  +
  +/* Define to the type of elements in the array set by `getgroups'. Usually
  +   this is either `int' or `gid_t'. */
  +#define GETGROUPS_T gid_t
  +
  +/* Define to 1 if you have the `a64l' function. */
  +#define HAVE_A64L 1
  +
  +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
  +   CoreFoundation framework. */
  +/* #undef HAVE_CFLOCALECOPYCURRENT */
  +
  +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
  +   the CoreFoundation framework. */
  +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
  +
  +/* Define to 1 if you have the <errno.h> header file. */
  +#define HAVE_ERRNO_H 1
  +
  +/* Define to 1 if you have the `fchmod' function. */
  +#define HAVE_FCHMOD 1
  +
  +/* Define to 1 if you have the `fchown' function. */
  +#define HAVE_FCHOWN 1
  +
  +/* Define to 1 if you have the `fsync' function. */
  +#define HAVE_FSYNC 1
  +
  +/* Define to 1 if you have the `getgroups' function. */
  +#define HAVE_GETGROUPS 1
  +
  +/* Define to 1 if you have the `gethostname' function. */
  +#define HAVE_GETHOSTNAME 1
  +
  +/* Define to 1 if you have the `getspnam' function. */
  +#define HAVE_GETSPNAM 1
  +
  +/* Define to 1 if you have the `gettimeofday' function. */
  +#define HAVE_GETTIMEOFDAY 1
  +
  +/* Define to 1 if you have the `getusershell' function. */
  +#define HAVE_GETUSERSHELL 1
  +
  +/* Define to 1 if you have the `getutent' function. */
  +#define HAVE_GETUTENT 1
  +
  +/* Define to 1 if you have the <gshadow.h> header file. */
  +/* #undef HAVE_GSHADOW_H */
  +
  +/* Define to 1 if you have the `initgroups' function. */
  +#define HAVE_INITGROUPS 1
  +
  +/* Define to 1 if you have the <lastlog.h> header file. */
  +#define HAVE_LASTLOG_H 1
  +
  +/* Define to 1 if you have the `lckpwdf' function. */
  +#define HAVE_LCKPWDF 1
  +
  +/* Defined if you have libcrack. */
  +/* #undef HAVE_LIBCRACK */
  +
  +/* Defined if you have the ts&szs cracklib. */
  +/* #undef HAVE_LIBCRACK_HIST */
  +
  +/* Defined if it includes *Pw functions. */
  +/* #undef HAVE_LIBCRACK_PW */
  +
  +/* Define if struct lastlog has ll_host */
  +#define HAVE_LL_HOST 1
  +
  +/* Define to 1 if you have the `lstat' function. */
  +#define HAVE_LSTAT 1
  +
  +/* Define to 1 if you have the `memcpy' function. */
  +#define HAVE_MEMCPY 1
  +
  +/* Define to 1 if you have the `memset' function. */
  +#define HAVE_MEMSET 1
  +
  +/* Define to 1 if you have the `mkdir' function. */
  +#define HAVE_MKDIR 1
  +
  +/* Define to 1 if you have the <paths.h> header file. */
  +#define HAVE_PATHS_H 1
  +
  +/* Define to 1 if you have the `putgrent' function. */
  +#define HAVE_PUTGRENT 1
  +
  +/* Define to 1 if you have the `putpwent' function. */
  +#define HAVE_PUTPWENT 1
  +
  +/* Define to 1 if you have the `putspent' function. */
  +#define HAVE_PUTSPENT 1
  +
  +/* Define to 1 if you have the `rename' function. */
  +#define HAVE_RENAME 1
  +
  +/* Define to 1 if you have the `rmdir' function. */
  +#define HAVE_RMDIR 1
  +
  +/* Define to 1 if you have the <rpc/key_prot.h> header file. */
  +#define HAVE_RPC_KEY_PROT_H 1
  +
  +/* Define to 1 if you have the <selinux/selinux.h> header file. */
  +/* #undef HAVE_SELINUX_SELINUX_H */
  +
  +/* Define to 1 if you have the `setgroups' function. */
  +#define HAVE_SETGROUPS 1
  +
  +/* Define to 1 if you have the `sgetgrent' function. */
  +/* #undef HAVE_SGETGRENT */
  +
  +/* Define to 1 if you have the `sgetpwent' function. */
  +/* #undef HAVE_SGETPWENT */
  +
  +/* Define to 1 if you have the `sgetspent' function. */
  +#define HAVE_SGETSPENT 1
  +
  +/* Define to 1 if you have the <sgtty.h> header file. */
  +#define HAVE_SGTTY_H 1
  +
  +/* Have working shadow group support in libc */
  +/* #undef HAVE_SHADOWGRP */
  +
  +/* Define to 1 if you have the <shadow.h> header file. */
  +#define HAVE_SHADOW_H 1
  +
  +/* Define to 1 if you have the `sigaction' function. */
  +#define HAVE_SIGACTION 1
  +
  +/* Define to 1 if you have the `strcasecmp' function. */
  +#define HAVE_STRCASECMP 1
  +
  +/* Define to 1 if you have the `strchr' function. */
  +#define HAVE_STRCHR 1
  +
  +/* Define to 1 if you have the `strftime' function. */
  +#define HAVE_STRFTIME 1
  +
  +/* Define to 1 if `st_rdev' is member of `struct stat'. */
  +#define HAVE_STRUCT_STAT_ST_RDEV 1
  +
  +/* Define to 1 if you have the <syslog.h> header file. */
  +#define HAVE_SYSLOG_H 1
  +
  +/* Define to 1 if you have the <sys/ioctl.h> header file. */
  +#define HAVE_SYS_IOCTL_H 1
  +
  +/* Define to 1 if you have the <sys/time.h> header file. */
  +#define HAVE_SYS_TIME_H 1
  +
  +/* Define to 1 if you have the <termios.h> header file. */
  +#define HAVE_TERMIOS_H 1
  +
  +/* Define to 1 if you have the <termio.h> header file. */
  +#define HAVE_TERMIO_H 1
  +
  +/* Define to 1 if you have the <ulimit.h> header file. */
  +#define HAVE_ULIMIT_H 1
  +
  +/* Define to 1 if you have the `updwtmp' function. */
  +#define HAVE_UPDWTMP 1
  +
  +/* Define to 1 if you have the `updwtmpx' function. */
  +#define HAVE_UPDWTMPX 1
  +
  +/* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */
  +#define HAVE_UTIME_NULL 1
  +
  +/* Define to 1 if you have the <utmpx.h> header file. */
  +#define HAVE_UTMPX_H 1
  +
  +/* Define to 1 if you have the <utmp.h> header file. */
  +#define HAVE_UTMP_H 1
  +
  +/* Path for lastlog file. */
  +#define LASTLOG_FILE "/var/log/lastlog"
  +
  +/* Location of system mail spool directory. */
  +#define MAIL_SPOOL_DIR "/var/mail"
  +
  +/* Name of user's mail spool file if stored in user's home directory. */
  +/* #undef MAIL_SPOOL_FILE */
  +
  +/* Path to passwd program. */
  +#define PASSWD_PROGRAM "/usr/bin/passwd"
  +
  +/* Define as the return type of signal handlers (`int' or `void'). */
  +#define RETSIGTYPE void
  +
  +/* Define if login should support the -r flag for rlogind. */
  +#define RLOGIN 1
  +
  +/* Define to the ruserok() "success" return value (0 or 1). */
  +#define RUSEROK 0
  +
  +/* Define to 1 if the `setpgrp' function takes no argument. */
  +#define SETPGRP_VOID 1
  +
  +/* Define to support the shadow group file. */
  +#define SHADOWGRP 1
  +
  +/* Define to support S/Key logins. */
  +/* #undef SKEY */
  +
  +/* Define to support newer BSD S/Key API */
  +/* #undef SKEY_BSD_STYLE */
  +
  +/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
  +/* #undef STAT_MACROS_BROKEN */
  +
  +/* Define to support /etc/suauth su access control. */
  +#define SU_ACCESS 1
  +
  +/* Define to 1 if your <sys/time.h> declares `struct tm'. */
  +/* #undef TM_IN_SYS_TIME */
  +
  +/* Define to support Pluggable Authentication Modules */
  +/* #undef USE_PAM */
  +
  +/* Define to use syslog(). */
  +#define USE_SYSLOG 1
  +
  +/* Define if you have ut_host in struct utmp. */
  +#define UT_HOST 1
  +
  +/* Define if you want to enable Audit messages */
  +/* #undef WITH_AUDIT */
  +
  +/* Path for utmp file. */
  +#define _UTMP_FILE "/var/run/utmp"
  +
  +/* Path for wtmp file. */
  +#define _WTMP_FILE "/var/log/wtmp"
  +
  +/* Define to empty if `const' does not conform to ANSI C. */
  +/* #undef const */
  +
  +/* Define to libshadow_getpass to use our own version of getpass(). */
  +/* #undef getpass */
  +
  +/* Define to `int' if <sys/types.h> doesn't define. */
  +/* #undef gid_t */
  +
  +/* Define to `int' if <sys/types.h> doesn't define. */
  +/* #undef uid_t */
  +
  +/* Define to ut_name if struct utmp has ut_name (not ut_user). */
  +/* #undef ut_user */
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/shadowio.c
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 shadowio.c
  --- lua/shadow/shadowio.c	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/shadowio.c	18 Aug 2008 19:47:17 -0000	1.1.2.3
  @@ -5,9 +5,10 @@
    */
   
   
  -#include "config.h"
  +#include "system.h"
  +#include "shadow_config.h"
   
  -#ident "$Id: shadowio.c,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $"
  +#ident "$Id: shadowio.c,v 1.1.2.3 2008/08/18 19:47:17 jbj Exp $"
   
   #include "prototypes.h"
   #include "defines.h"
  @@ -144,11 +145,13 @@
   	return commonio_unlock (&shadow_db);
   }
   
  +struct commonio_entry *__spw_get_head (void);	/* XXX gcc warning */
   struct commonio_entry *__spw_get_head (void)
   {
   	return shadow_db.head;
   }
   
  +void __spw_del_entry (const struct commonio_entry *ent); /* XXX gcc warning */
   void __spw_del_entry (const struct commonio_entry *ent)
   {
   	commonio_del_entry (&shadow_db, ent);
  @@ -157,7 +160,7 @@
   /* Sort with respect to passwd ordering. */
   int spw_sort ()
   {
  -	extern struct commonio_db *__pw_get_db ();
  +	extern struct commonio_db *__pw_get_db (void);
   
   	return commonio_sort_wrt (&shadow_db, __pw_get_db ());
   }
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/strtoday.c
  ============================================================================
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 strtoday.c
  --- lua/shadow/strtoday.c	17 Aug 2008 18:49:38 -0000	1.1.2.2
  +++ lua/shadow/strtoday.c	18 Aug 2008 19:47:17 -0000	1.1.2.3
  @@ -37,16 +37,19 @@
   #define _XOPEN_SOURCE 500
   #endif
   
  -#include "config.h"
  +#include "system.h"
  +#include "shadow_config.h"
  +#include "defines.h"
  +#include "prototypes.h"
   
  -#ident "$Id: strtoday.c,v 1.1.2.2 2008/08/17 18:49:38 jbj Exp $"
  +#ident "$Id: strtoday.c,v 1.1.2.3 2008/08/18 19:47:17 jbj Exp $"
   
  -#include "defines.h"
   #ifndef USE_GETDATE
   #define USE_GETDATE 1
   #endif
   #if USE_GETDATE
  -#include "getdate.h"
  +extern time_t get_date (const char *, const time_t *);
  +
   /*
    * strtoday() now uses get_date() (borrowed from GNU shellutils)
    * which can handle many date formats, for example:
  @@ .
  patch -p0 <<'@@ .'
  Index: lua/shadow/useradd.c
  ============================================================================
  $ cvs diff -u -r1.1.2.3 -r1.1.2.4 useradd.c
  --- lua/shadow/useradd.c	17 Aug 2008 18:56:13 -0000	1.1.2.3
  +++ lua/shadow/useradd.c	18 Aug 2008 19:47:17 -0000	1.1.2.4
  @@ -33,9 +33,10 @@
    * SUCH DAMAGE.
    */
   
  -#include "config.h"
  +#include "system.h"
  +#include "shadow_config.h"
   
  -#ident "$Id: useradd.c,v 1.1.2.3 2008/08/17 18:56:13 jbj Exp $"
  +#ident "$Id: useradd.c,v 1.1.2.4 2008/08/18 19:47:17 jbj Exp $"
   
   #include <ctype.h>
   #include <errno.h>
  @@ -174,7 +175,7 @@
   
   /* local function prototypes */
   static void fail_exit (int);
  -static struct group *getgr_nam_gid (const char *);
  +static const struct group *getgr_nam_gid (const char *);
   static long get_number (const char *);
   static uid_t get_uid (const char *);
   static void get_defaults (void);
  @@ -215,7 +216,7 @@
           longjmp(lclack,code);    /* must be non-zero! */
   }
   
  -static struct group *lcl_getgrnam (const char *grname)
  +static const struct group *lcl_getgrnam (const char *grname)
      {
      const struct group *grp;
   
  @@ -240,7 +241,7 @@
      return NULL;
      }
   
  -static struct group *lcl_getgrgid (long gid)
  +static const struct group *lcl_getgrgid (long gid)
      {
      const struct group *grp;
   
  @@ -254,7 +255,7 @@
   	while ((grp = getgrent ()))
   #endif
   	{
  -		if (grp->gr_gid == gid) {
  +		if (grp->gr_gid == (gid_t)gid) {
   			close_files();
   			return grp;
   		}
  @@ -264,12 +265,12 @@
      return NULL;
      }
   
  -static struct group *getgr_nam_gid (const char *grname)
  +static const struct group *getgr_nam_gid (const char *grname)
   {
   	long gid;
   	char *errptr;
   
  -	struct group* grp = lcl_getgrnam(grname);
  +	const struct group* grp = lcl_getgrnam(grname);
   	if (grp)
   		return grp;
   
  @@ -1008,7 +1009,7 @@
     *     uniqueness.
     */
   
  -static void find_new_gid ()
  +static void find_new_gid (void)
   {
   	const struct group *grp;
   	gid_t gid_min, gid_max;
  @@ -1714,7 +1715,7 @@
   {
   	char *spool, *file;
   	int fd;
  -	struct group *gr;
  +	const struct group *gr;
   	gid_t gid;
   	mode_t mode;
   
  @@ -1943,11 +1944,11 @@
   	 */
   	open_files ();
   
  -        if (retval=setjmp(lclack))   /* move longjump() target */
  +        if ((retval=setjmp(lclack)) != 0)   /* move longjump() target */
            {
              int r;
   
  -           if (r=setjmp(lclack))  return r;  /* failed doing next line */
  +           if ((r=setjmp(lclack)) != 0)  return r;  /* failed doing next line */
              close_files();
              return retval;
            }
  @@ .
  rm -f lua/shadow/xmalloc.c <<'@@ .'
  Index: lua/shadow/xmalloc.c
  ============================================================================
  [NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.2288.2.86 -r1.2288.2.87 CHANGES
  --- rpm/CHANGES	17 Aug 2008 19:02:59 -0000	1.2288.2.86
  +++ rpm/CHANGES	18 Aug 2008 19:47:15 -0000	1.2288.2.87
  @@ -1,4 +1,11 @@
   5.1.4 -> 5.1.5:
  +    - jbj: WR: eliminate most compiler warnings.
  +    - jbj: WR: eliminate duplicated AutoFu boilerplate, use system.h instead.
  +    - jbj: WR: eliminate getdate.[ch], use same from rpmio instead.
  +    - jbj: WR: eliminate dueling AutoFu defines from shadow_config.h, use RPM's
  +        config.h (through system.h) instead.
  +    - jbj: WR: eliminate xmalloc.c, use system.h defines instead.
  +    - jbj: WR: rename config.h to shadow_config.h, include "system.h" instead.
       - jbj: WR: rely on PATH to find pkg-config.
       - jbj: WR: don't spew error messages with internal lua shadow module.
       - jbj: WR: add shadow/chkconfig internal lua modules.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  ============================================================================
  $ cvs diff -u -r2.289.2.7 -r2.289.2.8 configure.ac
  --- rpm/configure.ac	16 Aug 2008 17:17:16 -0000	2.289.2.7
  +++ rpm/configure.ac	18 Aug 2008 19:47:15 -0000	2.289.2.8
  @@ -1073,6 +1073,8 @@
   dnl # Lua
   WITH_LUA_SUBDIR_DEF=""
   WITH_LUA_SUBDIR_LIB=""
  +USE_LUA_SHADOW=no
  +USE_LUA_CHKCONFIG=no
   RPM_CHECK_LIB(
       [Lua], [lua],
       [lua], [lua_newstate], [lua.h],
  @@ -1082,6 +1084,9 @@
             AC_CHECK_LIB(dl, dlopen)
             AC_CHECK_FUNC(dlopen, [ WITH_LUA_SUBDIR_DEF="$WITH_LUA_SUBDIR_DEF -DLUA_USE_DLOPEN" ])
             AC_CHECK_FUNC(regcomp, [ WITH_LUA_SUBDIR_DEF="$WITH_LUA_SUBDIR_DEF -DLUA_USE_POSIX" ])
  +	  case "$host" in
  +	    *-*-linux* ) USE_LUA_SHADOW=yes; USE_LUA_CHKCONFIG=yes; ;;
  +	  esac
             AC_DEFINE(WITH_LUA_INTERNAL, 1, [Define if building with internal Lua])
             AC_CONFIG_FILES([lua/Makefile])
         else
  @@ -1092,6 +1097,8 @@
       ], [])
   AC_SUBST(WITH_LUA_SUBDIR_DEF)
   AC_SUBST(WITH_LUA_SUBDIR_LIB)
  +AM_CONDITIONAL(USE_LUA_SHADOW, [ test ".$USE_LUA_SHADOW" = .yes ])
  +AM_CONDITIONAL(USE_LUA_CHKCONFIG, [ test ".$USE_LUA_CHKCONFIG" = .yes ])
   
   dnl # PCRE
   RPM_CHECK_LIB(
  @@ .
Received on Mon Aug 18 21:47:18 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.