diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2015-01-11 12:52:37 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2015-01-11 12:52:37 -0500 |
commit | 8883bae33b55a52105b1b58d0e42c5a6bda09627 (patch) | |
tree | 38347301a5059dd9557cac21d1f60ff386453fba /src/port/thread.c | |
parent | 080eabe2e8a184ff40b7380aaaa9418714acace9 (diff) | |
download | postgresql-8883bae33b55a52105b1b58d0e42c5a6bda09627.tar.gz postgresql-8883bae33b55a52105b1b58d0e42c5a6bda09627.zip |
Remove configure test for nonstandard variants of getpwuid_r().
We had code that supposed that some platforms might offer a nonstandard
version of getpwuid_r() with only four arguments. However, the 5-argument
definition has been standardized at least since the Single Unix Spec v2,
which is our normal reference for what's portable across all Unix-oid
platforms. (What's more, this wasn't the only pre-standardization version
of getpwuid_r(); my old HPUX 10.20 box has still another signature.)
So let's just get rid of the now-useless configure step.
Diffstat (limited to 'src/port/thread.c')
-rw-r--r-- | src/port/thread.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/port/thread.c b/src/port/thread.c index aab74516ac9..c1295cfc1f6 100644 --- a/src/port/thread.c +++ b/src/port/thread.c @@ -82,7 +82,7 @@ pqStrerror(int errnum, char *strerrbuf, size_t buflen) /* * Wrapper around getpwuid() or getpwuid_r() to mimic POSIX getpwuid_r() - * behaviour, if it is not available or required. + * behaviour, if that function is not available or required. * * Per POSIX, the possible cases are: * success: returns zero, *result is non-NULL @@ -96,22 +96,8 @@ 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 */ return getpwuid_r(uid, resultbuf, buffer, buflen, result); #else - - /* - * Early POSIX draft of getpwuid_r() returns 'struct passwd *'. - * getpwuid_r(uid, resultbuf, buffer, buflen) - */ - errno = 0; - *result = getpwuid_r(uid, resultbuf, buffer, buflen); - /* paranoia: ensure we return zero on success */ - return (*result == NULL) ? errno : 0; -#endif -#else /* no getpwuid_r() available, just use getpwuid() */ errno = 0; *result = getpwuid(uid); |