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

Commit4506116

Browse files
committed
Add in appropriate checks for inet_aton, and modifications to backend/port/Makefile
to include inet_aton.c if required
1 parent50b618a commit4506116

File tree

3 files changed

+74
-15
lines changed

3 files changed

+74
-15
lines changed

‎src/configure

Lines changed: 68 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2925,13 +2925,66 @@ else
29252925
fi
29262926
done
29272927

2928+
echo$ac_n"checking for inet_aton""...$ac_c"1>&6
2929+
echo"configure:2930: checking for inet_aton">&5
2930+
ifeval"test\"`echo'$''{'ac_cv_func_inet_aton'+set}'`\" = set";then
2931+
echo$ac_n"(cached)$ac_c"1>&6
2932+
else
2933+
cat> conftest.$ac_ext<<EOF
2934+
#line 2935 "configure"
2935+
#include "confdefs.h"
2936+
/* System header to define __stub macros and hopefully few prototypes,
2937+
which can conflict with char inet_aton(); below. */
2938+
#include <assert.h>
2939+
/* Override any gcc2 internal prototype to avoid an error. */
2940+
/* We use char because int might match the return type of a gcc2
2941+
builtin and then its argument prototype would still apply. */
2942+
char inet_aton();
2943+
2944+
int main() {
2945+
2946+
/* The GNU C library defines this for functions which it implements
2947+
to always fail with ENOSYS. Some functions are actually named
2948+
something starting with __ and the normal name is an alias. */
2949+
#if defined (__stub_inet_aton) || defined (__stub___inet_aton)
2950+
choke me
2951+
#else
2952+
inet_aton();
2953+
#endif
2954+
2955+
; return 0; }
2956+
EOF
2957+
if { (evalecho configure:2958:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
2958+
rm -rf conftest*
2959+
eval"ac_cv_func_inet_aton=yes"
2960+
else
2961+
echo"configure: failed program was:">&5
2962+
cat conftest.$ac_ext>&5
2963+
rm -rf conftest*
2964+
eval"ac_cv_func_inet_aton=no"
2965+
fi
2966+
rm -f conftest*
2967+
fi
2968+
2969+
ifeval"test\"`echo'$ac_cv_func_'inet_aton`\" = yes";then
2970+
echo"$ac_t""yes"1>&6
2971+
cat>> confdefs.h<<\EOF
2972+
#define HAVE_INET_ATON 1
2973+
EOF
2974+
2975+
else
2976+
echo"$ac_t""no"1>&6
2977+
INET_ATON='inet_aton.o'
2978+
fi
2979+
2980+
29282981
echo$ac_n"checking for cbrt""...$ac_c"1>&6
2929-
echo"configure:2930: checking for cbrt">&5
2982+
echo"configure:2983: checking for cbrt">&5
29302983
ifeval"test\"`echo'$''{'ac_cv_func_cbrt'+set}'`\" = set";then
29312984
echo$ac_n"(cached)$ac_c"1>&6
29322985
else
29332986
cat> conftest.$ac_ext<<EOF
2934-
#line2935 "configure"
2987+
#line2988 "configure"
29352988
#include "confdefs.h"
29362989
/* System header to define __stub macros and hopefully few prototypes,
29372990
which can conflict with char cbrt(); below. */
@@ -2954,7 +3007,7 @@ cbrt();
29543007
29553008
; return 0; }
29563009
EOF
2957-
if { (evalecho configure:2958:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3010+
if { (evalecho configure:3011:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
29583011
rm -rf conftest*
29593012
eval"ac_cv_func_cbrt=yes"
29603013
else
@@ -2975,15 +3028,15 @@ EOF
29753028
else
29763029
echo"$ac_t""no"1>&6
29773030
echo$ac_n"checking for cbrt in -lm""...$ac_c"1>&6
2978-
echo"configure:2979: checking for cbrt in -lm">&5
3031+
echo"configure:3032: checking for cbrt in -lm">&5
29793032
ac_lib_var=`echo m'_'cbrt| sed'y%./+-%__p_%'`
29803033
ifeval"test\"`echo'$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set";then
29813034
echo$ac_n"(cached)$ac_c"1>&6
29823035
else
29833036
ac_save_LIBS="$LIBS"
29843037
LIBS="-lm$LIBS"
29853038
cat> conftest.$ac_ext<<EOF
2986-
#line2987 "configure"
3039+
#line3040 "configure"
29873040
#include "confdefs.h"
29883041
/* Override any gcc2 internal prototype to avoid an error. */
29893042
/* We use char because int might match the return type of a gcc2
@@ -2994,7 +3047,7 @@ int main() {
29943047
cbrt()
29953048
; return 0; }
29963049
EOF
2997-
if { (evalecho configure:2998:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3050+
if { (evalecho configure:3051:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
29983051
rm -rf conftest*
29993052
eval"ac_cv_lib_$ac_lib_var=yes"
30003053
else
@@ -3020,12 +3073,12 @@ fi
30203073
fi
30213074

30223075
echo$ac_n"checking for rint""...$ac_c"1>&6
3023-
echo"configure:3024: checking for rint">&5
3076+
echo"configure:3077: checking for rint">&5
30243077
ifeval"test\"`echo'$''{'ac_cv_func_rint'+set}'`\" = set";then
30253078
echo$ac_n"(cached)$ac_c"1>&6
30263079
else
30273080
cat> conftest.$ac_ext<<EOF
3028-
#line3029 "configure"
3081+
#line3082 "configure"
30293082
#include "confdefs.h"
30303083
/* System header to define __stub macros and hopefully few prototypes,
30313084
which can conflict with char rint(); below. */
@@ -3048,7 +3101,7 @@ rint();
30483101
30493102
; return 0; }
30503103
EOF
3051-
if { (evalecho configure:3052:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3104+
if { (evalecho configure:3105:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
30523105
rm -rf conftest*
30533106
eval"ac_cv_func_rint=yes"
30543107
else
@@ -3069,15 +3122,15 @@ EOF
30693122
else
30703123
echo"$ac_t""no"1>&6
30713124
echo$ac_n"checking for rint in -lm""...$ac_c"1>&6
3072-
echo"configure:3073: checking for rint in -lm">&5
3125+
echo"configure:3126: checking for rint in -lm">&5
30733126
ac_lib_var=`echo m'_'rint| sed'y%./+-%__p_%'`
30743127
ifeval"test\"`echo'$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set";then
30753128
echo$ac_n"(cached)$ac_c"1>&6
30763129
else
30773130
ac_save_LIBS="$LIBS"
30783131
LIBS="-lm$LIBS"
30793132
cat> conftest.$ac_ext<<EOF
3080-
#line3081 "configure"
3133+
#line3134 "configure"
30813134
#include "confdefs.h"
30823135
/* Override any gcc2 internal prototype to avoid an error. */
30833136
/* We use char because int might match the return type of a gcc2
@@ -3088,7 +3141,7 @@ int main() {
30883141
rint()
30893142
; return 0; }
30903143
EOF
3091-
if { (evalecho configure:3092:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3144+
if { (evalecho configure:3145:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
30923145
rm -rf conftest*
30933146
eval"ac_cv_lib_$ac_lib_var=yes"
30943147
else
@@ -3214,7 +3267,7 @@ done
32143267
32153268
ac_given_srcdir=$srcdir
32163269
3217-
trap 'rm -fr`echo"GNUmakefile Makefile.global include/config.h"| sed"s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3270+
trap 'rm -fr`echo"GNUmakefile Makefile.globalbackend/port/Makefileinclude/config.h"| sed"s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
32183271
EOF
32193272
cat>>$CONFIG_STATUS<<EOF
32203273
@@ -3273,6 +3326,7 @@ s%@xargs@%$xargs%g
32733326
s%@ipcs@%$ipcs%g
32743327
s%@ipcrm@%$ipcrm%g
32753328
s%@LIBOBJS@%$LIBOBJS%g
3329+
s%@INET_ATON@%$INET_ATON%g
32763330
32773331
CEOF
32783332
EOF
@@ -3314,7 +3368,7 @@ EOF
33143368

33153369
cat>>$CONFIG_STATUS<<EOF
33163370
3317-
CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile Makefile.global"}
3371+
CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile Makefile.global backend/port/Makefile"}
33183372
EOF
33193373
cat>>$CONFIG_STATUS<<\EOF
33203374
for ac_file in ..$CONFIG_FILES; do if test "x$ac_file" != x..; then

‎src/configure.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ AC_FUNC_MEMCMP
149149
AC_TYPE_SIGNAL
150150
AC_FUNC_VPRINTF
151151
AC_CHECK_FUNCS(isinf tzset getrusage vfork memmove sigsetjmp kill sysconf)
152+
AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON), INET_ATON='inet_aton.o')
153+
AC_SUBST(INET_ATON)
152154
AC_CHECK_FUNC(cbrt, AC_DEFINE(HAVE_CBRT), AC_CHECK_LIB(m, cbrt, AC_DEFINE(HAVE_CBRT)))
153155
AC_CHECK_FUNC(rint, AC_DEFINE(HAVE_RINT), AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT)))
154156

155-
AC_OUTPUT(GNUmakefile Makefile.global)
157+
AC_OUTPUT(GNUmakefile Makefile.global backend/port/Makefile)

‎src/include/config.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
/* Set to 1 if you have cbrt() */
4545
#undef HAVE_CBRT
4646

47+
/* Set to 1 if you have cbrt() */
48+
#undef HAVE_INET_ATON
49+
4750
/* Set to 1 if you have rint() */
4851
#undef HAVE_RINT
4952

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp