1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Don't build replacement getpeereid function on mingw.

Windows doesn't have Unix sockets, so it's not needed, and moreover causes compile warnings.
This commit is contained in:
Andrew Dunstan
2011-07-25 23:46:52 -04:00
parent cd28f09577
commit 5c70cc890d
2 changed files with 19 additions and 7 deletions

16
configure vendored
View File

@ -20423,8 +20423,7 @@ LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
for ac_func in crypt erand48 getopt getpeereid getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul
for ac_func in crypt erand48 getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul
do
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@ -20536,16 +20535,25 @@ done
case $host_os in
# Windows uses a specialised env handler
# and doesn't need a replacement getpeereid because it doesn't use
# Unix sockets.
mingw*)
cat >>confdefs.h <<\_ACEOF
#define HAVE_UNSETENV 1
_ACEOF
ac_cv_func_unsetenv=yes;;
cat >>confdefs.h <<\_ACEOF
#define HAVE_GETPEEREID 1
_ACEOF
ac_cv_func_unsetenv=yes
ac_cv_func_getpeereid=yes;;
*)
for ac_func in unsetenv
for ac_func in unsetenv getpeereid
do
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5