diff options
author | Damien Miller <djm@mindrot.org> | 1999-12-29 02:24:35 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-12-29 02:24:35 +1100 |
commit | 74d0d4a3d9157823fda11c892c6d592562486b84 (patch) | |
tree | 05f34967c155b2dc0689ad6a0f76f1227f68ab89 | |
parent | cadc6bb72f60e48c65397eb67e76064931d78306 (diff) |
- Merged AIX patch from Darren Hall <dhall@virage.org>
- Cleaned up defines.h
-rw-r--r-- | CREDITS | 1 | ||||
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | acconfig.h | 1 | ||||
-rw-r--r-- | configure.in | 12 | ||||
-rw-r--r-- | defines.h | 74 |
5 files changed, 61 insertions, 29 deletions
@@ -9,6 +9,7 @@ Chip Salzenberg <chip@valinux.com> - Assorted patches | |||
9 | Chris Saia <csaia@wtower.com> - SuSE packaging | 9 | Chris 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 |
11 | Chun-Chung Chen <cjj@u.washington.edu> - RPM fixes | 11 | Chun-Chung Chen <cjj@u.washington.edu> - RPM fixes |
12 | Darren Hall <dhall@virage.org> - AIX patches | ||
12 | Dan Brosemer <odin@linuxfreak.com> - Autoconf support, build fixes | 13 | Dan Brosemer <odin@linuxfreak.com> - Autoconf support, build fixes |
13 | David Agraz <dagraz@jahoopa.com> - Build fixes | 14 | David Agraz <dagraz@jahoopa.com> - Build fixes |
14 | David Rankin <drankin@bohemians.lexington.ky.us> - libwrap fixes | 15 | David Rankin <drankin@bohemians.lexington.ky.us> - libwrap fixes |
@@ -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 | ||
9 | 19991227 | 11 | 19991227 |
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 | ||
180 | AC_MSG_CHECKING([For socklen_t]) | ||
181 | AC_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 | |||
180 | AC_ARG_WITH(pam, | 192 | AC_ARG_WITH(pam, |
181 | [ --without-pam Disable PAM support ], | 193 | [ --without-pam Disable PAM support ], |
182 | [ | 194 | [ |
@@ -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 |
29 | enum | 33 | enum |
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 | 50 | typedef 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 | 55 | typedef 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 | 60 | typedef 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 | 63 | typedef 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 | 73 | typedef uint16_t u_int16_t; |
68 | # define u_int32_t uint32_t | 74 | typedef uint32_t u_int32_t; |
69 | # define u_int64_t uint64_t | 75 | typedef 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 | 78 | typedef 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 | 83 | typedef 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 | 88 | typedef 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 | 91 | typedef 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 | 102 | typedef int64_t quad_t; |
97 | #endif | 103 | #endif |
98 | 104 | ||
105 | #ifndef HAVE_SOCKLEN_T | ||
106 | typedef 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 | |||