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

Commite72b1cc

Browse files
committed
Add test for union semun to configure
Remove references to NEED_UNION_SEMUN from include/config.h.in andfrom include/storage/ipc.h, replacing it with a single HAVE_UNION_SEMUN
1 parent321d42c commite72b1cc

File tree

4 files changed

+80
-54
lines changed

4 files changed

+80
-54
lines changed

‎src/configure

Lines changed: 64 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2614,35 +2614,64 @@ EOF
26142614
fi
26152615

26162616

2617+
echo$ac_n"checking for int timezone""...$ac_c"1>&6
2618+
echo"configure:2619: checking for int timezone">&5
26172619
cat> conftest.$ac_ext<<EOF
2618-
#line2619 "configure"
2620+
#line2621 "configure"
26192621
#include "confdefs.h"
26202622
#include <time.h>
26212623
int main() {
26222624
int res = timezone / 60;
26232625
; return 0; }
26242626
EOF
2625-
if { (evalecho configure:2626:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
2627+
if { (evalecho configure:2628:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
26262628
rm -rf conftest*
26272629
cat>> confdefs.h<<\EOF
26282630
#define HAVE_INT_TIMEZONE 1
26292631
EOF
2632+
,echo"$ac_t""yes"1>&6
2633+
else
2634+
echo"configure: failed program was:">&5
2635+
cat conftest.$ac_ext>&5
2636+
rm -rf conftest*
2637+
echo"$ac_t""no"1>&6
2638+
fi
2639+
rm -f conftest*
26302640

2641+
echo$ac_n"checking for union semun""...$ac_c"1>&6
2642+
echo"configure:2643: checking for union semun">&5
2643+
cat> conftest.$ac_ext<<EOF
2644+
#line 2645 "configure"
2645+
#include "confdefs.h"
2646+
#include <sys/types.h>
2647+
#include <sys/sem.h>
2648+
int main() {
2649+
union semun semun;
2650+
; return 0; }
2651+
EOF
2652+
if { (evalecho configure:2653:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
2653+
rm -rf conftest*
2654+
cat>> confdefs.h<<\EOF
2655+
#define HAVE_UNION_SEMUN 1
2656+
EOF
2657+
echo"$ac_t""yes"1>&6
26312658
else
26322659
echo"configure: failed program was:">&5
26332660
cat conftest.$ac_ext>&5
2661+
rm -rf conftest*
2662+
echo"$ac_t""no"1>&6
26342663
fi
26352664
rm -f conftest*
26362665

26372666
iftest$ac_cv_prog_gcc = yes;then
26382667
echo$ac_n"checking whether${CC-cc} needs -traditional""...$ac_c"1>&6
2639-
echo"configure:2640: checking whether${CC-cc} needs -traditional">&5
2668+
echo"configure:2669: checking whether${CC-cc} needs -traditional">&5
26402669
ifeval"test\"`echo'$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set";then
26412670
echo$ac_n"(cached)$ac_c"1>&6
26422671
else
26432672
ac_pattern="Autoconf.*'x'"
26442673
cat> conftest.$ac_ext<<EOF
2645-
#line2646 "configure"
2674+
#line2675 "configure"
26462675
#include "confdefs.h"
26472676
#include <sgtty.h>
26482677
Autoconf TIOCGETP
@@ -2660,7 +2689,7 @@ rm -f conftest*
26602689

26612690
iftest$ac_cv_prog_gcc_traditional = no;then
26622691
cat> conftest.$ac_ext<<EOF
2663-
#line2664 "configure"
2692+
#line2693 "configure"
26642693
#include "confdefs.h"
26652694
#include <termio.h>
26662695
Autoconf TCGETA
@@ -2682,15 +2711,15 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
26822711
fi
26832712

26842713
echo$ac_n"checking for 8-bit clean memcmp""...$ac_c"1>&6
2685-
echo"configure:2686: checking for 8-bit clean memcmp">&5
2714+
echo"configure:2715: checking for 8-bit clean memcmp">&5
26862715
ifeval"test\"`echo'$''{'ac_cv_func_memcmp_clean'+set}'`\" = set";then
26872716
echo$ac_n"(cached)$ac_c"1>&6
26882717
else
26892718
iftest"$cross_compiling" = yes;then
26902719
ac_cv_func_memcmp_clean=no
26912720
else
26922721
cat> conftest.$ac_ext<<EOF
2693-
#line2694 "configure"
2722+
#line2723 "configure"
26942723
#include "confdefs.h"
26952724
26962725
main()
@@ -2700,7 +2729,7 @@ main()
27002729
}
27012730
27022731
EOF
2703-
if { (evalecho configure:2704:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest&& (./conftest; exit)2>/dev/null
2732+
if { (evalecho configure:2733:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest&& (./conftest; exit)2>/dev/null
27042733
then
27052734
ac_cv_func_memcmp_clean=yes
27062735
else
@@ -2718,12 +2747,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
27182747
test$ac_cv_func_memcmp_clean = no&& LIBOBJS="$LIBOBJS memcmp.o"
27192748

27202749
echo$ac_n"checking return type of signal handlers""...$ac_c"1>&6
2721-
echo"configure:2722: checking return type of signal handlers">&5
2750+
echo"configure:2751: checking return type of signal handlers">&5
27222751
ifeval"test\"`echo'$''{'ac_cv_type_signal'+set}'`\" = set";then
27232752
echo$ac_n"(cached)$ac_c"1>&6
27242753
else
27252754
cat> conftest.$ac_ext<<EOF
2726-
#line2727 "configure"
2755+
#line2756 "configure"
27272756
#include "confdefs.h"
27282757
#include <sys/types.h>
27292758
#include <signal.h>
@@ -2740,7 +2769,7 @@ int main() {
27402769
int i;
27412770
; return 0; }
27422771
EOF
2743-
if { (evalecho configure:2744:\"$ac_compile\")1>&5; (eval$ac_compile)2>&5; };then
2772+
if { (evalecho configure:2773:\"$ac_compile\")1>&5; (eval$ac_compile)2>&5; };then
27442773
rm -rf conftest*
27452774
ac_cv_type_signal=void
27462775
else
@@ -2759,12 +2788,12 @@ EOF
27592788

27602789

27612790
echo$ac_n"checking for vprintf""...$ac_c"1>&6
2762-
echo"configure:2763: checking for vprintf">&5
2791+
echo"configure:2792: checking for vprintf">&5
27632792
ifeval"test\"`echo'$''{'ac_cv_func_vprintf'+set}'`\" = set";then
27642793
echo$ac_n"(cached)$ac_c"1>&6
27652794
else
27662795
cat> conftest.$ac_ext<<EOF
2767-
#line2768 "configure"
2796+
#line2797 "configure"
27682797
#include "confdefs.h"
27692798
/* System header to define __stub macros and hopefully few prototypes,
27702799
which can conflict with char vprintf(); below. */
@@ -2787,7 +2816,7 @@ vprintf();
27872816
27882817
; return 0; }
27892818
EOF
2790-
if { (evalecho configure:2791:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
2819+
if { (evalecho configure:2820:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
27912820
rm -rf conftest*
27922821
eval"ac_cv_func_vprintf=yes"
27932822
else
@@ -2811,12 +2840,12 @@ fi
28112840

28122841
iftest"$ac_cv_func_vprintf"!= yes;then
28132842
echo$ac_n"checking for _doprnt""...$ac_c"1>&6
2814-
echo"configure:2815: checking for _doprnt">&5
2843+
echo"configure:2844: checking for _doprnt">&5
28152844
ifeval"test\"`echo'$''{'ac_cv_func__doprnt'+set}'`\" = set";then
28162845
echo$ac_n"(cached)$ac_c"1>&6
28172846
else
28182847
cat> conftest.$ac_ext<<EOF
2819-
#line2820 "configure"
2848+
#line2849 "configure"
28202849
#include "confdefs.h"
28212850
/* System header to define __stub macros and hopefully few prototypes,
28222851
which can conflict with char _doprnt(); below. */
@@ -2839,7 +2868,7 @@ _doprnt();
28392868
28402869
; return 0; }
28412870
EOF
2842-
if { (evalecho configure:2843:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
2871+
if { (evalecho configure:2872:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
28432872
rm -rf conftest*
28442873
eval"ac_cv_func__doprnt=yes"
28452874
else
@@ -2866,12 +2895,12 @@ fi
28662895
forac_funcin isinf tzset getrusage vfork memmove sigsetjmpkill sysconf
28672896
do
28682897
echo$ac_n"checking for$ac_func""...$ac_c"1>&6
2869-
echo"configure:2870: checking for$ac_func">&5
2898+
echo"configure:2899: checking for$ac_func">&5
28702899
ifeval"test\"`echo'$''{'ac_cv_func_$ac_func'+set}'`\" = set";then
28712900
echo$ac_n"(cached)$ac_c"1>&6
28722901
else
28732902
cat> conftest.$ac_ext<<EOF
2874-
#line2875 "configure"
2903+
#line2904 "configure"
28752904
#include "confdefs.h"
28762905
/* System header to define __stub macros and hopefully few prototypes,
28772906
which can conflict with char$ac_func(); below. */
@@ -2894,7 +2923,7 @@ $ac_func();
28942923
28952924
; return 0; }
28962925
EOF
2897-
if { (evalecho configure:2898:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
2926+
if { (evalecho configure:2927:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
28982927
rm -rf conftest*
28992928
eval"ac_cv_func_$ac_func=yes"
29002929
else
@@ -2919,12 +2948,12 @@ fi
29192948
done
29202949

29212950
echo$ac_n"checking for inet_aton""...$ac_c"1>&6
2922-
echo"configure:2923: checking for inet_aton">&5
2951+
echo"configure:2952: checking for inet_aton">&5
29232952
ifeval"test\"`echo'$''{'ac_cv_func_inet_aton'+set}'`\" = set";then
29242953
echo$ac_n"(cached)$ac_c"1>&6
29252954
else
29262955
cat> conftest.$ac_ext<<EOF
2927-
#line2928 "configure"
2956+
#line2957 "configure"
29282957
#include "confdefs.h"
29292958
/* System header to define __stub macros and hopefully few prototypes,
29302959
which can conflict with char inet_aton(); below. */
@@ -2947,7 +2976,7 @@ inet_aton();
29472976
29482977
; return 0; }
29492978
EOF
2950-
if { (evalecho configure:2951:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
2979+
if { (evalecho configure:2980:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
29512980
rm -rf conftest*
29522981
eval"ac_cv_func_inet_aton=yes"
29532982
else
@@ -2972,12 +3001,12 @@ fi
29723001

29733002

29743003
echo$ac_n"checking for cbrt""...$ac_c"1>&6
2975-
echo"configure:2976: checking for cbrt">&5
3004+
echo"configure:3005: checking for cbrt">&5
29763005
ifeval"test\"`echo'$''{'ac_cv_func_cbrt'+set}'`\" = set";then
29773006
echo$ac_n"(cached)$ac_c"1>&6
29783007
else
29793008
cat> conftest.$ac_ext<<EOF
2980-
#line2981 "configure"
3009+
#line3010 "configure"
29813010
#include "confdefs.h"
29823011
/* System header to define __stub macros and hopefully few prototypes,
29833012
which can conflict with char cbrt(); below. */
@@ -3000,7 +3029,7 @@ cbrt();
30003029
30013030
; return 0; }
30023031
EOF
3003-
if { (evalecho configure:3004:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3032+
if { (evalecho configure:3033:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
30043033
rm -rf conftest*
30053034
eval"ac_cv_func_cbrt=yes"
30063035
else
@@ -3021,15 +3050,15 @@ EOF
30213050
else
30223051
echo"$ac_t""no"1>&6
30233052
echo$ac_n"checking for cbrt in -lm""...$ac_c"1>&6
3024-
echo"configure:3025: checking for cbrt in -lm">&5
3053+
echo"configure:3054: checking for cbrt in -lm">&5
30253054
ac_lib_var=`echo m'_'cbrt| sed'y%./+-%__p_%'`
30263055
ifeval"test\"`echo'$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set";then
30273056
echo$ac_n"(cached)$ac_c"1>&6
30283057
else
30293058
ac_save_LIBS="$LIBS"
30303059
LIBS="-lm$LIBS"
30313060
cat> conftest.$ac_ext<<EOF
3032-
#line3033 "configure"
3061+
#line3062 "configure"
30333062
#include "confdefs.h"
30343063
/* Override any gcc2 internal prototype to avoid an error. */
30353064
/* We use char because int might match the return type of a gcc2
@@ -3040,7 +3069,7 @@ int main() {
30403069
cbrt()
30413070
; return 0; }
30423071
EOF
3043-
if { (evalecho configure:3044:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3072+
if { (evalecho configure:3073:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
30443073
rm -rf conftest*
30453074
eval"ac_cv_lib_$ac_lib_var=yes"
30463075
else
@@ -3066,12 +3095,12 @@ fi
30663095
fi
30673096

30683097
echo$ac_n"checking for rint""...$ac_c"1>&6
3069-
echo"configure:3070: checking for rint">&5
3098+
echo"configure:3099: checking for rint">&5
30703099
ifeval"test\"`echo'$''{'ac_cv_func_rint'+set}'`\" = set";then
30713100
echo$ac_n"(cached)$ac_c"1>&6
30723101
else
30733102
cat> conftest.$ac_ext<<EOF
3074-
#line3075 "configure"
3103+
#line3104 "configure"
30753104
#include "confdefs.h"
30763105
/* System header to define __stub macros and hopefully few prototypes,
30773106
which can conflict with char rint(); below. */
@@ -3094,7 +3123,7 @@ rint();
30943123
30953124
; return 0; }
30963125
EOF
3097-
if { (evalecho configure:3098:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3126+
if { (evalecho configure:3127:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
30983127
rm -rf conftest*
30993128
eval"ac_cv_func_rint=yes"
31003129
else
@@ -3115,15 +3144,15 @@ EOF
31153144
else
31163145
echo"$ac_t""no"1>&6
31173146
echo$ac_n"checking for rint in -lm""...$ac_c"1>&6
3118-
echo"configure:3119: checking for rint in -lm">&5
3147+
echo"configure:3148: checking for rint in -lm">&5
31193148
ac_lib_var=`echo m'_'rint| sed'y%./+-%__p_%'`
31203149
ifeval"test\"`echo'$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set";then
31213150
echo$ac_n"(cached)$ac_c"1>&6
31223151
else
31233152
ac_save_LIBS="$LIBS"
31243153
LIBS="-lm$LIBS"
31253154
cat> conftest.$ac_ext<<EOF
3126-
#line3127 "configure"
3155+
#line3156 "configure"
31273156
#include "confdefs.h"
31283157
/* Override any gcc2 internal prototype to avoid an error. */
31293158
/* We use char because int might match the return type of a gcc2
@@ -3134,7 +3163,7 @@ int main() {
31343163
rint()
31353164
; return 0; }
31363165
EOF
3137-
if { (evalecho configure:3138:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3166+
if { (evalecho configure:3167:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
31383167
rm -rf conftest*
31393168
eval"ac_cv_lib_$ac_lib_var=yes"
31403169
else

‎src/configure.in

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,18 @@ AC_HEADER_TIME
133133
AC_STRUCT_TM
134134

135135
dnl Check for any "odd" conditions
136+
AC_MSG_CHECKING(for int timezone)
136137
AC_TRY_LINK([#include <time.h>],
137-
[int res = timezone / 60; ], AC_DEFINE(HAVE_INT_TIMEZONE))
138+
[int res = timezone / 60; ],
139+
[AC_DEFINE(HAVE_INT_TIMEZONE), AC_MSG_RESULT(yes)],
140+
AC_MSG_RESULT(no))
141+
142+
AC_MSG_CHECKING(for union semun)
143+
AC_TRY_LINK([#include <sys/types.h>
144+
#include <sys/sem.h>],
145+
[union semun semun;],
146+
[AC_DEFINE(HAVE_UNION_SEMUN) AC_MSG_RESULT(yes)],
147+
AC_MSG_RESULT(no))
138148

139149
dnl Checks for library functions.
140150
AC_PROG_GCC_TRADITIONAL

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp