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:
parent
74e6d37276
commit
c9737310d5
16
configure
vendored
16
configure
vendored
@ -20494,8 +20494,7 @@ LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for ac_func in crypt erand48 getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul
|
||||||
for ac_func in crypt erand48 getopt getpeereid getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul
|
|
||||||
do
|
do
|
||||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||||
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
|
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||||||
@ -20607,16 +20606,25 @@ done
|
|||||||
case $host_os in
|
case $host_os in
|
||||||
|
|
||||||
# Windows uses a specialised env handler
|
# Windows uses a specialised env handler
|
||||||
|
# and doesn't need a replacement getpeereid because it doesn't use
|
||||||
|
# Unix sockets.
|
||||||
mingw*)
|
mingw*)
|
||||||
|
|
||||||
cat >>confdefs.h <<\_ACEOF
|
cat >>confdefs.h <<\_ACEOF
|
||||||
#define HAVE_UNSETENV 1
|
#define HAVE_UNSETENV 1
|
||||||
_ACEOF
|
_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
|
do
|
||||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||||
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
|
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||||||
|
10
configure.in
10
configure.in
@ -1311,16 +1311,20 @@ fi
|
|||||||
pgac_save_LIBS="$LIBS"
|
pgac_save_LIBS="$LIBS"
|
||||||
LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
|
LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
|
||||||
|
|
||||||
AC_REPLACE_FUNCS([crypt erand48 getopt getpeereid getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul])
|
AC_REPLACE_FUNCS([crypt erand48 getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul])
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
|
|
||||||
# Windows uses a specialised env handler
|
# Windows uses a specialised env handler
|
||||||
|
# and doesn't need a replacement getpeereid because it doesn't use
|
||||||
|
# Unix sockets.
|
||||||
mingw*)
|
mingw*)
|
||||||
AC_DEFINE(HAVE_UNSETENV, 1, [Define to 1 because replacement version used.])
|
AC_DEFINE(HAVE_UNSETENV, 1, [Define to 1 because replacement version used.])
|
||||||
ac_cv_func_unsetenv=yes;;
|
AC_DEFINE(HAVE_GETPEEREID, 1, [Define to 1 because function not required.])
|
||||||
|
ac_cv_func_unsetenv=yes
|
||||||
|
ac_cv_func_getpeereid=yes;;
|
||||||
*)
|
*)
|
||||||
AC_REPLACE_FUNCS([unsetenv])
|
AC_REPLACE_FUNCS([unsetenv getpeereid])
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user