You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by be...@locus.apache.org on 2000/12/30 21:56:37 UTC
cvs commit: apr/user/unix homedir.c
ben 00/12/30 12:56:35
Modified: . configure.in
user/unix homedir.c
Log:
Compensate for missing getpwnam_r on FreeBSD 3.2.
Revision Changes Path
1.197 +3 -0 apr/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.196
retrieving revision 1.197
diff -u -r1.196 -r1.197
--- configure.in 2000/12/28 23:14:06 1.196
+++ configure.in 2000/12/30 20:56:34 1.197
@@ -600,6 +600,9 @@
AC_CHECK_FUNCS(poll)
+dnl #----------------------------- Checking for missing POSIX thread functions
+AC_CHECK_FUNCS(getpwnam_r)
+
dnl #----------------------------- Checking for Processes
echo $ac_n "${nl}Checking for Processes...${nl}"
1.2 +1 -1 apr/user/unix/homedir.c
Index: homedir.c
===================================================================
RCS file: /home/cvs/apr/user/unix/homedir.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- homedir.c 2000/11/13 03:18:18 1.1
+++ homedir.c 2000/12/30 20:56:35 1.2
@@ -71,7 +71,7 @@
char pwbuf[512];
#endif
-#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
+#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(HAVE_GETPWNAM_R)
if (!getpwnam_r(userid, &pwd, pwbuf, sizeof(pwbuf), &pw)) {
#else
if ((pw = getpwnam(userid)) != NULL) {