Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 34ce6b4

Browse files
committed
Always test getpwuid_r because HEAD always uses *_r if it finds them.
Not an issue for 7.4.X.
1 parent aaf54d9 commit 34ce6b4

File tree

2 files changed

+63
-61
lines changed

2 files changed

+63
-61
lines changed

configure

+60-59
Original file line numberDiff line numberDiff line change
@@ -13247,65 +13247,6 @@ cat >>confdefs.h <<\_ACEOF
1324713247
#define GETPWUID_THREADSAFE 1
1324813248
_ACEOF
1324913249

13250-
else echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
13251-
echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
13252-
if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
13253-
echo $ECHO_N "(cached) $ECHO_C" >&6
13254-
else
13255-
cat >conftest.$ac_ext <<_ACEOF
13256-
#line $LINENO "configure"
13257-
#include "confdefs.h"
13258-
#include <sys/types.h>
13259-
#include <pwd.h>
13260-
#ifdef F77_DUMMY_MAIN
13261-
# ifdef __cplusplus
13262-
extern "C"
13263-
# endif
13264-
int F77_DUMMY_MAIN() { return 1; }
13265-
#endif
13266-
int
13267-
main ()
13268-
{
13269-
uid_t uid;
13270-
struct passwd *space;
13271-
char *buf;
13272-
size_t bufsize;
13273-
struct passwd **result;
13274-
getpwuid_r(uid, space, buf, bufsize, result);
13275-
;
13276-
return 0;
13277-
}
13278-
_ACEOF
13279-
rm -f conftest.$ac_objext
13280-
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13281-
(eval $ac_compile) 2>&5
13282-
ac_status=$?
13283-
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13284-
(exit $ac_status); } &&
13285-
{ ac_try='test -s conftest.$ac_objext'
13286-
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13287-
(eval $ac_try) 2>&5
13288-
ac_status=$?
13289-
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13290-
(exit $ac_status); }; }; then
13291-
pgac_func_getpwuid_r_5arg=yes
13292-
else
13293-
echo "$as_me: failed program was:" >&5
13294-
cat conftest.$ac_ext >&5
13295-
pgac_func_getpwuid_r_5arg=no
13296-
fi
13297-
rm -f conftest.$ac_objext conftest.$ac_ext
13298-
fi
13299-
echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
13300-
echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
13301-
if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
13302-
13303-
cat >>confdefs.h <<\_ACEOF
13304-
#define GETPWUID_R_5ARG
13305-
_ACEOF
13306-
13307-
fi
13308-
1330913250
fi
1331013251
if test "$enable_thread_safety" = yes -a "$GETHOSTBYNAME_THREADSAFE" = yes ; then
1331113252

@@ -13401,6 +13342,66 @@ done
1340113342
CFLAGS="$_CFLAGS"
1340213343
LIBS="$_LIBS"
1340313344

13345+
echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
13346+
echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
13347+
if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
13348+
echo $ECHO_N "(cached) $ECHO_C" >&6
13349+
else
13350+
cat >conftest.$ac_ext <<_ACEOF
13351+
#line $LINENO "configure"
13352+
#include "confdefs.h"
13353+
#include <sys/types.h>
13354+
#include <pwd.h>
13355+
#ifdef F77_DUMMY_MAIN
13356+
# ifdef __cplusplus
13357+
extern "C"
13358+
# endif
13359+
int F77_DUMMY_MAIN() { return 1; }
13360+
#endif
13361+
int
13362+
main ()
13363+
{
13364+
uid_t uid;
13365+
struct passwd *space;
13366+
char *buf;
13367+
size_t bufsize;
13368+
struct passwd **result;
13369+
getpwuid_r(uid, space, buf, bufsize, result);
13370+
;
13371+
return 0;
13372+
}
13373+
_ACEOF
13374+
rm -f conftest.$ac_objext
13375+
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13376+
(eval $ac_compile) 2>&5
13377+
ac_status=$?
13378+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13379+
(exit $ac_status); } &&
13380+
{ ac_try='test -s conftest.$ac_objext'
13381+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13382+
(eval $ac_try) 2>&5
13383+
ac_status=$?
13384+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13385+
(exit $ac_status); }; }; then
13386+
pgac_func_getpwuid_r_5arg=yes
13387+
else
13388+
echo "$as_me: failed program was:" >&5
13389+
cat conftest.$ac_ext >&5
13390+
pgac_func_getpwuid_r_5arg=no
13391+
fi
13392+
rm -f conftest.$ac_objext conftest.$ac_ext
13393+
fi
13394+
echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
13395+
echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
13396+
if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
13397+
13398+
cat >>confdefs.h <<\_ACEOF
13399+
#define GETPWUID_R_5ARG
13400+
_ACEOF
13401+
13402+
fi
13403+
13404+
1340413405
else
1340513406
# do not use values from template file
1340613407
THREAD_CPPFLAGS=

configure.in

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.320 2004/03/20 15:39:27 momjian Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.321 2004/03/20 16:11:22 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -999,7 +999,6 @@ AC_DEFINE(STRERROR_THREADSAFE, 1, [Define if strerror is not thread safe])
999999
fi
10001000
if test "$enable_thread_safety" = yes -a "$GETPWUID_THREADSAFE" = yes ; then
10011001
AC_DEFINE(GETPWUID_THREADSAFE, 1, [Define if getpwuid is not thread safe])
1002-
else PGAC_FUNC_GETPWUID_R_5ARG
10031002
fi
10041003
if test "$enable_thread_safety" = yes -a "$GETHOSTBYNAME_THREADSAFE" = yes ; then
10051004
AC_DEFINE(GETHOSTBYNAME_THREADSAFE, 1, [Define if gethostbyname is not thread safe])
@@ -1014,6 +1013,8 @@ AC_CHECK_FUNCS([strerror_r getpwuid_r gethostbyname_r])
10141013
CFLAGS="$_CFLAGS"
10151014
LIBS="$_LIBS"
10161015

1016+
PGAC_FUNC_GETPWUID_R_5ARG
1017+
10171018
else
10181019
# do not use values from template file
10191020
THREAD_CPPFLAGS=

0 commit comments

Comments
 (0)