summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-12-29 02:24:35 +1100
committerDamien Miller <djm@mindrot.org>1999-12-29 02:24:35 +1100
commit74d0d4a3d9157823fda11c892c6d592562486b84 (patch)
tree05f34967c155b2dc0689ad6a0f76f1227f68ab89
parentcadc6bb72f60e48c65397eb67e76064931d78306 (diff)
- Merged AIX patch from Darren Hall <dhall@virage.org>
- Cleaned up defines.h
-rw-r--r--CREDITS1
-rw-r--r--ChangeLog2
-rw-r--r--acconfig.h1
-rw-r--r--configure.in12
-rw-r--r--defines.h74
5 files changed, 61 insertions, 29 deletions
diff --git a/CREDITS b/CREDITS
index e505c5051..84cf53ded 100644
--- a/CREDITS
+++ b/CREDITS
@@ -9,6 +9,7 @@ Chip Salzenberg <chip@valinux.com> - Assorted patches
9Chris Saia <csaia@wtower.com> - SuSE packaging 9Chris Saia <csaia@wtower.com> - SuSE packaging
10"Chris, the Young One" <cky@pobox.com> - Password auth fixes 10"Chris, the Young One" <cky@pobox.com> - Password auth fixes
11Chun-Chung Chen <cjj@u.washington.edu> - RPM fixes 11Chun-Chung Chen <cjj@u.washington.edu> - RPM fixes
12Darren Hall <dhall@virage.org> - AIX patches
12Dan Brosemer <odin@linuxfreak.com> - Autoconf support, build fixes 13Dan Brosemer <odin@linuxfreak.com> - Autoconf support, build fixes
13David Agraz <dagraz@jahoopa.com> - Build fixes 14David Agraz <dagraz@jahoopa.com> - Build fixes
14David Rankin <drankin@bohemians.lexington.ky.us> - libwrap fixes 15David Rankin <drankin@bohemians.lexington.ky.us> - libwrap fixes
diff --git a/ChangeLog b/ChangeLog
index 9c29ac8ba..bb27a81f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
5 - Fully set ut_tv if present in utmp or utmpx 5 - Fully set ut_tv if present in utmp or utmpx
6 - Portability fixes for Irix 5.3 (now compiles OK!) 6 - Portability fixes for Irix 5.3 (now compiles OK!)
7 - autoconf and other misc cleanups 7 - autoconf and other misc cleanups
8 - Merged AIX patch from Darren Hall <dhall@virage.org>
9 - Cleaned up defines.h
8 10
919991227 1119991227
10 - Automatically correct paths in manpages and configuration files. Patch 12 - Automatically correct paths in manpages and configuration files. Patch
diff --git a/acconfig.h b/acconfig.h
index fd9fe1fcb..23376f8d4 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -105,6 +105,7 @@
105#undef HAVE_INTXX_T 105#undef HAVE_INTXX_T
106#undef HAVE_U_INTXX_T 106#undef HAVE_U_INTXX_T
107#undef HAVE_UINTXX_T 107#undef HAVE_UINTXX_T
108#undef HAVE_SOCKLEN_T
108 109
109/* Define if you have /dev/ptmx */ 110/* Define if you have /dev/ptmx */
110#undef HAVE_DEV_PTMX 111#undef HAVE_DEV_PTMX
diff --git a/configure.in b/configure.in
index 274111e2c..a232a746b 100644
--- a/configure.in
+++ b/configure.in
@@ -177,6 +177,18 @@ AC_TRY_COMPILE(
177 [AC_MSG_RESULT(no)] 177 [AC_MSG_RESULT(no)]
178) 178)
179 179
180AC_MSG_CHECKING([For socklen_t])
181AC_TRY_COMPILE(
182 [#include <sys/types.h>],
183 [#include <sys/socket.h>],
184 [socklen_t foo; foo = 1235;],
185 [
186 AC_DEFINE(HAVE_SOCKLEN_T)
187 AC_MSG_RESULT(yes)
188 ],
189 [AC_MSG_RESULT(no)]
190)
191
180AC_ARG_WITH(pam, 192AC_ARG_WITH(pam,
181 [ --without-pam Disable PAM support ], 193 [ --without-pam Disable PAM support ],
182 [ 194 [
diff --git a/defines.h b/defines.h
index bcab3c080..1437e7b26 100644
--- a/defines.h
+++ b/defines.h
@@ -1,3 +1,5 @@
1/* Necessary headers */
2
1#include <sys/types.h> /* For u_intXX_t */ 3#include <sys/types.h> /* For u_intXX_t */
2#include <sys/socket.h> /* For SHUT_XXXX */ 4#include <sys/socket.h> /* For SHUT_XXXX */
3 5
@@ -25,6 +27,8 @@
25# include <sys/cdefs.h> /* For __P() */ 27# include <sys/cdefs.h> /* For __P() */
26#endif 28#endif
27 29
30/* Constants */
31
28#ifndef SHUT_RDWR 32#ifndef SHUT_RDWR
29enum 33enum
30{ 34{
@@ -37,24 +41,26 @@ enum
37# define SHUT_RDWR SHUT_RDWR 41# define SHUT_RDWR SHUT_RDWR
38#endif 42#endif
39 43
44/* Types */
45
40/* If sys/types.h does not supply intXX_t, supply them ourselves */ 46/* If sys/types.h does not supply intXX_t, supply them ourselves */
41/* (or die trying) */ 47/* (or die trying) */
42#ifndef HAVE_INTXX_T 48#ifndef HAVE_INTXX_T
43# if (SIZEOF_SHORT_INT == 2) 49# if (SIZEOF_SHORT_INT == 2)
44# define int16_t short int 50typedef short int int16_t;
45# else 51# else
46# error "16 bit int type not found." 52# error "16 bit int type not found."
47# endif 53# endif
48# if (SIZEOF_INT == 4) 54# if (SIZEOF_INT == 4)
49# define int32_t int 55typedef int int32_t;
50# else 56# else
51# error "32 bit int type not found." 57# error "32 bit int type not found."
52# endif 58# endif
53# if (SIZEOF_LONG_INT == 8) 59# if (SIZEOF_LONG_INT == 8)
54# define int64_t long int 60typedef long int int64_t;
55# else 61# else
56# if (SIZEOF_LONG_LONG_INT == 8) 62# if (SIZEOF_LONG_LONG_INT == 8)
57# define int64_t long long int 63typedef long long int int64_t;
58# else 64# else
59# error "64 bit int type not found." 65# error "64 bit int type not found."
60# endif 66# endif
@@ -64,25 +70,25 @@ enum
64/* If sys/types.h does not supply u_intXX_t, supply them ourselves */ 70/* If sys/types.h does not supply u_intXX_t, supply them ourselves */
65#ifndef HAVE_U_INTXX_T 71#ifndef HAVE_U_INTXX_T
66# ifdef HAVE_UINTXX_T 72# ifdef HAVE_UINTXX_T
67# define u_int16_t uint16_t 73typedef uint16_t u_int16_t;
68# define u_int32_t uint32_t 74typedef uint32_t u_int32_t;
69# define u_int64_t uint64_t 75typedef uint64_t u_int64_t;
70# else 76# else
71# if (SIZEOF_SHORT_INT == 2) 77# if (SIZEOF_SHORT_INT == 2)
72# define u_int16_t unsigned short int 78typedef unsigned short int u_int16_t;
73# else 79# else
74# error "16 bit int type not found." 80# error "16 bit int type not found."
75# endif 81# endif
76# if (SIZEOF_INT == 4) 82# if (SIZEOF_INT == 4)
77# define u_int32_t unsigned int 83typedef unsigned int u_int32_t;
78# else 84# else
79# error "32 bit int type not found." 85# error "32 bit int type not found."
80# endif 86# endif
81# if (SIZEOF_LONG_INT == 8) 87# if (SIZEOF_LONG_INT == 8)
82# define u_int64_t unsigned long int 88typedef unsigned long int u_int64_t;
83# else 89# else
84# if (SIZEOF_LONG_LONG_INT == 8) 90# if (SIZEOF_LONG_LONG_INT == 8)
85# define u_int64_t unsigned long long int 91typedef unsigned long long int u_int64_t;
86# else 92# else
87# error "64 bit int type not found." 93# error "64 bit int type not found."
88# endif 94# endif
@@ -93,9 +99,15 @@ enum
93/* If quad_t is not supplied, then supply it now. We can rely on int64_t */ 99/* If quad_t is not supplied, then supply it now. We can rely on int64_t */
94/* being defined by the above */ 100/* being defined by the above */
95#ifndef HAVE_QUAD_T 101#ifndef HAVE_QUAD_T
96# define quad_t int64_t 102typedef int64_t quad_t;
97#endif 103#endif
98 104
105#ifndef HAVE_SOCKLEN_T
106typedef unsigned int socklen_t;
107#endif /* HAVE_SOCKLEN_T */
108
109/* Paths */
110
99/* If _PATH_LASTLOG is not defined by system headers, set it to the */ 111/* If _PATH_LASTLOG is not defined by system headers, set it to the */
100/* lastlog file detected by autoconf */ 112/* lastlog file detected by autoconf */
101#ifndef _PATH_LASTLOG 113#ifndef _PATH_LASTLOG
@@ -164,6 +176,14 @@ enum
164# define _PATH_MAILDIR MAILDIR 176# define _PATH_MAILDIR MAILDIR
165#endif /* !defined(_PATH_MAILDIR) && defined(MAILDIR) */ 177#endif /* !defined(_PATH_MAILDIR) && defined(MAILDIR) */
166 178
179#ifndef _PATH_RSH
180# ifdef RSH_PATH
181# define _PATH_RSH RSH_PATH
182# endif /* RSH_PATH */
183#endif /* _PATH_RSH */
184
185/* Macros */
186
167#ifndef MAX 187#ifndef MAX
168# define MAX(a,b) (((a)>(b))?(a):(b)) 188# define MAX(a,b) (((a)>(b))?(a):(b))
169# define MIN(a,b) (((a)<(b))?(a):(b)) 189# define MIN(a,b) (((a)<(b))?(a):(b))
@@ -181,13 +201,6 @@ enum
181 } while (0) 201 } while (0)
182#endif 202#endif
183 203
184/* In older versions of libpam, pam_strerror takes a single argument */
185#ifdef HAVE_OLD_PAM
186# define PAM_STRERROR(a,b) pam_strerror((b))
187#else
188# define PAM_STRERROR(a,b) pam_strerror((a),(b))
189#endif
190
191#ifndef __P 204#ifndef __P
192# define __P(x) x 205# define __P(x) x
193#endif 206#endif
@@ -196,6 +209,19 @@ enum
196# define __attribute__(x) 209# define __attribute__(x)
197#endif /* !defined(__GNUC__) || (__GNUC__ < 2) */ 210#endif /* !defined(__GNUC__) || (__GNUC__ < 2) */
198 211
212#if defined(HAVE_SECURITY_PAM_APPL_H) && !defined(DISABLE_PAM)
213# define USE_PAM
214#endif /* defined(HAVE_SECURITY_PAM_APPL_H) && !defined(DISABLE_PAM) */
215
216/* Function replacement / compatibility hacks */
217
218/* In older versions of libpam, pam_strerror takes a single argument */
219#ifdef HAVE_OLD_PAM
220# define PAM_STRERROR(a,b) pam_strerror((b))
221#else
222# define PAM_STRERROR(a,b) pam_strerror((a),(b))
223#endif
224
199#if !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) 225#if !defined(HAVE_SETEUID) && defined(HAVE_SETREUID)
200# define seteuid(a) setreuid(-1,a) 226# define seteuid(a) setreuid(-1,a)
201#endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */ 227#endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */
@@ -204,13 +230,3 @@ enum
204# define innetgr(a,b,c,d) (0) 230# define innetgr(a,b,c,d) (0)
205#endif /* HAVE_INNETGR */ 231#endif /* HAVE_INNETGR */
206 232
207#ifndef _PATH_RSH
208# ifdef RSH_PATH
209# define _PATH_RSH RSH_PATH
210# endif /* RSH_PATH */
211#endif /* _PATH_RSH */
212
213#if defined(HAVE_SECURITY_PAM_APPL_H) && !defined(DISABLE_PAM)
214# define USE_PAM
215#endif /* defined(HAVE_SECURITY_PAM_APPL_H) && !defined(DISABLE_PAM) */
216