• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GCC with patches for OS216


Commit MetaInfo

Revisión6445422af7ceb7c6d1a32c967c2f75f6186e4f1d (tree)
Tiempo1999-08-21 22:15:59
AutorAlexandre Oliva <oliva@dcc....>
CommiterAlexandre Oliva

Log Message

configure.in: Check types ssize_t and in_addr_t.

* configure.in: Check types ssize_t and in_addr_t.
* acconfig.h: Undefine them.
* configure, include/config.h.in: Rebuilt.

From-SVN: r28794

Cambiar Resumen

Diferencia incremental

--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,5 +1,9 @@
11 1999-08-21 Alexandre Oliva <oliva@dcc.unicamp.br>
22
3+ * configure.in: Check types ssize_t and in_addr_t.
4+ * acconfig.h: Undefine them.
5+ * configure, include/config.h.in: Rebuilt.
6+
37 * java/net/natPlainDatagramSocketImpl.cc: Include sys/select.h
48 only when configure finds it.
59 * java/net/natPlainSocketImpl.cc: Likewise.
--- a/libjava/acconfig.h
+++ b/libjava/acconfig.h
@@ -55,6 +55,12 @@
5555 /* Define if you have the `localtime_r' function. */
5656 #undef HAVE_LOCALTIME_R
5757
58+/* Define to `int' if `ssize_t' is not defined. */
59+#undef ssize_t
60+
61+/* Define to `struct in_addr' if `in_addr_t' is not defined. */
62+#undef in_addr_t
63+
5864 /* Define if inet6 structures are defined in netinet/in.h. */
5965 #undef HAVE_INET6
6066
--- a/libjava/configure
+++ b/libjava/configure
@@ -4297,17 +4297,188 @@ fi
42974297 done
42984298
42994299
4300+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4301+echo "configure:4302: checking for ANSI C header files" >&5
4302+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4303+ echo $ac_n "(cached) $ac_c" 1>&6
4304+else
4305+ cat > conftest.$ac_ext <<EOF
4306+#line 4307 "configure"
4307+#include "confdefs.h"
4308+#include <stdlib.h>
4309+#include <stdarg.h>
4310+#include <string.h>
4311+#include <float.h>
4312+EOF
4313+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4314+{ (eval echo configure:4315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4315+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4316+if test -z "$ac_err"; then
4317+ rm -rf conftest*
4318+ ac_cv_header_stdc=yes
4319+else
4320+ echo "$ac_err" >&5
4321+ echo "configure: failed program was:" >&5
4322+ cat conftest.$ac_ext >&5
4323+ rm -rf conftest*
4324+ ac_cv_header_stdc=no
4325+fi
4326+rm -f conftest*
4327+
4328+if test $ac_cv_header_stdc = yes; then
4329+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4330+cat > conftest.$ac_ext <<EOF
4331+#line 4332 "configure"
4332+#include "confdefs.h"
4333+#include <string.h>
4334+EOF
4335+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4336+ egrep "memchr" >/dev/null 2>&1; then
4337+ :
4338+else
4339+ rm -rf conftest*
4340+ ac_cv_header_stdc=no
4341+fi
4342+rm -f conftest*
4343+
4344+fi
4345+
4346+if test $ac_cv_header_stdc = yes; then
4347+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4348+cat > conftest.$ac_ext <<EOF
4349+#line 4350 "configure"
4350+#include "confdefs.h"
4351+#include <stdlib.h>
4352+EOF
4353+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4354+ egrep "free" >/dev/null 2>&1; then
4355+ :
4356+else
4357+ rm -rf conftest*
4358+ ac_cv_header_stdc=no
4359+fi
4360+rm -f conftest*
4361+
4362+fi
4363+
4364+if test $ac_cv_header_stdc = yes; then
4365+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4366+if test "$cross_compiling" = yes; then
4367+ :
4368+else
4369+ cat > conftest.$ac_ext <<EOF
4370+#line 4371 "configure"
4371+#include "confdefs.h"
4372+#include <ctype.h>
4373+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4374+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4375+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4376+int main () { int i; for (i = 0; i < 256; i++)
4377+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4378+exit (0); }
4379+
4380+EOF
4381+if { (eval echo configure:4382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4382+then
4383+ :
4384+else
4385+ echo "configure: failed program was:" >&5
4386+ cat conftest.$ac_ext >&5
4387+ rm -fr conftest*
4388+ ac_cv_header_stdc=no
4389+fi
4390+rm -fr conftest*
4391+fi
4392+
4393+fi
4394+fi
4395+
4396+echo "$ac_t""$ac_cv_header_stdc" 1>&6
4397+if test $ac_cv_header_stdc = yes; then
4398+ cat >> confdefs.h <<\EOF
4399+#define STDC_HEADERS 1
4400+EOF
4401+
4402+fi
4403+
4404+echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4405+echo "configure:4406: checking for ssize_t" >&5
4406+if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
4407+ echo $ac_n "(cached) $ac_c" 1>&6
4408+else
4409+ cat > conftest.$ac_ext <<EOF
4410+#line 4411 "configure"
4411+#include "confdefs.h"
4412+#include <sys/types.h>
4413+#if STDC_HEADERS
4414+#include <stdlib.h>
4415+#include <stddef.h>
4416+#endif
4417+EOF
4418+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4419+ egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4420+ rm -rf conftest*
4421+ ac_cv_type_ssize_t=yes
4422+else
4423+ rm -rf conftest*
4424+ ac_cv_type_ssize_t=no
4425+fi
4426+rm -f conftest*
4427+
4428+fi
4429+echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4430+if test $ac_cv_type_ssize_t = no; then
4431+ cat >> confdefs.h <<\EOF
4432+#define ssize_t int
4433+EOF
4434+
4435+fi
4436+
4437+echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
4438+echo "configure:4439: checking for in_addr_t" >&5
4439+if eval "test \"`echo '$''{'ac_cv_type_in_addr_t'+set}'`\" = set"; then
4440+ echo $ac_n "(cached) $ac_c" 1>&6
4441+else
4442+ cat > conftest.$ac_ext <<EOF
4443+#line 4444 "configure"
4444+#include "confdefs.h"
4445+#include <sys/types.h>
4446+#if STDC_HEADERS
4447+#include <stdlib.h>
4448+#include <stddef.h>
4449+#endif
4450+EOF
4451+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4452+ egrep "(^|[^a-zA-Z_0-9])in_addr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4453+ rm -rf conftest*
4454+ ac_cv_type_in_addr_t=yes
4455+else
4456+ rm -rf conftest*
4457+ ac_cv_type_in_addr_t=no
4458+fi
4459+rm -f conftest*
4460+
4461+fi
4462+echo "$ac_t""$ac_cv_type_in_addr_t" 1>&6
4463+if test $ac_cv_type_in_addr_t = no; then
4464+ cat >> confdefs.h <<\EOF
4465+#define in_addr_t struct in_addr
4466+EOF
4467+
4468+fi
4469+
4470+
43004471 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
4301-echo "configure:4302: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
4472+echo "configure:4473: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
43024473 cat > conftest.$ac_ext <<EOF
4303-#line 4304 "configure"
4474+#line 4475 "configure"
43044475 #include "confdefs.h"
43054476 #include <netinet/in.h>
43064477 int main() {
43074478 struct sockaddr_in6 addr6;
43084479 ; return 0; }
43094480 EOF
4310-if { (eval echo configure:4311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4481+if { (eval echo configure:4482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
43114482 rm -rf conftest*
43124483 cat >> confdefs.h <<\EOF
43134484 #define HAVE_INET6 1
@@ -4323,16 +4494,16 @@ fi
43234494 rm -f conftest*
43244495
43254496 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
4326-echo "configure:4327: checking for socklen_t in sys/socket.h" >&5
4497+echo "configure:4498: checking for socklen_t in sys/socket.h" >&5
43274498 cat > conftest.$ac_ext <<EOF
4328-#line 4329 "configure"
4499+#line 4500 "configure"
43294500 #include "confdefs.h"
43304501 #include <sys/socket.h>
43314502 int main() {
43324503 socklen_t x = 5;
43334504 ; return 0; }
43344505 EOF
4335-if { (eval echo configure:4336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4506+if { (eval echo configure:4507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
43364507 rm -rf conftest*
43374508 cat >> confdefs.h <<\EOF
43384509 #define HAVE_SOCKLEN_T 1
@@ -4348,16 +4519,16 @@ fi
43484519 rm -f conftest*
43494520
43504521 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
4351-echo "configure:4352: checking for tm_gmtoff in struct tm" >&5
4522+echo "configure:4523: checking for tm_gmtoff in struct tm" >&5
43524523 cat > conftest.$ac_ext <<EOF
4353-#line 4354 "configure"
4524+#line 4525 "configure"
43544525 #include "confdefs.h"
43554526 #include <time.h>
43564527 int main() {
43574528 struct tm tim; tim.tm_gmtoff = 0;
43584529 ; return 0; }
43594530 EOF
4360-if { (eval echo configure:4361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4531+if { (eval echo configure:4532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
43614532 rm -rf conftest*
43624533 cat >> confdefs.h <<\EOF
43634534 #define STRUCT_TM_HAS_GMTOFF 1
@@ -4370,16 +4541,16 @@ else
43704541 rm -rf conftest*
43714542 echo "$ac_t""no" 1>&6
43724543 echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
4373-echo "configure:4374: checking for global timezone variable" >&5
4544+echo "configure:4545: checking for global timezone variable" >&5
43744545 cat > conftest.$ac_ext <<EOF
4375-#line 4376 "configure"
4546+#line 4547 "configure"
43764547 #include "confdefs.h"
43774548 #include <time.h>
43784549 int main() {
43794550 long z2 = timezone;
43804551 ; return 0; }
43814552 EOF
4382-if { (eval echo configure:4383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4553+if { (eval echo configure:4554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
43834554 rm -rf conftest*
43844555 cat >> confdefs.h <<\EOF
43854556 #define HAVE_TIMEZONE 1
@@ -4399,19 +4570,19 @@ rm -f conftest*
43994570 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
44004571 # for constant arguments. Useless!
44014572 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4402-echo "configure:4403: checking for working alloca.h" >&5
4573+echo "configure:4574: checking for working alloca.h" >&5
44034574 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
44044575 echo $ac_n "(cached) $ac_c" 1>&6
44054576 else
44064577 cat > conftest.$ac_ext <<EOF
4407-#line 4408 "configure"
4578+#line 4579 "configure"
44084579 #include "confdefs.h"
44094580 #include <alloca.h>
44104581 int main() {
44114582 char *p = alloca(2 * sizeof(int));
44124583 ; return 0; }
44134584 EOF
4414-if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4585+if { (eval echo configure:4586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
44154586 rm -rf conftest*
44164587 ac_cv_header_alloca_h=yes
44174588 else
@@ -4432,12 +4603,12 @@ EOF
44324603 fi
44334604
44344605 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4435-echo "configure:4436: checking for alloca" >&5
4606+echo "configure:4607: checking for alloca" >&5
44364607 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
44374608 echo $ac_n "(cached) $ac_c" 1>&6
44384609 else
44394610 cat > conftest.$ac_ext <<EOF
4440-#line 4441 "configure"
4611+#line 4612 "configure"
44414612 #include "confdefs.h"
44424613
44434614 #ifdef __GNUC__
@@ -4465,7 +4636,7 @@ int main() {
44654636 char *p = (char *) alloca(1);
44664637 ; return 0; }
44674638 EOF
4468-if { (eval echo configure:4469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4639+if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
44694640 rm -rf conftest*
44704641 ac_cv_func_alloca_works=yes
44714642 else
@@ -4497,12 +4668,12 @@ EOF
44974668
44984669
44994670 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4500-echo "configure:4501: checking whether alloca needs Cray hooks" >&5
4671+echo "configure:4672: checking whether alloca needs Cray hooks" >&5
45014672 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
45024673 echo $ac_n "(cached) $ac_c" 1>&6
45034674 else
45044675 cat > conftest.$ac_ext <<EOF
4505-#line 4506 "configure"
4676+#line 4677 "configure"
45064677 #include "confdefs.h"
45074678 #if defined(CRAY) && ! defined(CRAY2)
45084679 webecray
@@ -4527,12 +4698,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
45274698 if test $ac_cv_os_cray = yes; then
45284699 for ac_func in _getb67 GETB67 getb67; do
45294700 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4530-echo "configure:4531: checking for $ac_func" >&5
4701+echo "configure:4702: checking for $ac_func" >&5
45314702 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
45324703 echo $ac_n "(cached) $ac_c" 1>&6
45334704 else
45344705 cat > conftest.$ac_ext <<EOF
4535-#line 4536 "configure"
4706+#line 4707 "configure"
45364707 #include "confdefs.h"
45374708 /* System header to define __stub macros and hopefully few prototypes,
45384709 which can conflict with char $ac_func(); below. */
@@ -4555,7 +4726,7 @@ $ac_func();
45554726
45564727 ; return 0; }
45574728 EOF
4558-if { (eval echo configure:4559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4729+if { (eval echo configure:4730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
45594730 rm -rf conftest*
45604731 eval "ac_cv_func_$ac_func=yes"
45614732 else
@@ -4582,7 +4753,7 @@ done
45824753 fi
45834754
45844755 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4585-echo "configure:4586: checking stack direction for C alloca" >&5
4756+echo "configure:4757: checking stack direction for C alloca" >&5
45864757 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
45874758 echo $ac_n "(cached) $ac_c" 1>&6
45884759 else
@@ -4590,7 +4761,7 @@ else
45904761 ac_cv_c_stack_direction=0
45914762 else
45924763 cat > conftest.$ac_ext <<EOF
4593-#line 4594 "configure"
4764+#line 4765 "configure"
45944765 #include "confdefs.h"
45954766 find_stack_direction ()
45964767 {
@@ -4609,7 +4780,7 @@ main ()
46094780 exit (find_stack_direction() < 0);
46104781 }
46114782 EOF
4612-if { (eval echo configure:4613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4783+if { (eval echo configure:4784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46134784 then
46144785 ac_cv_c_stack_direction=1
46154786 else
@@ -4632,7 +4803,7 @@ fi
46324803
46334804
46344805 echo $ac_n "checking for g++ -g jboolean bug""... $ac_c" 1>&6
4635-echo "configure:4636: checking for g++ -g jboolean bug" >&5
4806+echo "configure:4807: checking for g++ -g jboolean bug" >&5
46364807 if eval "test \"`echo '$''{'libjava_cv_gxx_debug_jboolean_bug'+set}'`\" = set"; then
46374808 echo $ac_n "(cached) $ac_c" 1>&6
46384809 else
@@ -4645,14 +4816,14 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
46454816 cross_compiling=$ac_cv_prog_cxx_cross
46464817
46474818 cat > conftest.$ac_ext <<EOF
4648-#line 4649 "configure"
4819+#line 4820 "configure"
46494820 #include "confdefs.h"
46504821 typedef __java_boolean jboolean;
46514822 int main() {
46524823
46534824 ; return 0; }
46544825 EOF
4655-if { (eval echo configure:4656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4826+if { (eval echo configure:4827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
46564827 rm -rf conftest*
46574828 libjava_cv_gxx_debug_jboolean_bug=no
46584829 else
@@ -4686,7 +4857,7 @@ do
46864857 # Extract the first word of "$ac_prog", so it can be a program name with args.
46874858 set dummy $ac_prog; ac_word=$2
46884859 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4689-echo "configure:4690: checking for $ac_word" >&5
4860+echo "configure:4861: checking for $ac_word" >&5
46904861 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
46914862 echo $ac_n "(cached) $ac_c" 1>&6
46924863 else
--- a/libjava/configure.in
+++ b/libjava/configure.in
@@ -517,6 +517,9 @@ dnl We avoid AC_HEADER_DIRENT since we really only care about dirent.h
517517 dnl for now. If you change this, you also must update natFile.cc.
518518 AC_CHECK_HEADERS(dirent.h)
519519
520+AC_CHECK_TYPE([ssize_t], [int])
521+AC_CHECK_TYPE([in_addr_t], [struct in_addr])
522+
520523 AC_MSG_CHECKING([whether struct sockaddr_in6 is in netinet/in.h])
521524 AC_TRY_COMPILE([#include <netinet/in.h>], [struct sockaddr_in6 addr6;],
522525 [AC_DEFINE(HAVE_INET6)
--- a/libjava/include/config.h.in
+++ b/libjava/include/config.h.in
@@ -22,6 +22,9 @@
2222 */
2323 #undef STACK_DIRECTION
2424
25+/* Define if you have the ANSI C header files. */
26+#undef STDC_HEADERS
27+
2528 /* Define this if you want runtime debugging enabled. */
2629 #undef DEBUG
2730
@@ -67,6 +70,12 @@
6770 /* Define if you have the `localtime_r' function. */
6871 #undef HAVE_LOCALTIME_R
6972
73+/* Define to `int' if `ssize_t' is not defined. */
74+#undef ssize_t
75+
76+/* Define to `struct in_addr' if `in_addr_t' is not defined. */
77+#undef in_addr_t
78+
7079 /* Define if inet6 structures are defined in netinet/in.h. */
7180 #undef HAVE_INET6
7281
--- a/libjava/include/stamp-h.in
+++ b/libjava/include/stamp-h.in
@@ -0,0 +1 @@
1+timestamp