Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5c70cc8

Browse files
committed
Don't build replacement getpeereid function on mingw.
Windows doesn't have Unix sockets, so it's not needed, and moreover causes compile warnings.
1 parentcd28f09 commit5c70cc8

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

‎configure

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20423,8 +20423,7 @@ LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
2042320423

2042420424

2042520425

20426-
20427-
for ac_func in crypt erand48 getopt getpeereid getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul
20426+
for ac_func in crypt erand48 getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul
2042820427
do
2042920428
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
2043020429
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -20536,16 +20535,25 @@ done
2053620535
case $host_os in
2053720536

2053820537
# Windows uses a specialised env handler
20538+
# and doesn't need a replacement getpeereid because it doesn't use
20539+
# Unix sockets.
2053920540
mingw*)
2054020541

2054120542
cat >>confdefs.h <<\_ACEOF
2054220543
#define HAVE_UNSETENV 1
2054320544
_ACEOF
2054420545

20545-
ac_cv_func_unsetenv=yes;;
20546+
20547+
cat >>confdefs.h <<\_ACEOF
20548+
#define HAVE_GETPEEREID 1
20549+
_ACEOF
20550+
20551+
ac_cv_func_unsetenv=yes
20552+
ac_cv_func_getpeereid=yes;;
2054620553
*)
2054720554

20548-
for ac_func in unsetenv
20555+
20556+
for ac_func in unsetenv getpeereid
2054920557
do
2055020558
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
2055120559
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5

‎configure.in

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,16 +1310,20 @@ fi
13101310
pgac_save_LIBS="$LIBS"
13111311
LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
13121312

1313-
AC_REPLACE_FUNCS([crypt erand48 getoptgetpeereidgetrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul])
1313+
AC_REPLACE_FUNCS([crypt erand48 getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul])
13141314

13151315
case $host_os in
13161316

13171317
# Windows uses a specialised env handler
1318+
# and doesn't need a replacement getpeereid because it doesn't use
1319+
# Unix sockets.
13181320
mingw*)
13191321
AC_DEFINE(HAVE_UNSETENV, 1, [Define to 1 because replacement version used.])
1320-
ac_cv_func_unsetenv=yes;;
1322+
AC_DEFINE(HAVE_GETPEEREID, 1, [Define to 1 because function not required.])
1323+
ac_cv_func_unsetenv=yes
1324+
ac_cv_func_getpeereid=yes;;
13211325
*)
1322-
AC_REPLACE_FUNCS([unsetenv])
1326+
AC_REPLACE_FUNCS([unsetenv getpeereid])
13231327
;;
13241328
esac
13251329

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp