1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-23 03:21:12 +03:00

Handle draft version of getpwuid_r() that accepts only four arguments.

Backpatch to 7.4.X.  Required for Solaris 7 & 8.
This commit is contained in:
Bruce Momjian
2004-03-20 15:39:27 +00:00
parent 6c7e6d2baa
commit aaf54d99f0
5 changed files with 96 additions and 6 deletions

View File

@ -7,7 +7,7 @@
*
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/port/thread.c,v 1.17 2004/03/14 14:01:43 momjian Exp $
* $PostgreSQL: pgsql/src/port/thread.c,v 1.18 2004/03/20 15:39:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -97,13 +97,17 @@ pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer,
size_t buflen, struct passwd **result)
{
#if defined(FRONTEND) && defined(ENABLE_THREAD_SAFETY) && 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)
* Do we need to support it? bjm 2003-08-14
*/
/* POSIX version */
getpwuid_r(uid, resultbuf, buffer, buflen, result);
result = getpwuid_r(uid, resultbuf, buffer, buflen);
#endif
#else