libgcj ,OFS1 on alpha

Tom Tromey tromey@cygnus.com
Thu Apr 15 18:49:00 GMT 1999


>>>>> "David" == David Pettersson <dapet@mai.liu.se> writes:

David> ../../../libgcj/libjava/java/net/natInetAddress.cc:125: implicit
David> declaration of function `int gethostbyname_r(...)'

David> I tried to to run with -E -dM again which shows that
David> HAVE_NETDB_H is defined. According to the man page for
David> gethostbyname_r should <netdb.h> contain this
David> function. GETHOSTBYNAME_R_RETURNS_INT is not defined but the
David> manpage states that gethostbyname_r returns int. The same for
David> GETHOSTBYADDR_R_RETURNS_INT and gethostbyaddr_r.


Apparently on OSF we have to define _OSF_SOURCE and _REENTRANT in
order to pick up these decls.

Also, OSF apparently has a gethostbyname_r which isn't like either of
the two other gethostbyname_r's that I've seen.  Finally, the OSF
gethostbyname_r man page says that we should just use gethostbyname
here anyway.

So I recommend somehow arranging so that the gethostbyname_r check
(and possibly other checks as well: look at the OSF man pages, etc) be
avoided in configure.in -- for OSF only.

This isn't pretty, but then these reentrant functions seem to be
especially divergent across platforms.

Tom


More information about the Java mailing list