Include headers from this source directory to avoid pulling in
possibly-different versions on the build system, and let glibc's
features.h sort out the system-specific extension stuff.

diff -uNr Linux-PAM-0.75/examples/blank.c Linux-PAM-0.75.headers/examples/blank.c
--- Linux-PAM-0.75/examples/blank.c	Mon Dec  4 14:02:33 2000
+++ Linux-PAM-0.75.headers/examples/blank.c	Mon Oct  1 16:11:07 2001
@@ -16,8 +16,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <security/pam_appl.h>
-#include <security/pam_misc.h>
+#include "../libpam/include/security/pam_appl.h"
+#include "../libpam_misc/include/security/pam_misc.h"
 
 /* ------ some local (static) functions ------- */
 
diff -uNr Linux-PAM-0.75/examples/check_user.c Linux-PAM-0.75.headers/examples/check_user.c
--- Linux-PAM-0.75/examples/check_user.c	Mon Dec  4 14:02:33 2000
+++ Linux-PAM-0.75.headers/examples/check_user.c	Mon Oct  1 16:11:07 2001
@@ -10,8 +10,8 @@
   check   account    required     pam_unix_acct.so
 */
 
-#include <security/pam_appl.h>
-#include <security/pam_misc.h>
+#include "../libpam/include/security/pam_appl.h"
+#include "../libpam_misc/include/security/pam_misc.h"
 #include <stdio.h>
 
 static struct pam_conv conv = {
diff -uNr Linux-PAM-0.75/examples/test.c Linux-PAM-0.75.headers/examples/test.c
--- Linux-PAM-0.75/examples/test.c	Mon Dec  4 14:02:33 2000
+++ Linux-PAM-0.75.headers/examples/test.c	Mon Oct  1 16:11:07 2001
@@ -8,13 +8,13 @@
 #include <stdio.h>
 #include <pwd.h>
 
-#include <security/pam_appl.h>
+#include "../libpam/include/security/pam_appl.h"
 
 /* this program is not written to the PAM spec: it tests the
  * pam_[sg]et_data() functions. Which is usually reserved for modules */
 
-#include <security/pam_modules.h>
-#include <security/pam_misc.h>
+#include "../libpam/include/security/pam_modules.h"
+#include "../libpam_misc/include/security/pam_misc.h"
 
 #define USERNAMESIZE	1024
 
diff -uNr Linux-PAM-0.75/examples/vpass.c Linux-PAM-0.75.headers/examples/vpass.c
--- Linux-PAM-0.75/examples/vpass.c	Tue Jun 20 18:11:13 2000
+++ Linux-PAM-0.75.headers/examples/vpass.c	Mon Oct  1 16:11:07 2001
@@ -3,7 +3,7 @@
 #include <unistd.h>
 #include <pwd.h>
 #include <sys/types.h>
-#include <security/pam_appl.h>
+#include "../libpam/include/security/pam_appl.h"
 
 static int test_conv(int num_msg, const struct pam_message **msgm,
 		     struct pam_response **response, void *appdata_ptr)
diff -uNr Linux-PAM-0.75/examples/xsh.c Linux-PAM-0.75.headers/examples/xsh.c
--- Linux-PAM-0.75/examples/xsh.c	Mon Feb  5 01:50:41 2001
+++ Linux-PAM-0.75.headers/examples/xsh.c	Mon Oct  1 16:11:07 2001
@@ -8,8 +8,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <security/pam_appl.h>
-#include <security/pam_misc.h>
+#include "../libpam/include/security/pam_appl.h"
+#include "../libpam_misc/include/security/pam_misc.h"
 
 /* ------ some local (static) functions ------- */
 
diff -uNr Linux-PAM-0.75/libpam/include/security/_pam_macros.h Linux-PAM-0.75.headers/libpam/include/security/_pam_macros.h
--- Linux-PAM-0.75/libpam/include/security/_pam_macros.h	Mon Dec  4 13:31:56 2000
+++ Linux-PAM-0.75.headers/libpam/include/security/_pam_macros.h	Mon Oct  1 16:11:07 2001
@@ -1,6 +1,9 @@
 #ifndef PAM_MACROS_H
 #define PAM_MACROS_H
 
+#include <string.h>	/* string functions */
+#include <stdlib.h>
+
 /*
  * All kind of macros used by PAM, but usable in some other
  * programs too.
@@ -8,10 +11,6 @@
  */
 
 /* a 'safe' version of strdup */
-
-#include <string.h>
-#include <stdlib.h>
-
 #define  x_strdup(s)  ( (s) ? strdup(s):NULL )
 
 /* Good policy to strike out passwords with some characters not just
diff -uNr Linux-PAM-0.75/libpam/include/security/_pam_types.h Linux-PAM-0.75.headers/libpam/include/security/_pam_types.h
--- Linux-PAM-0.75/libpam/include/security/_pam_types.h	Mon Jan 22 01:07:29 2001
+++ Linux-PAM-0.75.headers/libpam/include/security/_pam_types.h	Mon Oct  1 16:11:07 2001
@@ -202,7 +202,7 @@
  * allocated and indicates leakage etc... It should not be included in
  * production application/modules.
  */
-#include <security/pam_malloc.h>
+#include "pam_malloc.h"
 #endif
 
 /* ------------ The Linux-PAM conversation structures ------------ */
@@ -279,8 +279,8 @@
  * less strictly separated notion of module specific and application
  * specific definitions.
  */
-#include <security/pam_appl.h>
-#include <security/pam_modules.h>
+#include "pam_appl.h"
+#include "pam_modules.h"
 #endif
 
 
diff -uNr Linux-PAM-0.75/libpam/include/security/pam_appl.h Linux-PAM-0.75.headers/libpam/include/security/pam_appl.h
--- Linux-PAM-0.75/libpam/include/security/pam_appl.h	Sun Nov 19 18:54:02 2000
+++ Linux-PAM-0.75.headers/libpam/include/security/pam_appl.h	Mon Oct  1 16:11:07 2001
@@ -20,7 +20,7 @@
 extern "C" {
 #endif
  
-#include <security/_pam_types.h>      /* Linux-PAM common defined types */
+#include "_pam_types.h"      /* Linux-PAM common defined types */
 
 /* -------------- The Linux-PAM Framework layer API ------------- */
 
@@ -52,7 +52,7 @@
 #endif
 
 /* take care of any compatibility issues */
-#include <security/_pam_compat.h>
+#include "_pam_compat.h"
 
 /*
  * Copyright Theodore Ts'o, 1996.  All rights reserved.
diff -uNr Linux-PAM-0.75/libpam/include/security/pam_modules.h Linux-PAM-0.75.headers/libpam/include/security/pam_modules.h
--- Linux-PAM-0.75/libpam/include/security/pam_modules.h	Mon Feb  5 01:50:41 2001
+++ Linux-PAM-0.75.headers/libpam/include/security/pam_modules.h	Mon Oct  1 16:11:07 2001
@@ -8,7 +8,7 @@
 #ifndef _SECURITY_PAM_MODULES_H
 #define _SECURITY_PAM_MODULES_H
 
-#include <security/_pam_types.h>      /* Linux-PAM common defined types */
+#include "_pam_types.h"      /* Linux-PAM common defined types */
 
 /* these defines are used by pam_set_item() and pam_get_item() and are
  * in addition to those found in <security/_pam_types.h> */
@@ -128,7 +128,7 @@
 #define PAM_DATA_REPLACE   0x20000000     /* used when replacing a data item */
 
 /* take care of any compatibility issues */
-#include <security/_pam_compat.h>
+#include "_pam_compat.h"
 
 /* Copyright (C) Theodore Ts'o, 1996.
  * Copyright (C) Andrew Morgan, 1996-8.
diff -uNr Linux-PAM-0.75/libpam/pam_delay.c Linux-PAM-0.75.headers/libpam/pam_delay.c
--- Linux-PAM-0.75/libpam/pam_delay.c	Mon Jan 22 01:07:28 2001
+++ Linux-PAM-0.75.headers/libpam/pam_delay.c	Mon Oct  1 16:11:07 2001
@@ -14,6 +14,7 @@
  */
 
 #include <unistd.h>
+#include <time.h>
 #include "pam_private.h"
 
 /* **********************************************************************
diff -uNr Linux-PAM-0.75/libpam/pam_malloc.c Linux-PAM-0.75.headers/libpam/pam_malloc.c
--- Linux-PAM-0.75/libpam/pam_malloc.c	Mon Dec  4 14:02:34 2000
+++ Linux-PAM-0.75.headers/libpam/pam_malloc.c	Mon Oct  1 16:11:07 2001
@@ -26,8 +26,8 @@
 
 #include "pam_private.h"
 
-#include <security/pam_malloc.h>
-#include <security/_pam_macros.h>
+#include "include/security/pam_malloc.h"
+#include "include/security/_pam_macros.h"
 
 /* this must be done to stop infinite recursion! */
 #undef malloc
diff -uNr Linux-PAM-0.75/libpam/pam_private.h Linux-PAM-0.75.headers/libpam/pam_private.h
--- Linux-PAM-0.75/libpam/pam_private.h	Mon Feb  5 01:50:41 2001
+++ Linux-PAM-0.75.headers/libpam/pam_private.h	Mon Oct  1 16:11:07 2001
@@ -16,13 +16,14 @@
 #ifndef _PAM_PRIVATE_H
 #define _PAM_PRIVATE_H
 
-#include <security/_pam_aconf.h>
+#include "../_pam_aconf.h"
 
 /* this is not used at the moment --- AGM */
 #define LIBPAM_VERSION (LIBPAM_VERSION_MAJOR*0x100 + LIBPAM_VERSION_MINOR)
 
-#include <security/pam_appl.h>
-#include <security/pam_modules.h>
+#include "include/security/_pam_types.h"
+#include "include/security/pam_appl.h"
+#include "include/security/pam_modules.h"
 
 /* the Linux-PAM configuration file */
 
@@ -270,7 +271,7 @@
  * include some helpful macros
  */
 
-#include <security/_pam_macros.h>
+#include "include/security/_pam_macros.h"
 
 /* used to work out where control currently resides (in an application
    or in a module) */
diff -uNr Linux-PAM-0.75/libpam_misc/help_env.c Linux-PAM-0.75.headers/libpam_misc/help_env.c
--- Linux-PAM-0.75/libpam_misc/help_env.c	Mon Dec  4 14:02:34 2000
+++ Linux-PAM-0.75.headers/libpam_misc/help_env.c	Mon Oct  1 16:24:01 2001
@@ -5,10 +5,11 @@
  *
  */
 
+#include "../_pam_aconf.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <security/pam_misc.h>
+#include "include/security/pam_misc.h"
 
 /*
  * This is a useful function for dumping the Linux-PAM environment
diff -uNr Linux-PAM-0.75/libpam_misc/misc_conv.c Linux-PAM-0.75.headers/libpam_misc/misc_conv.c
--- Linux-PAM-0.75/libpam_misc/misc_conv.c	Sat Jan 20 17:29:47 2001
+++ Linux-PAM-0.75.headers/libpam_misc/misc_conv.c	Mon Oct  1 16:23:43 2001
@@ -6,7 +6,7 @@
  * Written by Andrew Morgan <morgan@linux.kernel.org>
  */
 
-#include <security/_pam_aconf.h>
+#include "../_pam_aconf.h"
 
 #include <signal.h>
 #include <stdio.h>
@@ -17,8 +17,8 @@
 #include <time.h>
 #include <unistd.h>
 
-#include <security/pam_appl.h>
-#include <security/pam_misc.h>
+#include "../libpam/include/security/pam_appl.h"
+#include "include/security/pam_misc.h"
 
 #define INPUTSIZE PAM_MAX_MSG_SIZE           /* maximum length of input+1 */
 #define CONV_ECHO_ON  1                            /* types of echo state */
diff -uNr Linux-PAM-0.75/libpam_misc/xstrdup.c Linux-PAM-0.75.headers/libpam_misc/xstrdup.c
--- Linux-PAM-0.75/libpam_misc/xstrdup.c	Tue Jun 20 18:11:25 2000
+++ Linux-PAM-0.75.headers/libpam_misc/xstrdup.c	Mon Oct  1 16:11:07 2001
@@ -2,7 +2,7 @@
 
 #include <malloc.h>
 #include <string.h>
-#include <security/pam_misc.h>
+#include "include/security/pam_misc.h"
 
 /*
  * Safe duplication of character strings. "Paranoid"; don't leave
diff -uNr Linux-PAM-0.75/libpamc/test/modules/pam_secret.c Linux-PAM-0.75.headers/libpamc/test/modules/pam_secret.c
--- Linux-PAM-0.75/libpamc/test/modules/pam_secret.c	Sat Jan 20 17:29:47 2001
+++ Linux-PAM-0.75.headers/libpamc/test/modules/pam_secret.c	Mon Oct  1 16:22:08 2001
@@ -11,6 +11,8 @@
 
 /* #define DEBUG */
 
+#include "../../_pam_aconf.h"
+
 #include <fcntl.h>
 #include <pwd.h>
 #include <stdio.h>
@@ -18,9 +20,9 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#include <security/pam_modules.h>
-#include <security/pam_client.h>
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/pam_modules.h"
+#include "../../libpam/include/security/pam_client.h"
+#include "../../libpam/include/security/_pam_macros.h"
 
 /*
  * This is a sample module that demonstrates the use of binary prompts
diff -uNr Linux-PAM-0.75/libpamc/test/regress/test.libpamc.c Linux-PAM-0.75.headers/libpamc/test/regress/test.libpamc.c
--- Linux-PAM-0.75/libpamc/test/regress/test.libpamc.c	Sat Jan 20 17:29:47 2001
+++ Linux-PAM-0.75.headers/libpamc/test/regress/test.libpamc.c	Mon Oct  1 16:21:05 2001
@@ -4,9 +4,10 @@
  * script in this directory, but via the libpamc API.
  */
 
+#include "../../_pam_aconf.h"
 #include <stdio.h>
 #include <string.h>
-#include <security/pam_client.h>
+#include "../../libpamc/include/security/pam_client.h"
 #include <ctype.h>
 
 struct internal_packet {
diff -uNr Linux-PAM-0.75/modules/pam_access/pam_access.c Linux-PAM-0.75.headers/modules/pam_access/pam_access.c
--- Linux-PAM-0.75/modules/pam_access/pam_access.c	Sun Jan 21 18:25:41 2001
+++ Linux-PAM-0.75.headers/modules/pam_access/pam_access.c	Mon Oct  1 16:11:07 2001
@@ -25,13 +25,13 @@
  *************************************************************************
  */
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 /* man page says above file includes this... */
-extern int gethostname(char *name, size_t len);
+/* extern int gethostname(char *name, size_t len); */
 
 #include <stdarg.h>
 #include <syslog.h>
@@ -49,6 +49,10 @@
 # include <sys/socket.h>
 #endif
 
+#ifdef NIS
+#include <rpcsvc/ypclnt.h>
+#endif /* NIS */
+
 /*
  * here, we make definitions for the externally accessible functions
  * in this file (these definitions are required for static modules
@@ -57,9 +61,9 @@
  */
 
 #define PAM_SM_ACCOUNT
+#include "../../libpam/include/security/pam_modules.h"
 
-#include <security/_pam_macros.h>
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/_pam_macros.h"
 
 int strcasecmp(const char *s1, const char *s2);
 
diff -uNr Linux-PAM-0.75/modules/pam_cracklib/pam_cracklib.c Linux-PAM-0.75.headers/modules/pam_cracklib/pam_cracklib.c
--- Linux-PAM-0.75/modules/pam_cracklib/pam_cracklib.c	Sat Feb 10 17:15:23 2001
+++ Linux-PAM-0.75.headers/modules/pam_cracklib/pam_cracklib.c	Mon Oct  1 16:11:07 2001
@@ -29,7 +29,7 @@
  * S.A.G. in the section on the cracklib module.
  */
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <stdio.h>
 #ifdef HAVE_CRYPT_H
@@ -40,6 +40,7 @@
 #include <string.h>
 #include <syslog.h>
 #include <stdarg.h>
+#include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <ctype.h>
@@ -63,11 +64,11 @@
 
 #define PAM_SM_PASSWORD
 
-#include <security/pam_modules.h>
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/pam_modules.h"
+#include "../../libpam/include/security/_pam_macros.h"
 
 #ifndef LINUX_PAM 
-#include <security/pam_appl.h>
+#include "../../libpam/include/security/pam_appl.h"
 #endif  /* LINUX_PAM */
 
 /* some syslogging */
diff -uNr Linux-PAM-0.75/modules/pam_deny/pam_deny.c Linux-PAM-0.75.headers/modules/pam_deny/pam_deny.c
--- Linux-PAM-0.75/modules/pam_deny/pam_deny.c	Mon Dec  4 14:02:34 2000
+++ Linux-PAM-0.75.headers/modules/pam_deny/pam_deny.c	Mon Oct  1 16:11:07 2001
@@ -19,7 +19,7 @@
 #define PAM_SM_SESSION
 #define PAM_SM_PASSWORD
 
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/pam_modules.h"
 
 /* --- authentication management functions --- */
 
diff -uNr Linux-PAM-0.75/modules/pam_env/pam_env.c Linux-PAM-0.75.headers/modules/pam_env/pam_env.c
--- Linux-PAM-0.75/modules/pam_env/pam_env.c	Sun Nov 19 18:54:03 2000
+++ Linux-PAM-0.75.headers/modules/pam_env/pam_env.c	Mon Oct  1 16:11:07 2001
@@ -15,7 +15,7 @@
 #define DEFAULT_ETC_ENVFILE     "/etc/environment"
 #define DEFAULT_READ_ENVFILE    1
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <ctype.h>
 #include <errno.h>
@@ -41,8 +41,8 @@
 #define PAM_SM_PASSWORD     /*        ""                 */
 #define PAM_SM_ACCOUNT      /*        ""                 */
 
-#include <security/pam_modules.h>
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/pam_modules.h"
+#include "../../libpam/include/security/_pam_macros.h"
 
 /* This little structure makes it easier to keep variables together */
 
diff -uNr Linux-PAM-0.75/modules/pam_filter/pam_filter.c Linux-PAM-0.75.headers/modules/pam_filter/pam_filter.c
--- Linux-PAM-0.75/modules/pam_filter/pam_filter.c	Sun Nov 19 18:54:03 2000
+++ Linux-PAM-0.75.headers/modules/pam_filter/pam_filter.c	Mon Oct  1 16:25:24 2001
@@ -5,7 +5,7 @@
  * Richard Stevens' UNIX Network Programming book.
  */
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <stdlib.h>
 #include <syslog.h>
@@ -30,8 +30,8 @@
 #define PAM_SM_SESSION
 #define PAM_SM_PASSWORD
 
-#include <security/pam_modules.h>
-#include <security/pam_filter.h>
+#include "../../libpam/include/security/pam_modules.h"
+#include "include/pam_filter.h"
 
 /* ------ some tokens used for convenience throughout this file ------- */
 
diff -uNr Linux-PAM-0.75/modules/pam_filter/upperLOWER/upperLOWER.c Linux-PAM-0.75.headers/modules/pam_filter/upperLOWER/upperLOWER.c
--- Linux-PAM-0.75/modules/pam_filter/upperLOWER/upperLOWER.c	Sun Nov 19 18:54:03 2000
+++ Linux-PAM-0.75.headers/modules/pam_filter/upperLOWER/upperLOWER.c	Mon Oct  1 16:21:28 2001
@@ -7,15 +7,16 @@
  * it serves no purpose other than to annoy the user...
  */
 
-#include <security/_pam_aconf.h>
+#include "../../../_pam_aconf.h"
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <syslog.h>
 #include <sys/time.h>
 #include <sys/types.h>
 #include <unistd.h>
 
-#include <security/pam_filter.h>
+#include "../include/pam_filter.h"
 
 /* ---------------------------------------------------------------- */
 
diff -uNr Linux-PAM-0.75/modules/pam_ftp/pam_ftp.c Linux-PAM-0.75.headers/modules/pam_ftp/pam_ftp.c
--- Linux-PAM-0.75/modules/pam_ftp/pam_ftp.c	Sun Nov 19 18:54:03 2000
+++ Linux-PAM-0.75.headers/modules/pam_ftp/pam_ftp.c	Mon Oct  1 16:11:07 2001
@@ -14,7 +14,7 @@
 /* the following is a password that "can't be correct" */
 #define BLOCK_PASSWORD "\177BAD PASSWPRD\177"
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -32,8 +32,8 @@
 
 #define PAM_SM_AUTH
 
-#include <security/pam_modules.h>
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/pam_modules.h"
+#include "../../libpam/include/security/_pam_macros.h"
 
 /* some syslogging */
 
diff -uNr Linux-PAM-0.75/modules/pam_group/pam_group.c Linux-PAM-0.75.headers/modules/pam_group/pam_group.c
--- Linux-PAM-0.75/modules/pam_group/pam_group.c	Sun Nov 26 02:32:39 2000
+++ Linux-PAM-0.75.headers/modules/pam_group/pam_group.c	Mon Oct  1 16:11:07 2001
@@ -47,9 +47,9 @@
  */
 
 #define PAM_SM_AUTH
+#include "../../libpam/include/security/pam_modules.h"
 
-#include <security/pam_modules.h>
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/_pam_macros.h"
 
 /* --- static functions for checking whether the user should be let in --- */
 
diff -uNr Linux-PAM-0.75/modules/pam_issue/pam_issue.c Linux-PAM-0.75.headers/modules/pam_issue/pam_issue.c
--- Linux-PAM-0.75/modules/pam_issue/pam_issue.c	Wed Feb 21 23:49:45 2001
+++ Linux-PAM-0.75.headers/modules/pam_issue/pam_issue.c	Mon Oct  1 16:11:07 2001
@@ -29,12 +29,13 @@
 #include <sys/utsname.h>
 #include <utmp.h>
 #include <malloc.h>
+#include <time.h>
 
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/_pam_macros.h"
 
 #define PAM_SM_AUTH
 
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/pam_modules.h"
 
 static int _user_prompt_set = 0;
 
diff -uNr Linux-PAM-0.75/modules/pam_lastlog/pam_lastlog.c Linux-PAM-0.75.headers/modules/pam_lastlog/pam_lastlog.c
--- Linux-PAM-0.75/modules/pam_lastlog/pam_lastlog.c	Sat Feb 10 17:33:10 2001
+++ Linux-PAM-0.75.headers/modules/pam_lastlog/pam_lastlog.c	Mon Oct  1 16:11:07 2001
@@ -10,7 +10,7 @@
  * present (login) service.
  */
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <fcntl.h>
 #include <time.h>
@@ -19,6 +19,7 @@
 #else
 # include <lastlog.h>
 #endif
+#include <limits.h>
 #include <pwd.h>
 #include <stdlib.h>
 #include <stdarg.h>
@@ -27,10 +28,7 @@
 #include <sys/types.h>
 #include <syslog.h>
 #include <unistd.h>
-
-#ifdef WANT_PWDB
-#include <pwdb/pwdb_public.h>                /* use POSIX front end */
-#endif
+#include <syslog.h>
 
 #if defined(hpux) || defined(sunos) || defined(solaris)
 # ifndef _PATH_LASTLOG
@@ -77,8 +75,9 @@
 
 #define PAM_SM_SESSION
 
-#include <security/pam_modules.h>
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/pam_modules.h"
+
+#include "../../libpam/include/security/_pam_macros.h"
 
 /* some syslogging */
 
diff -uNr Linux-PAM-0.75/modules/pam_limits/pam_limits.c Linux-PAM-0.75.headers/modules/pam_limits/pam_limits.c
--- Linux-PAM-0.75/modules/pam_limits/pam_limits.c	Wed Mar 28 23:21:16 2001
+++ Linux-PAM-0.75.headers/modules/pam_limits/pam_limits.c	Mon Oct  1 16:19:11 2001
@@ -17,12 +17,14 @@
 #error THIS CODE IS KNOWN TO WORK ONLY ON LINUX !!!
 #endif 
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
+#include <errno.h>
 #include <ctype.h>
+#include <limits.h>
 #include <stdlib.h>
 #include <syslog.h>
 #include <stdarg.h>
@@ -73,8 +75,8 @@
 
 #define PAM_SM_SESSION
 
-#include <security/pam_modules.h>
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/pam_modules.h"
+#include "../../libpam/include/security/_pam_macros.h"
 
 /* logging */
 static void _pam_log(int err, const char *format, ...)
diff -uNr Linux-PAM-0.75/modules/pam_listfile/pam_listfile.c Linux-PAM-0.75.headers/modules/pam_listfile/pam_listfile.c
--- Linux-PAM-0.75/modules/pam_listfile/pam_listfile.c	Sun Nov 19 18:54:04 2000
+++ Linux-PAM-0.75.headers/modules/pam_listfile/pam_listfile.c	Mon Oct  1 16:13:11 2001
@@ -10,7 +10,7 @@
  * This code began life as the pam_rootok module.
  */
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -20,6 +20,7 @@
 #include <syslog.h>
 #include <stdarg.h>
 #include <string.h>
+#include <limits.h>
 #include <pwd.h>
 #include <grp.h>
 
@@ -35,9 +36,9 @@
  */
 
 #define PAM_SM_AUTH
+#include "../../libpam/include/security/pam_modules.h"
 
-#include <security/pam_modules.h>
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/_pam_macros.h"
 
 /* some syslogging */
 
diff -uNr Linux-PAM-0.75/modules/pam_mail/pam_mail.c Linux-PAM-0.75.headers/modules/pam_mail/pam_mail.c
--- Linux-PAM-0.75/modules/pam_mail/pam_mail.c	Mon Dec  4 15:59:13 2000
+++ Linux-PAM-0.75.headers/modules/pam_mail/pam_mail.c	Mon Oct  1 16:11:07 2001
@@ -8,9 +8,10 @@
  * mailhash additions by Chris Adams <cadams@ro.com> 1998/7/11
  */
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <ctype.h>
+#include <limits.h>
 #include <pwd.h>
 #include <stdarg.h>
 #include <stdio.h>
@@ -43,9 +44,9 @@
 
 #define PAM_SM_SESSION
 #define PAM_SM_AUTH
+#include "../../libpam/include/security/pam_modules.h"
 
-#include <security/pam_modules.h>
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/_pam_macros.h"
 
 /* some syslogging */
 
diff -uNr Linux-PAM-0.75/modules/pam_mkhomedir/pam_mkhomedir.c Linux-PAM-0.75.headers/modules/pam_mkhomedir/pam_mkhomedir.c
--- Linux-PAM-0.75/modules/pam_mkhomedir/pam_mkhomedir.c	Tue Jun 20 18:11:45 2000
+++ Linux-PAM-0.75.headers/modules/pam_mkhomedir/pam_mkhomedir.c	Mon Oct  1 16:11:07 2001
@@ -33,6 +33,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <limits.h>
 #include <unistd.h>
 #include <pwd.h>
 #include <stdlib.h>
@@ -48,9 +49,9 @@
  */
 
 #define PAM_SM_SESSION
+#include "../../libpam/include/security/pam_modules.h"
 
-#include <security/pam_modules.h>
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/_pam_macros.h"
 
 /* argument parsing */
 #define MKHOMEDIR_DEBUG      020	/* keep quiet about things */
diff -uNr Linux-PAM-0.75/modules/pam_motd/pam_motd.c Linux-PAM-0.75.headers/modules/pam_motd/pam_motd.c
--- Linux-PAM-0.75/modules/pam_motd/pam_motd.c	Tue Jun 20 18:11:46 2000
+++ Linux-PAM-0.75.headers/modules/pam_motd/pam_motd.c	Mon Oct  1 16:11:07 2001
@@ -19,7 +19,7 @@
 #include <sys/stat.h>
 #include <pwd.h>
 
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/_pam_macros.h"
 /*
  * here, we make a definition for the externally accessible function
  * in this file (this definition is required for static a module
@@ -30,7 +30,7 @@
 #define PAM_SM_SESSION
 #define DEFAULT_MOTD	"/etc/motd"
 
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/pam_modules.h"
 
 /* --- session management functions (only) --- */
 
diff -uNr Linux-PAM-0.75/modules/pam_nologin/pam_nologin.c Linux-PAM-0.75.headers/modules/pam_nologin/pam_nologin.c
--- Linux-PAM-0.75/modules/pam_nologin/pam_nologin.c	Mon Dec  4 14:02:34 2000
+++ Linux-PAM-0.75.headers/modules/pam_nologin/pam_nologin.c	Mon Oct  1 16:14:17 2001
@@ -11,11 +11,11 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <limits.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <pwd.h>
 
-#include <security/_pam_macros.h>
 /*
  * here, we make a definition for the externally accessible function
  * in this file (this definition is required for static a module
@@ -24,8 +24,9 @@
  */
 
 #define PAM_SM_AUTH
+#include "../../libpam/include/security/pam_modules.h"
 
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/_pam_macros.h"
 
 /* --- authentication management functions (only) --- */
 
diff -uNr Linux-PAM-0.75/modules/pam_permit/pam_permit.c Linux-PAM-0.75.headers/modules/pam_permit/pam_permit.c
--- Linux-PAM-0.75/modules/pam_permit/pam_permit.c	Mon Dec  4 14:02:34 2000
+++ Linux-PAM-0.75.headers/modules/pam_permit/pam_permit.c	Mon Oct  1 16:11:07 2001
@@ -23,8 +23,8 @@
 #define PAM_SM_SESSION
 #define PAM_SM_PASSWORD
 
-#include <security/pam_modules.h>
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/pam_modules.h"
+#include "../../libpam/include/security/_pam_macros.h"
 
 /* --- authentication management functions --- */
 
diff -uNr Linux-PAM-0.75/modules/pam_pwdb/md5.h Linux-PAM-0.75.headers/modules/pam_pwdb/md5.h
--- Linux-PAM-0.75/modules/pam_pwdb/md5.h	Sat Jan 20 18:06:05 2001
+++ Linux-PAM-0.75.headers/modules/pam_pwdb/md5.h	Mon Oct  1 16:11:07 2001
@@ -1,7 +1,9 @@
 #ifndef MD5_H
 #define MD5_H
 
-typedef unsigned int uint32;
+#include <sys/types.h>
+
+typedef u_int32_t uint32;
 
 struct MD5Context {
     uint32 buf[4];
diff -uNr Linux-PAM-0.75/modules/pam_pwdb/pam_pwdb.c Linux-PAM-0.75.headers/modules/pam_pwdb/pam_pwdb.c
--- Linux-PAM-0.75/modules/pam_pwdb/pam_pwdb.c	Sun Nov 19 18:54:04 2000
+++ Linux-PAM-0.75.headers/modules/pam_pwdb/pam_pwdb.c	Mon Oct  1 16:11:07 2001
@@ -18,9 +18,7 @@
 " - PWDB Pluggable Authentication module. <morgan@linux.kernel.org>"
 ;
 
-/* #define DEBUG */
-
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <sys/types.h>
 #include <stdarg.h>
@@ -45,11 +43,11 @@
 #define PAM_SM_SESSION
 #define PAM_SM_PASSWORD
 
-#include <security/_pam_macros.h>
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/_pam_macros.h"
+#include "../../libpam/include/security/pam_modules.h"
 
 #ifndef LINUX_PAM 
-#include <security/pam_appl.h>
+#include "../../libpam/include/security/pam_appl.h"
 #endif  /* LINUX_PAM */
 
 #include "./support.-c"
@@ -178,6 +176,9 @@
  */
  
 #include "./pam_unix_passwd.-c"
+#ifdef NEED_LCKPWDF
+#include "lckpwdf.-c"
+#endif
 
 PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
 				int argc, const char **argv)
diff -uNr Linux-PAM-0.75/modules/pam_pwdb/pwdb_chkpwd.c Linux-PAM-0.75.headers/modules/pam_pwdb/pwdb_chkpwd.c
--- Linux-PAM-0.75/modules/pam_pwdb/pwdb_chkpwd.c	Sun Feb 11 01:33:53 2001
+++ Linux-PAM-0.75.headers/modules/pam_pwdb/pwdb_chkpwd.c	Mon Oct  1 16:11:07 2001
@@ -13,7 +13,7 @@
  *
  */
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <stdarg.h>
 #include <stdio.h>
@@ -22,7 +22,7 @@
 #include <syslog.h>
 #include <unistd.h>
 
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/_pam_macros.h"
 
 #define MAXPASS      200        /* the maximum length of a password */
 
diff -uNr Linux-PAM-0.75/modules/pam_pwdb/support.-c Linux-PAM-0.75.headers/modules/pam_pwdb/support.-c
--- Linux-PAM-0.75/modules/pam_pwdb/support.-c	Sun Feb 11 01:33:53 2001
+++ Linux-PAM-0.75.headers/modules/pam_pwdb/support.-c	Mon Oct  1 16:11:07 2001
@@ -344,6 +344,7 @@
 
 #include <sys/types.h>
 #include <sys/wait.h>
+#include <signal.h>
 
 static int pwdb_run_helper_binary(pam_handle_t *pamh, const char *passwd,
 				  const char *user)
diff -uNr Linux-PAM-0.75/modules/pam_radius/pam_radius.c Linux-PAM-0.75.headers/modules/pam_radius/pam_radius.c
--- Linux-PAM-0.75/modules/pam_radius/pam_radius.c	Tue Jun 20 18:11:54 2000
+++ Linux-PAM-0.75.headers/modules/pam_radius/pam_radius.c	Mon Oct  1 16:20:23 2001
@@ -17,12 +17,13 @@
 #define BUFFER_SIZE      1024
 #define LONG_VAL_PTR(ptr) ((*(ptr)<<24)+(*((ptr)+1)<<16)+(*((ptr)+2)<<8)+(*((ptr)+3)))
 
-#define PAM_SM_SESSION
+#include "../../_pam_aconf.h"
 
 #include "pam_radius.h"
-
-#include <security/pam_modules.h>
-#include <security/_pam_macros.h>
+#define PAM_SM_SESSION
+#include "../../libpam/include/security/pam_modules.h"
+
+#include "../../libpam/include/security/_pam_macros.h"
 
 static time_t session_time;
 
diff -uNr Linux-PAM-0.75/modules/pam_rhosts/pam_rhosts_auth.c Linux-PAM-0.75.headers/modules/pam_rhosts/pam_rhosts_auth.c
--- Linux-PAM-0.75/modules/pam_rhosts/pam_rhosts_auth.c	Mon Dec  4 14:02:34 2000
+++ Linux-PAM-0.75.headers/modules/pam_rhosts/pam_rhosts_auth.c	Mon Oct  1 16:11:07 2001
@@ -42,14 +42,8 @@
 
 #define USER_RHOSTS_FILE "/.rhosts"     /* prefixed by user's home dir */
 
-#ifdef linux
 #include <endian.h>
-#endif
-
-#ifdef NEED_FSUID_H
 #include <sys/fsuid.h>
-#endif /* NEED_FSUID_H */
-
 #include <sys/types.h>
 #include <sys/uio.h>
 #include <string.h>
@@ -76,10 +70,7 @@
 #include <net/if.h>
 #ifdef linux
 # include <linux/sockios.h>
-# ifndef __USE_MISC
-#  define __USE_MISC
-#  include <sys/fsuid.h>
-# endif /* __USE_MISC */
+# include <sys/fsuid.h>
 #endif
 
 #include <pwd.h>
@@ -87,18 +78,19 @@
 #include <sys/file.h>
 #include <sys/signal.h>
 #include <sys/stat.h>
+#include <sys/types.h>
 #include <syslog.h>
 #ifndef _PATH_HEQUIV
 #define _PATH_HEQUIV "/etc/hosts.equiv"
 #endif /* _PATH_HEQUIV */
 
 #define PAM_SM_AUTH  /* only defines this management group */
+#include "../../libpam/include/security/pam_modules.h"
 
-#include <security/pam_modules.h>
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/_pam_macros.h"
 
 /* to the best of my knowledge, all modern UNIX boxes have 32 bit integers */
-#define U32 unsigned int
+#define U32 u_int32_t
 
 
 /*
diff -uNr Linux-PAM-0.75/modules/pam_rootok/pam_rootok.c Linux-PAM-0.75.headers/modules/pam_rootok/pam_rootok.c
--- Linux-PAM-0.75/modules/pam_rootok/pam_rootok.c	Tue Jun 20 18:11:56 2000
+++ Linux-PAM-0.75.headers/modules/pam_rootok/pam_rootok.c	Mon Oct  1 16:14:57 2001
@@ -6,12 +6,12 @@
  * Written by Andrew Morgan <morgan@linux.kernel.org> 1996/3/11
  */
 
-#define _GNU_SOURCE
-
+#include "../../_pam_aconf.h"
 #include <stdio.h>
 #include <unistd.h>
 #include <syslog.h>
 #include <stdarg.h>
+#include <string.h>
 
 /*
  * here, we make a definition for the externally accessible function
@@ -21,8 +21,7 @@
  */
 
 #define PAM_SM_AUTH
-
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/pam_modules.h"
 
 /* some syslogging */
 
diff -uNr Linux-PAM-0.75/modules/pam_securetty/pam_securetty.c Linux-PAM-0.75.headers/modules/pam_securetty/pam_securetty.c
--- Linux-PAM-0.75/modules/pam_securetty/pam_securetty.c	Tue Jun 20 18:11:56 2000
+++ Linux-PAM-0.75.headers/modules/pam_securetty/pam_securetty.c	Mon Oct  1 16:15:55 2001
@@ -10,7 +10,7 @@
  * Slight modifications AGM. 1996/12/3
  */
 
-#define _GNU_SOURCE
+#include "../../_pam_aconf.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -21,8 +21,7 @@
 #include <stdarg.h>
 #include <pwd.h>
 #include <string.h>
-
-#define PAM_SM_AUTH
+#include <ctype.h>
 
 /*
  * here, we make a definition for the externally accessible function
@@ -32,8 +31,9 @@
  */
 
 #define PAM_SM_AUTH
+#include "../../libpam/include/security/pam_modules.h"
 
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/_pam_macros.h"
 
 /* some syslogging */
 
diff -uNr Linux-PAM-0.75/modules/pam_shells/pam_shells.c Linux-PAM-0.75.headers/modules/pam_shells/pam_shells.c
--- Linux-PAM-0.75/modules/pam_shells/pam_shells.c	Wed Aug  9 11:49:51 2000
+++ Linux-PAM-0.75.headers/modules/pam_shells/pam_shells.c	Mon Oct  1 16:16:37 2001
@@ -8,12 +8,13 @@
  * This code shamelessly ripped from the pam_securetty module.
  */
 
-#define _BSD_SOURCE
+#include "../../_pam_aconf.h"
 
 #include <pwd.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <sys/stat.h>
 #include <syslog.h>
 #include <unistd.h>
@@ -26,8 +27,9 @@
  */
 
 #define PAM_SM_AUTH
+#include "../../libpam/include/security/pam_modules.h"
 
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/_pam_macros.h"
 
 /* some syslogging */
 
diff -uNr Linux-PAM-0.75/modules/pam_stress/pam_stress.c Linux-PAM-0.75.headers/modules/pam_stress/pam_stress.c
--- Linux-PAM-0.75/modules/pam_stress/pam_stress.c	Sun Nov 19 18:54:05 2000
+++ Linux-PAM-0.75.headers/modules/pam_stress/pam_stress.c	Mon Oct  1 16:11:09 2001
@@ -5,7 +5,7 @@
  * created by Andrew Morgan <morgan@linux.kernel.org> 1996/3/12
  */
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -29,8 +29,8 @@
 #define PAM_SM_SESSION
 #define PAM_SM_PASSWORD
 
-#include <security/pam_modules.h>
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/pam_modules.h"
+#include "../../libpam/include/security/_pam_macros.h"
 
 static char *_strdup(const char *x)
 {
diff -uNr Linux-PAM-0.75/modules/pam_tally/pam_tally.c Linux-PAM-0.75.headers/modules/pam_tally/pam_tally.c
--- Linux-PAM-0.75/modules/pam_tally/pam_tally.c	Sat Jan 20 17:21:22 2001
+++ Linux-PAM-0.75.headers/modules/pam_tally/pam_tally.c	Mon Oct  1 16:11:09 2001
@@ -11,11 +11,12 @@
  * Stuff stolen from pam_rootok and pam_listfile
  */
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#include <stdlib.h>
 #include <stdarg.h>
 #include <syslog.h>
 #include <pwd.h>
@@ -42,8 +43,9 @@
 #define PAM_SM_ACCOUNT
 /* #define PAM_SM_SESSION  */
 /* #define PAM_SM_PASSWORD */
+#include "../../libpam/include/security/pam_modules.h"
 
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/_pam_macros.h"
 
 /*---------------------------------------------------------------------*/
 
diff -uNr Linux-PAM-0.75/modules/pam_time/pam_time.c Linux-PAM-0.75.headers/modules/pam_time/pam_time.c
--- Linux-PAM-0.75/modules/pam_time/pam_time.c	Sun Nov 26 02:32:39 2000
+++ Linux-PAM-0.75.headers/modules/pam_time/pam_time.c	Mon Oct  1 16:11:09 2001
@@ -13,7 +13,7 @@
 "\t\tVersion 0.22 for Linux-PAM\n"
 "Copyright (C) Andrew G. Morgan 1996 <morgan@linux.kernel.org>\n";
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <sys/file.h>
 #include <stdio.h>
@@ -48,8 +48,8 @@
 
 #define PAM_SM_ACCOUNT
 
-#include <security/_pam_macros.h>
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/_pam_macros.h"
+#include "../../libpam/include/security/pam_modules.h"
 
 /* --- static functions for checking whether the user should be let in --- */
 
diff -uNr Linux-PAM-0.75/modules/pam_unix/bigcrypt.c Linux-PAM-0.75.headers/modules/pam_unix/bigcrypt.c
--- Linux-PAM-0.75/modules/pam_unix/bigcrypt.c	Tue Jun 20 18:12:02 2000
+++ Linux-PAM-0.75.headers/modules/pam_unix/bigcrypt.c	Mon Oct  1 16:11:09 2001
@@ -24,10 +24,10 @@
  * Andy Phillips <atp@mssl.ucl.ac.uk>
  */
 
+#include <crypt.h>
 #include <string.h>
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/_pam_macros.h"
 
-char *crypt(const char *key, const char *salt);
 char *bigcrypt(const char *key, const char *salt);
 
 /*
diff -uNr Linux-PAM-0.75/modules/pam_unix/md5.h Linux-PAM-0.75.headers/modules/pam_unix/md5.h
--- Linux-PAM-0.75/modules/pam_unix/md5.h	Sat Jan 20 18:06:05 2001
+++ Linux-PAM-0.75.headers/modules/pam_unix/md5.h	Mon Oct  1 16:11:07 2001
@@ -2,7 +2,9 @@
 #ifndef MD5_H
 #define MD5_H
 
-typedef unsigned int uint32;
+#include <sys/types.h>
+
+typedef u_int32_t uint32;
 
 struct MD5Context {
 	uint32 buf[4];
diff -uNr Linux-PAM-0.75/modules/pam_unix/pam_unix_acct.c Linux-PAM-0.75.headers/modules/pam_unix/pam_unix_acct.c
--- Linux-PAM-0.75/modules/pam_unix/pam_unix_acct.c	Wed Dec 20 00:15:05 2000
+++ Linux-PAM-0.75.headers/modules/pam_unix/pam_unix_acct.c	Mon Oct  1 16:11:09 2001
@@ -34,7 +34,7 @@
  * OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -46,16 +46,15 @@
 #include <shadow.h>
 #include <time.h>		/* for time() */
 
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/_pam_macros.h"
 
 /* indicate that the following groups are defined */
 
 #define PAM_SM_ACCOUNT
-
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/pam_modules.h"
 
 #ifndef LINUX_PAM
-#include <security/pam_appl.h>
+#include "../../libpam/include/security/pam_appl.h"
 #endif				/* LINUX_PAM */
 
 #include "support.h"
diff -uNr Linux-PAM-0.75/modules/pam_unix/pam_unix_auth.c Linux-PAM-0.75.headers/modules/pam_unix/pam_unix_auth.c
--- Linux-PAM-0.75/modules/pam_unix/pam_unix_auth.c	Wed Dec 20 00:15:05 2000
+++ Linux-PAM-0.75.headers/modules/pam_unix/pam_unix_auth.c	Mon Oct  1 16:11:09 2001
@@ -37,7 +37,7 @@
 
 /* #define DEBUG */
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -54,11 +54,11 @@
 #define PAM_SM_AUTH
 
 #define _PAM_EXTERN_FUNCTIONS
-#include <security/_pam_macros.h>
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/_pam_macros.h"
+#include "../../libpam/include/security/pam_modules.h"
 
 #ifndef LINUX_PAM
-#include <security/pam_appl.h>
+#include "../../libpam/include/security/pam_appl.h"
 #endif				/* LINUX_PAM */
 
 #include "support.h"
diff -uNr Linux-PAM-0.75/modules/pam_unix/pam_unix_passwd.c Linux-PAM-0.75.headers/modules/pam_unix/pam_unix_passwd.c
--- Linux-PAM-0.75/modules/pam_unix/pam_unix_passwd.c	Sun Feb 11 01:33:53 2001
+++ Linux-PAM-0.75.headers/modules/pam_unix/pam_unix_passwd.c	Mon Oct  1 16:11:09 2001
@@ -35,7 +35,7 @@
  * OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -61,16 +61,15 @@
 #include <crack.h>
 #endif
 
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/_pam_macros.h"
 
 /* indicate the following groups are defined */
 
 #define PAM_SM_PASSWORD
-
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/pam_modules.h"
 
 #ifndef LINUX_PAM
-#include <security/pam_appl.h>
+#include "../../libpam/include/security/pam_appl.h"
 #endif				/* LINUX_PAM */
 
 #include "yppasswd.h"
@@ -114,7 +113,9 @@
 #define MAX_PASSWD_TRIES	3
 #define PW_TMPFILE		"/etc/npasswd"
 #define SH_TMPFILE		"/etc/nshadow"
+#ifndef CRACKLIB_DICTS
 #define CRACKLIB_DICTS		"/usr/share/dict/cracklib_dict"
+#endif
 #define OPW_TMPFILE		"/etc/security/nopasswd"
 #define OLD_PASSWORDS_FILE	"/etc/security/opasswd"
 
diff -uNr Linux-PAM-0.75/modules/pam_unix/pam_unix_sess.c Linux-PAM-0.75.headers/modules/pam_unix/pam_unix_sess.c
--- Linux-PAM-0.75/modules/pam_unix/pam_unix_sess.c	Wed Dec 20 00:15:05 2000
+++ Linux-PAM-0.75.headers/modules/pam_unix/pam_unix_sess.c	Mon Oct  1 16:11:09 2001
@@ -36,7 +36,7 @@
  * OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -44,6 +44,7 @@
 #include <unistd.h>
 #include <syslog.h>
 #include <fcntl.h>
+#include <pwd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 
@@ -51,11 +52,11 @@
 
 #define PAM_SM_SESSION
 
-#include <security/_pam_macros.h>
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/_pam_macros.h"
+#include "../../libpam/include/security/pam_modules.h"
 
 #ifndef LINUX_PAM
-#include <security/pam_appl.h>
+#include "../../libpam/include/security/pam_appl.h"
 #endif				/* LINUX_PAM */
 
 #include "support.h"
diff -uNr Linux-PAM-0.75/modules/pam_unix/support.c Linux-PAM-0.75.headers/modules/pam_unix/support.c
--- Linux-PAM-0.75/modules/pam_unix/support.c	Sun Feb 11 01:33:53 2001
+++ Linux-PAM-0.75.headers/modules/pam_unix/support.c	Mon Oct  1 16:11:09 2001
@@ -4,9 +4,11 @@
  * Copyright information at end of file.
  */
 
-#define _BSD_SOURCE
-
+#include <_pam_aconf.h>
+  
+#include <stdio.h>
 #include <stdlib.h>
+#include <signal.h>
 #include <unistd.h>
 #include <stdarg.h>
 #include <string.h>
@@ -15,9 +17,11 @@
 #include <shadow.h>
 #include <limits.h>
 #include <utmp.h>
+#include <ctype.h>
+#include <rpcsvc/ypclnt.h>
 
-#include <security/_pam_macros.h>
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/_pam_macros.h"
+#include "../../libpam/include/security/pam_modules.h"
 
 #include "md5.h"
 #include "support.h"
diff -uNr Linux-PAM-0.75/modules/pam_unix/unix_chkpwd.c Linux-PAM-0.75.headers/modules/pam_unix/unix_chkpwd.c
--- Linux-PAM-0.75/modules/pam_unix/unix_chkpwd.c	Sun Feb 11 01:33:53 2001
+++ Linux-PAM-0.75.headers/modules/pam_unix/unix_chkpwd.c	Mon Oct  1 16:11:09 2001
@@ -13,7 +13,7 @@
  *
  */
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <stdarg.h>
 #include <stdio.h>
@@ -28,7 +28,7 @@
 
 #define MAXPASS		200	/* the maximum length of a password */
 
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/_pam_macros.h"
 
 #include "md5.h"
 
diff -uNr Linux-PAM-0.75/modules/pam_unix/yppasswd_xdr.c Linux-PAM-0.75.headers/modules/pam_unix/yppasswd_xdr.c
--- Linux-PAM-0.75/modules/pam_unix/yppasswd_xdr.c	Sun Nov 19 18:54:05 2000
+++ Linux-PAM-0.75.headers/modules/pam_unix/yppasswd_xdr.c	Mon Oct  1 16:11:09 2001
@@ -10,7 +10,7 @@
  * editied manually.
  */
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <rpc/rpc.h>
 #include <rpcsvc/yp_prot.h>
diff -uNr Linux-PAM-0.75/modules/pam_userdb/conv.c Linux-PAM-0.75.headers/modules/pam_userdb/conv.c
--- Linux-PAM-0.75/modules/pam_userdb/conv.c	Tue Jun 20 18:12:09 2000
+++ Linux-PAM-0.75.headers/modules/pam_userdb/conv.c	Mon Oct  1 16:11:09 2001
@@ -10,8 +10,8 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <security/pam_modules.h>
-#include <security/_pam_macros.h>
+#include "../../libpam/include/security/pam_modules.h"
+#include "../../libpam/include/security/_pam_macros.h"
 
 #include "pam_userdb.h"
 
diff -uNr Linux-PAM-0.75/modules/pam_userdb/pam_userdb.c Linux-PAM-0.75.headers/modules/pam_userdb/pam_userdb.c
--- Linux-PAM-0.75/modules/pam_userdb/pam_userdb.c	Mon Dec  4 10:02:16 2000
+++ Linux-PAM-0.75.headers/modules/pam_userdb/pam_userdb.c	Mon Oct  1 16:11:09 2001
@@ -6,7 +6,7 @@
  * See the end of the file for Copyright Information
  */
 
-#include <security/_pam_aconf.h>
+#include "../../_pam_aconf.h"
 
 #include <stdlib.h>
 #include <unistd.h>
@@ -41,7 +41,7 @@
 #define PAM_SM_AUTH
 #define PAM_SM_ACCOUNT
 
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/pam_modules.h"
 
 /* some syslogging */
 
diff -uNr Linux-PAM-0.75/modules/pam_userdb/pam_userdb.h Linux-PAM-0.75.headers/modules/pam_userdb/pam_userdb.h
--- Linux-PAM-0.75/modules/pam_userdb/pam_userdb.h	Tue Jun 20 18:12:09 2000
+++ Linux-PAM-0.75.headers/modules/pam_userdb/pam_userdb.h	Mon Oct  1 16:11:09 2001
@@ -4,7 +4,7 @@
 /* $Id: pam-0.75-headers.patch,v 1.1 2002/10/22 21:59:09 nalin Exp $ */
    
 /* Header files */
-#include <security/pam_appl.h>
+#include "../../libpam/include/security/pam_appl.h"
 
 /* argument parsing */
 #define PAM_DEBUG_ARG		0x0001
diff -uNr Linux-PAM-0.75/modules/pam_warn/pam_warn.c Linux-PAM-0.75.headers/modules/pam_warn/pam_warn.c
--- Linux-PAM-0.75/modules/pam_warn/pam_warn.c	Tue Jun 20 18:12:10 2000
+++ Linux-PAM-0.75.headers/modules/pam_warn/pam_warn.c	Mon Oct  1 16:11:09 2001
@@ -23,7 +23,7 @@
 #define PAM_SM_AUTH
 #define PAM_SM_PASSWORD
 
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/pam_modules.h"
 
 /* some syslogging */
 
diff -uNr Linux-PAM-0.75/modules/pam_wheel/pam_wheel.c Linux-PAM-0.75.headers/modules/pam_wheel/pam_wheel.c
--- Linux-PAM-0.75/modules/pam_wheel/pam_wheel.c	Sun Nov 26 02:40:04 2000
+++ Linux-PAM-0.75.headers/modules/pam_wheel/pam_wheel.c	Mon Oct  1 16:11:09 2001
@@ -41,7 +41,7 @@
 
 #define PAM_SM_AUTH
 
-#include <security/pam_modules.h>
+#include "../../libpam/include/security/pam_modules.h"
 
 /* some syslogging */
 
--- Linux-PAM-0.75/modules/pam_group/pam_group.c	Tue Jul 10 04:37:11 2001
+++ Linux-PAM-0.75/modules/pam_group/pam_group.c	Tue Jul 10 04:37:58 2001
@@ -11,7 +11,7 @@
 "Version 0.5 for Linux-PAM\n"
 "Copyright (c) Andrew G. Morgan 1996 <morgan@linux.kernel.org>\n";
 
-#define _BSD_SOURCE
+#include "../../_pam_aconf.h"
 
 #include <sys/file.h>
 #include <stdio.h>
--- Linux-PAM-0.75/modules/pam_issue/pam_issue.c	Tue Jul 10 04:37:11 2001
+++ Linux-PAM-0.75/modules/pam_issue/pam_issue.c	Tue Jul 10 04:38:04 2001
@@ -14,8 +14,7 @@
  * Released under the GNU LGPL version 2 or later
  */
 
-#define _GNU_SOURCE
-#define _BSD_SOURCE
+#include "../../_pam_aconf.h"
 
 #include <string.h>
 #include <stdio.h>
--- Linux-PAM-0.75/modules/pam_mkhomedir/pam_mkhomedir.c	Tue Jul 10 04:37:11 2001
+++ Linux-PAM-0.75/modules/pam_mkhomedir/pam_mkhomedir.c	Tue Jul 10 04:41:48 2001
@@ -27,8 +27,7 @@
      <morgan@parc.power.net> 1996
  */
 
-/* I want snprintf dammit */
-#define _GNU_SOURCE 1
+#include "../../_pam_aconf.h"
 #include <stdarg.h>
 #include <sys/types.h>
 #include <sys/stat.h>
--- Linux-PAM-0.75/modules/pam_rhosts/pam_rhosts_auth.c	Tue Jul 10 04:37:11 2001
+++ Linux-PAM-0.75/modules/pam_rhosts/pam_rhosts_auth.c	Tue Jul 10 04:38:27 2001
@@ -38,7 +38,7 @@
  * SUCH DAMAGE.
  */
 
-#define _BSD_SOURCE
+#include "../../_pam_aconf.h"
 
 #define USER_RHOSTS_FILE "/.rhosts"     /* prefixed by user's home dir */
 
--- Linux-PAM-0.75/modules/pam_stress/pam_stress.c	Sun Nov 19 18:54:05 2000
+++ Linux-PAM-0.75/modules/pam_stress/pam_stress.c	Tue Jul 10 04:32:55 2001
@@ -10,7 +10,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#define __USE_BSD
 #include <syslog.h>
 
 #include <stdarg.h>
--- Linux-PAM-0.75/modules/pam_warn/pam_warn.c	Tue Jul 10 04:37:11 2001
+++ Linux-PAM-0.75/modules/pam_warn/pam_warn.c	Tue Jul 10 04:38:57 2001
@@ -6,7 +6,7 @@
  * Written by Andrew Morgan <morgan@linux.kernel.org> 1996/3/11
  */
 
-#define _BSD_SOURCE
+#include "../../_pam_aconf.h"
 
 #include <stdio.h>
 #include <unistd.h>
--- Linux-PAM-0.75/_pam_aconf.h.in	Mon Dec  4 15:56:10 2000
+++ Linux-PAM-0.75/_pam_aconf.h.in	Tue Jul 10 04:32:55 2001
@@ -19,11 +19,6 @@
 /* GNU systems as a class, all have the feature.h file */
 #undef HAVE_FEATURES_H
 #ifdef HAVE_FEATURES_H
-# define _SVID_SOURCE
-# define _BSD_SOURCE
-# define __USE_BSD
-# define __USE_SVID
-# define __USE_MISC
 # define _GNU_SOURCE
 # include <features.h>
 #endif /* HAVE_FEATURES_H */
--- Linux-PAM-0.75/modules/pam_wheel/pam_wheel.c.headers	Mon Oct  1 16:37:22 2001
+++ Linux-PAM-0.75/modules/pam_wheel/pam_wheel.c	Mon Oct  1 16:38:18 2001
@@ -21,8 +21,7 @@
  *    a wheel member.
  */
 
-#define _BSD_SOURCE
-
+#include "../../_pam_aconf.h"
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
