diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | configure.ac | 21 | ||||
-rw-r--r-- | includes.h | 2 |
3 files changed, 27 insertions, 3 deletions
@@ -1,3 +1,8 @@ | |||
1 | 20041102 | ||
2 | - (dtucker) [configure.ac includes.h] Bug #947: Fix compile error on HP-UX | ||
3 | 10.x by testing for conflicts in shadow.h and undef'ing _INCLUDE__STDC__ | ||
4 | only if a conflict is detected. | ||
5 | |||
1 | 20041019 | 6 | 20041019 |
2 | - (dtucker) [uidswap.c] Don't test dropping of gids for the root user or | 7 | - (dtucker) [uidswap.c] Don't test dropping of gids for the root user or |
3 | on Cygwin. Cygwin parts from vinschen at redhat com; ok djm@ | 8 | on Cygwin. Cygwin parts from vinschen at redhat com; ok djm@ |
@@ -1771,4 +1776,4 @@ | |||
1771 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM | 1776 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM |
1772 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu | 1777 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu |
1773 | 1778 | ||
1774 | $Id: ChangeLog,v 1.3561 2004/10/19 06:33:33 dtucker Exp $ | 1779 | $Id: ChangeLog,v 1.3562 2004/11/02 09:30:54 dtucker Exp $ |
diff --git a/configure.ac b/configure.ac index e8bee9d4e..b8f970074 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.231 2004/09/30 11:17:08 dtucker Exp $ | 1 | # $Id: configure.ac,v 1.232 2004/11/02 09:30:54 dtucker Exp $ |
2 | # | 2 | # |
3 | # Copyright (c) 1999-2004 Damien Miller | 3 | # Copyright (c) 1999-2004 Damien Miller |
4 | # | 4 | # |
@@ -220,6 +220,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) | |||
220 | AC_DEFINE(LOCKED_PASSWD_STRING, "*") | 220 | AC_DEFINE(LOCKED_PASSWD_STRING, "*") |
221 | AC_DEFINE(SPT_TYPE,SPT_PSTAT) | 221 | AC_DEFINE(SPT_TYPE,SPT_PSTAT) |
222 | check_for_hpux_broken_getaddrinfo=1 | 222 | check_for_hpux_broken_getaddrinfo=1 |
223 | check_for_conflicting_getspnam=1 | ||
223 | LIBS="$LIBS -lsec" | 224 | LIBS="$LIBS -lsec" |
224 | AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) | 225 | AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) |
225 | ;; | 226 | ;; |
@@ -1123,6 +1124,24 @@ main(void) | |||
1123 | ) | 1124 | ) |
1124 | fi | 1125 | fi |
1125 | 1126 | ||
1127 | if test "x$check_for_conflicting_getspnam" = "x1"; then | ||
1128 | AC_MSG_CHECKING(for conflicting getspnam in shadow.h) | ||
1129 | AC_COMPILE_IFELSE( | ||
1130 | [ | ||
1131 | #include <shadow.h> | ||
1132 | int main(void) {exit(0);} | ||
1133 | ], | ||
1134 | [ | ||
1135 | AC_MSG_RESULT(no) | ||
1136 | ], | ||
1137 | [ | ||
1138 | AC_MSG_RESULT(yes) | ||
1139 | AC_DEFINE(GETSPNAM_CONFLICTING_DEFS, 1, | ||
1140 | [Conflicting defs for getspnam]) | ||
1141 | ] | ||
1142 | ) | ||
1143 | fi | ||
1144 | |||
1126 | AC_FUNC_GETPGRP | 1145 | AC_FUNC_GETPGRP |
1127 | 1146 | ||
1128 | # Check for PAM libs | 1147 | # Check for PAM libs |
diff --git a/includes.h b/includes.h index 3a6b4c32b..3d3aa3b21 100644 --- a/includes.h +++ b/includes.h | |||
@@ -185,7 +185,7 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } | |||
185 | * On HP-UX 11.11, shadow.h and prot.h provide conflicting declarations | 185 | * On HP-UX 11.11, shadow.h and prot.h provide conflicting declarations |
186 | * of getspnam when _INCLUDE__STDC__ is defined, so we unset it here. | 186 | * of getspnam when _INCLUDE__STDC__ is defined, so we unset it here. |
187 | */ | 187 | */ |
188 | #ifdef __hpux | 188 | #ifdef GETSPNAM_CONFLICTING_DEFS |
189 | # ifdef _INCLUDE__STDC__ | 189 | # ifdef _INCLUDE__STDC__ |
190 | # undef _INCLUDE__STDC__ | 190 | # undef _INCLUDE__STDC__ |
191 | # endif | 191 | # endif |