Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 1790 invoked by uid 500); 29 Dec 2000 19:04:41 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 1779 invoked from network); 29 Dec 2000 19:04:40 -0000 Message-ID: <3A4CE02A.C08FEAC6@algroup.co.uk> Date: Fri, 29 Dec 2000 19:04:10 +0000 From: Ben Laurie X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: new-httpd@apache.org Subject: Re: Deja vu References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: h29.sny.collab.net 1.6.2 0/1000/N rbb@covalent.net wrote: > > > -lcrypt > > srclib/apr/libapr.a(homedir.o): In function `apr_get_home_directory': > > /usr/home/ben/work/httpd-2.0/srclib/apr/user/unix/homedir.c(.text+0x28): > > undefined reference to `getpwnam_r' > > *** Error code 1 > > > > I'm sure we fixed this a year ago, but I've forgotten how - does anyone > > remember? > > Please make sure that you are actually linking in the library that you > need. If not, we need to add a library to the EXTRA_LIBS variable in > APR. I don't have access to a 3.2 machine myself, but 2.0 is compiling > fine on 4.1 and 4.2 right now, so that tells me that it is basically just > a missing library for a function that has moved. Nope, the function doesn't exist. So, it seems to me that I need to test for it in configure. Which leads me to further confusion... in apr/configure.in, I see (for example): AC_CHECK_FUNCS(strcasecmp stricmp setsid nl_langinfo) but also: AC_CHECK_FUNCS(stricmp, have_stricmp="1", have_stricmp="0") so what's the score there, then? And I notice things like: AC_CHECK_FUNCS(fork, [ fork="1" ], [ fork="0" ]) which end up defining HAS_FORK instead of HAVE_FORK. What's that all about? Anyway, my inclination is to do this: Index: srclib/apr/configure.in =================================================================== RCS file: /home/cvs/apr/configure.in,v retrieving revision 1.196 diff -u -r1.196 configure.in --- srclib/apr/configure.in 2000/12/28 23:14:06 1.196 +++ srclib/apr/configure.in 2000/12/29 19:00:44 @@ -476,6 +476,11 @@ AC_SUBST(have_strdup) AC_SUBST(have_strstr) +dnl #----------------------------- Checking for missing POSIX thread functions +AC_CHECK_FUNCS(getpwnam_r, have_getpwnam_r="1", have_getpwnam_r="0") + +AC_SUBST(have_getpwnam_r) + dnl #----------------------------- Checking for DSO support echo $ac_n "${nl}Checking for DSO...${nl}" AC_ARG_ENABLE(dso, Index: srclib/apr/include/apr.h.in =================================================================== RCS file: /home/cvs/apr/include/apr.h.in,v retrieving revision 1.60 diff -u -r1.60 apr.h.in --- srclib/apr/include/apr.h.in 2000/12/22 16:54:50 1.60 +++ srclib/apr/include/apr.h.in 2000/12/29 19:00:51 @@ -86,6 +86,7 @@ #define APR_HAVE_MEMMOVE @have_memmove@ #define APR_HAVE_BZERO @have_bzero@ #define APR_HAVE_IPV6 @have_ipv6@ +#define APR_HAVE_GETPWNAM_R @have_getpwnam_r@ #if APR_HAVE_SYS_TYPES_H Index: srclib/apr/user/unix/homedir.c =================================================================== RCS file: /home/cvs/apr/user/unix/homedir.c,v retrieving revision 1.1 diff -u -r1.1 homedir.c --- srclib/apr/user/unix/homedir.c 2000/11/13 03:18:18 1.1 +++ srclib/apr/user/unix/homedir.c 2000/12/29 19:01:03 @@ -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) && HAVE_GETPWNAM_R if (!getpwnam_r(userid, &pwd, pwbuf, sizeof(pwbuf), &pw)) { #else if ((pw = getpwnam(userid)) != NULL) { Should I? Shouldn't I? (OK, possibly the last one should become simply "#if HAVE_GETPWNAM_R"). Cheers, Ben. -- http://www.apache-ssl.org/ben.html "There is no limit to what a man can do or how far he can go if he doesn't mind who gets the credit." - Robert Woodruff