on DU4.0d/alpha, gethostbyname_r is only declared with -D_REENTRANT

Tom Tromey tromey@cygnus.com
Mon Jul 19 11:10:00 GMT 1999


>>>>> "Alexandre" == Alexandre Oliva <oliva@dcc.unicamp.br> writes:

Alexandre> So java/net/natInetAddress.cc fails to compile with g++
Alexandre> 2.95 (unless -fpermissive is given, of course).  Any ideas
Alexandre> about a clean work-around for this one?  I'm not sure
Alexandre> defining -D_REENTRANT inconditionally is a good idea... :-(

On my Linux box, with POSIX threads enabled, we pick up -D_REENTRANT
via the Boehm GC defines.

I assume this doesn't happen on DU 4.0?

I think we should define _REENTRANT when using POSIX threads.  Is that
ever the wrong thing to do?

There is s still a potentially losing situation where a platform has
the _r functions but we don't want to use POSIX threads.  I don't
think this is too important right now.

Tom


More information about the Java mailing list