summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2004-03-20 15:39:27 +0000
committerBruce Momjian <bruce@momjian.us>2004-03-20 15:39:27 +0000
commitaaf54d99f0c2492a64118fa50e5b6dcfa8116e69 (patch)
tree211f3e3a422820f00bde2cda32bbc71abf595e24 /config
parent6c7e6d2baa509cb71f46b323191194a88745e7d3 (diff)
downloadpostgresql-aaf54d99f0c2492a64118fa50e5b6dcfa8116e69.tar.gz
Handle draft version of getpwuid_r() that accepts only four arguments.
Backpatch to 7.4.X. Required for Solaris 7 & 8.
Diffstat (limited to 'config')
-rw-r--r--config/c-library.m425
1 files changed, 24 insertions, 1 deletions
diff --git a/config/c-library.m4 b/config/c-library.m4
index 8368dfb8f4..f9a09c2cce 100644
--- a/config/c-library.m4
+++ b/config/c-library.m4
@@ -1,5 +1,5 @@
# Macros that test various C library quirks
-# $PostgreSQL: pgsql/config/c-library.m4,v 1.24 2003/11/29 19:51:17 pgsql Exp $
+# $PostgreSQL: pgsql/config/c-library.m4,v 1.25 2004/03/20 15:39:27 momjian Exp $
# PGAC_VAR_INT_TIMEZONE
@@ -73,6 +73,29 @@ 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_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_func_getpwuid_r_5arg=yes],
+[pgac_func_getpwuid_r_5arg=no])])
+if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
+ AC_DEFINE(GETPWUID_R_5ARG,, [Define to 1 if getpwuid_r() takes a 5th argument.])
+fi
+])# PGAC_FUNC_GETPWUID_R_5ARG
+
+
# PGAC_UNION_SEMUN
# ----------------
# Check if `union semun' exists. Define HAVE_UNION_SEMUN if so.