mirror of
https://github.com/postgres/postgres.git
synced 2025-10-16 17:07:43 +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:
@@ -43,6 +43,9 @@
|
||||
(--enable-thread-safety) */
|
||||
#undef ENABLE_THREAD_SAFETY
|
||||
|
||||
/* Define to 1 if getpwuid_r() takes a 5th argument. */
|
||||
#undef GETPWUID_R_5ARG
|
||||
|
||||
/* Define to 1 if gettimeofday() takes only 1 argument. */
|
||||
#undef GETTIMEOFDAY_1ARG
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||
*
|
||||
* $Id: thread.c,v 1.12.2.3 2004/03/14 14:01:54 momjian Exp $
|
||||
* $Id: thread.c,v 1.12.2.4 2004/03/20 15:39:40 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -107,14 +107,17 @@ pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer,
|
||||
size_t buflen, struct passwd **result)
|
||||
{
|
||||
#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)
|
||||
* 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
|
||||
|
||||
#if defined(FRONTEND) && defined(ENABLE_THREAD_SAFETY) && defined(NEED_REENTRANT_FUNCS) && !defined(HAVE_GETPWUID_R)
|
||||
|
Reference in New Issue
Block a user