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

Commitceac1d5

Browse files
committed
Only need to check for strerror once :)
1 parented7a17d commitceac1d5

File tree

2 files changed

+20
-73
lines changed

2 files changed

+20
-73
lines changed

‎src/configure

Lines changed: 19 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -3622,68 +3622,16 @@ EOF
36223622

36233623
else
36243624
echo"$ac_t""no"1>&6
3625-
STRERROR='strerror.o'
3626-
fi
3627-
3628-
echo$ac_n"checking for strerror""...$ac_c"1>&6
3629-
echo"configure:3630: checking for strerror">&5
3630-
ifeval"test\"`echo'$''{'ac_cv_func_strerror'+set}'`\" = set";then
3631-
echo$ac_n"(cached)$ac_c"1>&6
3632-
else
3633-
cat> conftest.$ac_ext<<EOF
3634-
#line 3635 "configure"
3635-
#include "confdefs.h"
3636-
/* System header to define __stub macros and hopefully few prototypes,
3637-
which can conflict with char strerror(); below. */
3638-
#include <assert.h>
3639-
/* Override any gcc2 internal prototype to avoid an error. */
3640-
/* We use char because int might match the return type of a gcc2
3641-
builtin and then its argument prototype would still apply. */
3642-
char strerror();
3643-
3644-
int main() {
3645-
3646-
/* The GNU C library defines this for functions which it implements
3647-
to always fail with ENOSYS. Some functions are actually named
3648-
something starting with __ and the normal name is an alias. */
3649-
#if defined (__stub_strerror) || defined (__stub___strerror)
3650-
choke me
3651-
#else
3652-
strerror();
3653-
#endif
3654-
3655-
; return 0; }
3656-
EOF
3657-
if { (evalecho configure:3658:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3658-
rm -rf conftest*
3659-
eval"ac_cv_func_strerror=yes"
3660-
else
3661-
echo"configure: failed program was:">&5
3662-
cat conftest.$ac_ext>&5
3663-
rm -rf conftest*
3664-
eval"ac_cv_func_strerror=no"
3665-
fi
3666-
rm -f conftest*
3667-
fi
3668-
3669-
ifeval"test\"`echo'$ac_cv_func_'strerror`\" = yes";then
3670-
echo"$ac_t""yes"1>&6
3671-
cat>> confdefs.h<<\EOF
3672-
#define HAVE_STRERROR 1
3673-
EOF
3674-
3675-
else
3676-
echo"$ac_t""no"1>&6
3677-
STRERROR2='../../backend/port/strerror.o'
3625+
STRERROR='strerror.o' STRERROR2='../../backend/port/strerror.o'
36783626
fi
36793627

36803628
echo$ac_n"checking for strdup""...$ac_c"1>&6
3681-
echo"configure:3682: checking for strdup">&5
3629+
echo"configure:3630: checking for strdup">&5
36823630
ifeval"test\"`echo'$''{'ac_cv_func_strdup'+set}'`\" = set";then
36833631
echo$ac_n"(cached)$ac_c"1>&6
36843632
else
36853633
cat> conftest.$ac_ext<<EOF
3686-
#line3687 "configure"
3634+
#line3635 "configure"
36873635
#include "confdefs.h"
36883636
/* System header to define __stub macros and hopefully few prototypes,
36893637
which can conflict with char strdup(); below. */
@@ -3706,7 +3654,7 @@ strdup();
37063654
37073655
; return 0; }
37083656
EOF
3709-
if { (evalecho configure:3710:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3657+
if { (evalecho configure:3658:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
37103658
rm -rf conftest*
37113659
eval"ac_cv_func_strdup=yes"
37123660
else
@@ -3734,12 +3682,12 @@ fi
37343682

37353683

37363684
echo$ac_n"checking for cbrt""...$ac_c"1>&6
3737-
echo"configure:3738: checking for cbrt">&5
3685+
echo"configure:3686: checking for cbrt">&5
37383686
ifeval"test\"`echo'$''{'ac_cv_func_cbrt'+set}'`\" = set";then
37393687
echo$ac_n"(cached)$ac_c"1>&6
37403688
else
37413689
cat> conftest.$ac_ext<<EOF
3742-
#line3743 "configure"
3690+
#line3691 "configure"
37433691
#include "confdefs.h"
37443692
/* System header to define __stub macros and hopefully few prototypes,
37453693
which can conflict with char cbrt(); below. */
@@ -3762,7 +3710,7 @@ cbrt();
37623710
37633711
; return 0; }
37643712
EOF
3765-
if { (evalecho configure:3766:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3713+
if { (evalecho configure:3714:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
37663714
rm -rf conftest*
37673715
eval"ac_cv_func_cbrt=yes"
37683716
else
@@ -3783,15 +3731,15 @@ EOF
37833731
else
37843732
echo"$ac_t""no"1>&6
37853733
echo$ac_n"checking for cbrt in -lm""...$ac_c"1>&6
3786-
echo"configure:3787: checking for cbrt in -lm">&5
3734+
echo"configure:3735: checking for cbrt in -lm">&5
37873735
ac_lib_var=`echo m'_'cbrt| sed'y%./+-%__p_%'`
37883736
ifeval"test\"`echo'$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set";then
37893737
echo$ac_n"(cached)$ac_c"1>&6
37903738
else
37913739
ac_save_LIBS="$LIBS"
37923740
LIBS="-lm$LIBS"
37933741
cat> conftest.$ac_ext<<EOF
3794-
#line3795 "configure"
3742+
#line3743 "configure"
37953743
#include "confdefs.h"
37963744
/* Override any gcc2 internal prototype to avoid an error. */
37973745
/* We use char because int might match the return type of a gcc2
@@ -3802,7 +3750,7 @@ int main() {
38023750
cbrt()
38033751
; return 0; }
38043752
EOF
3805-
if { (evalecho configure:3806:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3753+
if { (evalecho configure:3754:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
38063754
rm -rf conftest*
38073755
eval"ac_cv_lib_$ac_lib_var=yes"
38083756
else
@@ -3828,12 +3776,12 @@ fi
38283776
fi
38293777

38303778
echo$ac_n"checking for rint""...$ac_c"1>&6
3831-
echo"configure:3832: checking for rint">&5
3779+
echo"configure:3780: checking for rint">&5
38323780
ifeval"test\"`echo'$''{'ac_cv_func_rint'+set}'`\" = set";then
38333781
echo$ac_n"(cached)$ac_c"1>&6
38343782
else
38353783
cat> conftest.$ac_ext<<EOF
3836-
#line3837 "configure"
3784+
#line3785 "configure"
38373785
#include "confdefs.h"
38383786
/* System header to define __stub macros and hopefully few prototypes,
38393787
which can conflict with char rint(); below. */
@@ -3856,7 +3804,7 @@ rint();
38563804
38573805
; return 0; }
38583806
EOF
3859-
if { (evalecho configure:3860:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3807+
if { (evalecho configure:3808:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
38603808
rm -rf conftest*
38613809
eval"ac_cv_func_rint=yes"
38623810
else
@@ -3877,15 +3825,15 @@ EOF
38773825
else
38783826
echo"$ac_t""no"1>&6
38793827
echo$ac_n"checking for rint in -lm""...$ac_c"1>&6
3880-
echo"configure:3881: checking for rint in -lm">&5
3828+
echo"configure:3829: checking for rint in -lm">&5
38813829
ac_lib_var=`echo m'_'rint| sed'y%./+-%__p_%'`
38823830
ifeval"test\"`echo'$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set";then
38833831
echo$ac_n"(cached)$ac_c"1>&6
38843832
else
38853833
ac_save_LIBS="$LIBS"
38863834
LIBS="-lm$LIBS"
38873835
cat> conftest.$ac_ext<<EOF
3888-
#line3889 "configure"
3836+
#line3837 "configure"
38893837
#include "confdefs.h"
38903838
/* Override any gcc2 internal prototype to avoid an error. */
38913839
/* We use char because int might match the return type of a gcc2
@@ -3896,7 +3844,7 @@ int main() {
38963844
rint()
38973845
; return 0; }
38983846
EOF
3899-
if { (evalecho configure:3900:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3847+
if { (evalecho configure:3848:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
39003848
rm -rf conftest*
39013849
eval"ac_cv_lib_$ac_lib_var=yes"
39023850
else
@@ -3923,7 +3871,7 @@ fi
39233871

39243872

39253873
echo$ac_n"checking setting USE_LOCALE""...$ac_c"1>&6
3926-
echo"configure:3927: checking setting USE_LOCALE">&5
3874+
echo"configure:3875: checking setting USE_LOCALE">&5
39273875
iftest"$USE_LOCALE" ="yes"
39283876
then
39293877
echo"$ac_t""enabled"1>&6
@@ -3935,14 +3883,14 @@ else
39353883
echo"$ac_t""disabled"1>&6
39363884
fi
39373885
echo$ac_n"checking setting DEF_PGPORT""...$ac_c"1>&6
3938-
echo"configure:3939: checking setting DEF_PGPORT">&5
3886+
echo"configure:3887: checking setting DEF_PGPORT">&5
39393887
cat>> confdefs.h<<EOF
39403888
#define DEF_PGPORT "${DEF_PGPORT}"
39413889
EOF
39423890

39433891
echo"$ac_t""$DEF_PGPORT"1>&6
39443892
echo$ac_n"checking setting HBA""...$ac_c"1>&6
3945-
echo"configure:3946: checking setting HBA">&5
3893+
echo"configure:3894: checking setting HBA">&5
39463894
iftest"$NOHBA" ="no"
39473895
then
39483896
echo"$ac_t""enabled"1>&6

‎src/configure.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,7 @@ AC_FUNC_VPRINTF
418418
AC_CHECK_FUNCS(isinf tzset getrusage vfork memmove sigsetjmp kill sysconf)
419419
AC_CHECK_FUNCS(sigprocmask waitpid setsid random fcvt)
420420
AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON), INET_ATON='inet_aton.o')
421-
AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR), STRERROR='strerror.o')
422-
AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR), STRERROR2='../../backend/port/strerror.o')
421+
AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR), [STRERROR='strerror.o' STRERROR2='../../backend/port/strerror.o'])
423422
AC_CHECK_FUNC(strdup, AC_DEFINE(HAVE_STRDUP), STRDUP='../../utils/strdup.o')
424423
AC_SUBST(STRDUP)
425424
AC_SUBST(INET_ATON)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp