threads/UnixWare - Mailing list pgsql-hackers

From Larry Rosenman
Subject threads/UnixWare
Date
Msg-id 77300000.1060302821@lerlaptop.lerctr.org
Whole thread Raw
Responses Re: threads/UnixWare
List pgsql-hackers
In src/port, we have in threads.c:

/** Wrapper around getpwuid() or getpwuid_r() to mimic POSIX getpwuid_r()* behaviour, if it is not available.*/
int
pqGetpwuid(uid_t uid, struct passwd * resultbuf, char *buffer,                  size_t buflen, struct passwd **
result)
{
#if defined(USE_THREADS) && defined(HAVE_GETPWUID_R)
       /*        * broken (well early POSIX draft) getpwuid_r() which returns 
'struct        * passwd *'        */       *result = getpwuid_r(uid, resultbuf, buffer, buflen);
#else       /* no getpwuid_r() available, just use getpwuid() */       *result = getpwuid(uid);
#endif       return (*result == NULL) ? -1 : 0;
}


Which BREAKS if you have the correct getpwuid_r() like UnixWare does.

Can someone help me with the configure checks/macros I need?
$ grep getpwuid_r /usr/include/pwd.h
int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **);
$




-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: LOCK.tag(figuring out granularity of lock)
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: new psql \d command