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

Commitaa7dbd0

Browse files
committed
Had configure check for strdup, but didn't have it set HAVE_STRDUP
Fixed
1 parenta5494a2 commitaa7dbd0

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed

‎src/configure‎

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3102,20 +3102,23 @@ fi
31023102

31033103
ifeval"test\"`echo'$ac_cv_func_'strdup`\" = yes";then
31043104
echo"$ac_t""yes"1>&6
3105-
STRDUP='../../utils/strdup.o'
3105+
STRDUP='../../utils/strdup.o' cat>> confdefs.h<<\EOF
3106+
#define HAVE_STRDUP 1
3107+
EOF
3108+
31063109
else
31073110
echo"$ac_t""no"1>&6
31083111
fi
31093112

31103113

31113114

31123115
echo$ac_n"checking for cbrt""...$ac_c"1>&6
3113-
echo"configure:3114: checking for cbrt">&5
3116+
echo"configure:3117: checking for cbrt">&5
31143117
ifeval"test\"`echo'$''{'ac_cv_func_cbrt'+set}'`\" = set";then
31153118
echo$ac_n"(cached)$ac_c"1>&6
31163119
else
31173120
cat> conftest.$ac_ext<<EOF
3118-
#line3119 "configure"
3121+
#line3122 "configure"
31193122
#include "confdefs.h"
31203123
/* System header to define __stub macros and hopefully few prototypes,
31213124
which can conflict with char cbrt(); below. */
@@ -3138,7 +3141,7 @@ cbrt();
31383141
31393142
; return 0; }
31403143
EOF
3141-
if { (evalecho configure:3142:\"$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
31423145
rm -rf conftest*
31433146
eval"ac_cv_func_cbrt=yes"
31443147
else
@@ -3159,15 +3162,15 @@ EOF
31593162
else
31603163
echo"$ac_t""no"1>&6
31613164
echo$ac_n"checking for cbrt in -lm""...$ac_c"1>&6
3162-
echo"configure:3163: checking for cbrt in -lm">&5
3165+
echo"configure:3166: checking for cbrt in -lm">&5
31633166
ac_lib_var=`echo m'_'cbrt| sed'y%./+-%__p_%'`
31643167
ifeval"test\"`echo'$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set";then
31653168
echo$ac_n"(cached)$ac_c"1>&6
31663169
else
31673170
ac_save_LIBS="$LIBS"
31683171
LIBS="-lm$LIBS"
31693172
cat> conftest.$ac_ext<<EOF
3170-
#line3171 "configure"
3173+
#line3174 "configure"
31713174
#include "confdefs.h"
31723175
/* Override any gcc2 internal prototype to avoid an error. */
31733176
/* We use char because int might match the return type of a gcc2
@@ -3178,7 +3181,7 @@ int main() {
31783181
cbrt()
31793182
; return 0; }
31803183
EOF
3181-
if { (evalecho configure:3182:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3184+
if { (evalecho configure:3185:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
31823185
rm -rf conftest*
31833186
eval"ac_cv_lib_$ac_lib_var=yes"
31843187
else
@@ -3204,12 +3207,12 @@ fi
32043207
fi
32053208

32063209
echo$ac_n"checking for rint""...$ac_c"1>&6
3207-
echo"configure:3208: checking for rint">&5
3210+
echo"configure:3211: checking for rint">&5
32083211
ifeval"test\"`echo'$''{'ac_cv_func_rint'+set}'`\" = set";then
32093212
echo$ac_n"(cached)$ac_c"1>&6
32103213
else
32113214
cat> conftest.$ac_ext<<EOF
3212-
#line3213 "configure"
3215+
#line3216 "configure"
32133216
#include "confdefs.h"
32143217
/* System header to define __stub macros and hopefully few prototypes,
32153218
which can conflict with char rint(); below. */
@@ -3232,7 +3235,7 @@ rint();
32323235
32333236
; return 0; }
32343237
EOF
3235-
if { (evalecho configure:3236:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3238+
if { (evalecho configure:3239:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
32363239
rm -rf conftest*
32373240
eval"ac_cv_func_rint=yes"
32383241
else
@@ -3253,15 +3256,15 @@ EOF
32533256
else
32543257
echo"$ac_t""no"1>&6
32553258
echo$ac_n"checking for rint in -lm""...$ac_c"1>&6
3256-
echo"configure:3257: checking for rint in -lm">&5
3259+
echo"configure:3260: checking for rint in -lm">&5
32573260
ac_lib_var=`echo m'_'rint| sed'y%./+-%__p_%'`
32583261
ifeval"test\"`echo'$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set";then
32593262
echo$ac_n"(cached)$ac_c"1>&6
32603263
else
32613264
ac_save_LIBS="$LIBS"
32623265
LIBS="-lm$LIBS"
32633266
cat> conftest.$ac_ext<<EOF
3264-
#line3265 "configure"
3267+
#line3268 "configure"
32653268
#include "confdefs.h"
32663269
/* Override any gcc2 internal prototype to avoid an error. */
32673270
/* We use char because int might match the return type of a gcc2
@@ -3272,7 +3275,7 @@ int main() {
32723275
rint()
32733276
; return 0; }
32743277
EOF
3275-
if { (evalecho configure:3276:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3278+
if { (evalecho configure:3279:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
32763279
rm -rf conftest*
32773280
eval"ac_cv_lib_$ac_lib_var=yes"
32783281
else

‎src/configure.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ AC_FUNC_VPRINTF
159159
AC_CHECK_FUNCS(isinf tzset getrusage vfork memmove sigsetjmp kill sysconf)
160160
AC_CHECK_FUNCS(sigprocmask waitpid setsid)
161161
AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON), INET_ATON='inet_aton.o')
162-
AC_CHECK_FUNC(strdup, STRDUP='../../utils/strdup.o')
162+
AC_CHECK_FUNC(strdup,[STRDUP='../../utils/strdup.o' AC_DEFINE(HAVE_STRDUP)])
163163
AC_SUBST(INET_ATON)
164164
AC_SUBST(STRDUP)
165165
AC_CHECK_FUNC(cbrt, AC_DEFINE(HAVE_CBRT), AC_CHECK_LIB(m, cbrt, AC_DEFINE(HAVE_CBRT)))

‎src/include/config.h.in‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@
8080
/* Set to 1 if you have sigprocmask() */
8181
#undef HAVE_SIGPROCMASK
8282

83+
/* Set to 1 if you have strdup() */
84+
#undef HAVE_STRDUP
85+
8386
/* Set to 1 if you have libreadline.a */
8487
#undef HAVE_LIBREADLINE
8588

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp