Hi. I'm trying to build 7.4.3 on Solaris 9/Intel (gcc 3.2.2), and I get
the following:
========================================================================
================
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -fPIC -I. -I../../../src/include -D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS -DFRONTEND
-DSYSCONFDIR='"/home/dparker/servers/install/i386/etc/postgresql"' -c
-o thread.o thread.c
thread.c: In function `pqGetpwuid':
thread.c:119: too few arguments to function `getpwuid_r'
========================================================================
================
This is the code from thread.c:
========================================================================
================
#if defined(FRONTEND) && defined(ENABLE_THREAD_SAFETY) &&
defined(NEED_REENTRANT_FUNCS) && defined(HAVE_GETPWUID_R)
#ifdef GETPWUID_R_5ARG
/* POSIX version */
getpwuid_r(uid, resultbuf, buffer, buflen, result);
#else
/*
* Early POSIX draft of getpwuid_r() returns 'struct passwd *'.
* getpwuid_r(uid, resultbuf, buffer, buflen)
*/
*result = getpwuid_r(uid, resultbuf, buffer, buflen);
#endif
#else
========================================================================
================
The check for getpwuid_r in configure appeared to work OK, but it looks
like the POSIX version of getpwuid_r is not being called. Is there some
other switch I need to pass to configure to get that GETPWUID_R_5ARG
defined? This is what I get in pg_config.h:
========================================================================
================
/* Define to 1 to build client libraries as thread-safe code.
(--enable-thread-safety) */
#define ENABLE_THREAD_SAFETY 1
/* Define to 1 if getpwuid_r() takes a 5th argument. */
/* #undef GETPWUID_R_5ARG */
========================================================================
================
Thanks. Any clues appreciated.
- DAP
======================================================
David Parker Tazz Networks (401) 709-5130