missing regex.h include in natInetAddress.cc

Olivier olivier@zipworld.com.au
Sat Jun 30 00:05:00 GMT 2001


On Wed, Jun 27, 2001 at 11:36:11AM -0600, Tom Tromey wrote:
> >>>>> "Olivier" == Olivier <olivier@zipworld.com.au> writes:
>> Olivier> #ifdef HAVE_NETDB_H
> Olivier> #include <regex.h> /* added this include */
> Olivier> #include <netdb.h>
> Olivier> #endif
>> This seems bizarre.
> What was the problem that caused you to do this?
>
Tom, 
this is what I get with natInetAddress.cc original version:
tournesol:~/tmp/gcc$ ../../cvs/gcc/configure --prefix=/usr/local/gcc --enable-shared --enable-haifa --enable-threads=posix --enable-languages=c++,java --enable-java-gc=boehm
tournesol:~/tmp/gcc$ make
...
...
...
/home/olivier/tmp/gcc/gcc/g++ -B/home/olivier/tmp/gcc/gcc/ -nostdinc++ -nostdinc++ -I/home/olivier/tmp/gcc/i686-pc-linux-gnu/libstdc++-v3/include -I/home/olivier/program/cvs/gcc/libstdc++-v3/include -I/home/olivier/program/cvs/gcc/libstdc++-v3/include/std -I/home/olivier/program/cvs/gcc/libstdc++-v3/include/c_std -I/home/olivier/program/cvs/gcc/libstdc++-v3/libsupc++ -I/home/olivier/program/cvs/gcc/libstdc++-v3/libio -I/home/olivier/program/cvs/gcc/libstdc++-v3/testsuite -I/home/olivier/program/cvs/gcc/libstdc++-v3/include/backwards -I/home/olivier/program/cvs/gcc/libstdc++-v3/include/ext -L/home/olivier/tmp/gcc/i686-pc-linux-gnu/libstdc++-v3/src -L/home/olivier/tmp/gcc/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/usr/local/gcc/i686-pc-linux-gnu/bin/ -B/usr/local/gcc/i686-pc-linux-gnu/lib/ -isystem /usr/local/gcc/i686-pc-linux-gnu/include -DHAVE_CONFIG_H -I. -I../../../../program/cvs/gcc/libjava -I./include -I./gcj -I../../../../program/cvs/gcc/libjava -Iinclude -I../../../../program/cvs/gcc/libjava/include -I../../../../program/cvs/gcc/libjava/../boehm-gc/include -DLINUX_THREADS=1 -D_REENTRANT=1 -DSILENT=1 -DNO_SIGNALS=1 -DJAVA_FINALIZATION=1 -DGC_GCJ_SUPPORT=1 -I../../../../program/cvs/gcc/libjava/libltdl -I../../../../program/cvs/gcc/libjava/libltdl -I../../../../program/cvs/gcc/libjava/./../gcc -I../../../../program/cvs/gcc/libjava/../zlib -I/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -D__NO_MATH_INLINES -ffloat-store -I/usr/X11R6/include -W -Wall -D_GNU_SOURCE -DPREFIX=\"/usr/local/gcc\" -g -O2 -D_GNU_SOURCE -Wp,-MD,.deps/natInetAddress.pp -c ../../../../program/cvs/gcc/libjava/java/net/natInetAddress.cc -fPIC -DPIC -o java/net/.libs/natInetAddress.o
In file included from ../../../../program/cvs/gcc/libjava/java/net/natInetAddress.cc:42:
/usr/include/netdb.h:497: parse error before `]' token
make[2]: *** [java/net/natInetAddress.lo] Error 1
make[2]: Leaving directory `/home/olivier/tmp/gcc/i686-pc-linux-gnu/libjava'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/olivier/tmp/gcc/i686-pc-linux-gnu/libjava'
make: *** [all-target-libjava] Error 2
and following /usr/include/netdb.h line 497:
extern int getaddrinfo_a (int __mode, struct gaicb *__list[__restrict_arr],
			 int __ent, struct sigevent *__restrict __sig)
 __THROW;
it appears that the symbol "__restrict_arr" is only defined in "regex.h".
So adding #include <regex.h>
fixed the problem.
cheers
Olivier
-- 
----------------------------------------------------------------------
Olivier Louchart-Fletcher
Email: olivier@zipworld.com.au


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /