1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +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

@ -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.