diff --git a/config/c-library.m4 b/config/c-library.m4
index f40db6a1ee7ad9a165d714a9c69aaf6f1b761bd7..933d95e8efadc478ac1d62810b2bc695489bb344 100644
--- a/config/c-library.m4
+++ b/config/c-library.m4
@@ -79,30 +79,6 @@ AH_VERBATIM(GETTIMEOFDAY_1ARG_,
 ])# PGAC_FUNC_GETTIMEOFDAY_1ARG
 
 
-# PGAC_FUNC_GETPWUID_R_5ARG
-# ---------------------------
-# Check if getpwuid_r() takes a fifth argument (later POSIX standard, not draft version)
-# If so, define GETPWUID_R_5ARG
-AC_DEFUN([PGAC_FUNC_GETPWUID_R_5ARG],
-[AC_CACHE_CHECK(whether getpwuid_r takes a fifth argument,
-pgac_cv_func_getpwuid_r_5arg,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <pwd.h>],
-[uid_t uid;
-struct passwd *space;
-char *buf;
-size_t bufsize;
-struct passwd **result;
-getpwuid_r(uid, space, buf, bufsize, result);],
-[pgac_cv_func_getpwuid_r_5arg=yes],
-[pgac_cv_func_getpwuid_r_5arg=no])])
-if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
-  AC_DEFINE(GETPWUID_R_5ARG, 1,
-            [Define to 1 if getpwuid_r() takes a 5th argument.])
-fi
-])# PGAC_FUNC_GETPWUID_R_5ARG
-
-
 # PGAC_FUNC_STRERROR_R_INT
 # ---------------------------
 # Check if strerror_r() returns an int (SUSv3) rather than a char * (GNU libc)
diff --git a/configure b/configure
index fce49088a84b5b9a3db6f7292a2f8279ca47819c..f32b38149af66b4e039f5613ed8db5b1adf66b21 100755
--- a/configure
+++ b/configure
@@ -12632,43 +12632,6 @@ done
 
 
 # Do test here with the proper thread flags
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpwuid_r takes a fifth argument" >&5
-$as_echo_n "checking whether getpwuid_r takes a fifth argument... " >&6; }
-if ${pgac_cv_func_getpwuid_r_5arg+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <pwd.h>
-int
-main ()
-{
-uid_t uid;
-struct passwd *space;
-char *buf;
-size_t bufsize;
-struct passwd **result;
-getpwuid_r(uid, space, buf, bufsize, result);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  pgac_cv_func_getpwuid_r_5arg=yes
-else
-  pgac_cv_func_getpwuid_r_5arg=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_getpwuid_r_5arg" >&5
-$as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
-if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
-
-$as_echo "#define GETPWUID_R_5ARG 1" >>confdefs.h
-
-fi
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
 $as_echo_n "checking whether strerror_r returns int... " >&6; }
 if ${pgac_cv_func_strerror_r_int+:} false; then :
diff --git a/configure.in b/configure.in
index 6aa69fb19fe38ce61ff7eea043f1f04f16f6e143..56d1967eb45007dde50b380a7af93e77c7f1f5e0 100644
--- a/configure.in
+++ b/configure.in
@@ -1527,7 +1527,6 @@ fi
 AC_CHECK_FUNCS([strerror_r getpwuid_r gethostbyname_r])
 
 # Do test here with the proper thread flags
-PGAC_FUNC_GETPWUID_R_5ARG
 PGAC_FUNC_STRERROR_R_INT
 
 CFLAGS="$_CFLAGS"
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in
index 83f04e9382117000500dbf723b2749f821f51a02..995fb65205c9ca3bd681db48fcde8d9e0c1d860b 100644
--- a/src/include/pg_config.h.in
+++ b/src/include/pg_config.h.in
@@ -74,9 +74,6 @@
    reference if 'false' */
 #undef FLOAT8PASSBYVAL
 
-/* 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
 
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32
index 05941e657743e06b49d29fc2839033260d033200..69d0e31a07154e2221ef31c3882272569cd1c3bd 100644
--- a/src/include/pg_config.h.win32
+++ b/src/include/pg_config.h.win32
@@ -62,9 +62,6 @@
    (--enable-thread-safety) */
 #define ENABLE_THREAD_SAFETY 1
 
-/* 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 */
 
diff --git a/src/port/thread.c b/src/port/thread.c
index aab74516ac9626d2f0ecee0473e4b9dd412e7918..c1295cfc1f6749bdf9121274b00fa4accd4e03e7 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,21 +96,7 @@ 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;