This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
Re: in_addr_t is not defined on SunOS4...
- To: java-patches@sourceware.cygnus.com
- Subject: Re: in_addr_t is not defined on SunOS4...
- From: Alexandre Oliva <oliva@dcc.unicamp.br>
- Date: 21 Aug 1999 10:12:38 -0300
- References: <orso5dz4vv.fsf@cupuacu.lsd.dcc.unicamp.br>
On Aug 21, 1999, Alexandre Oliva <oliva@dcc.unicamp.br> wrote:
> ... and inet_addr was assumed to return such a type. I've hacked it
> to explicitly use the return type of inet_addr (__typeof) to
> initialize laddr, because I'm not sure in_addr_t is supposed to be
> defined in sys/types.h on all platforms in which it would be useful.
> Does anybody have an authoritative information?
After some research, I found out it was only typedef in sys/types.h on
DU4.0d; I couldn't find it in any other platform I've got, so I'll
assume it's safe to AC_CHECK_TYPE it.
This is the new version of the patch:
Index: libjava/ChangeLog
from Alexandre Oliva <oliva@dcc.unicamp.br>
* configure.in: Check types ssize_t and in_addr_t.
* acconfig.h: Undefine them.
* configure, include/config.h.in: Rebuilt.
Index: libjava/configure.in
===================================================================
RCS file: /cvs/java/libgcj/libjava/configure.in,v
retrieving revision 1.11.2.8
diff -u -r1.11.2.8 configure.in
--- libjava/configure.in 1999/08/09 18:53:10 1.11.2.8
+++ libjava/configure.in 1999/08/21 13:10:14
@@ -517,6 +517,9 @@
dnl for now. If you change this, you also must update natFile.cc.
AC_CHECK_HEADERS(dirent.h)
+AC_CHECK_TYPE([ssize_t], [int])
+AC_CHECK_TYPE([in_addr_t], [struct in_addr])
+
AC_MSG_CHECKING([whether struct sockaddr_in6 is in netinet/in.h])
AC_TRY_COMPILE([#include <netinet/in.h>], [struct sockaddr_in6 addr6;],
[AC_DEFINE(HAVE_INET6)
Index: libjava/acconfig.h
===================================================================
RCS file: /cvs/java/libgcj/libjava/acconfig.h,v
retrieving revision 1.2.2.1
diff -u -r1.2.2.1 acconfig.h
--- libjava/acconfig.h 1999/06/24 20:14:56 1.2.2.1
+++ libjava/acconfig.h 1999/08/21 13:10:14
@@ -55,6 +55,12 @@
/* Define if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R
+/* Define to `int' if `ssize_t' is not defined. */
+#undef ssize_t
+
+/* Define to `struct in_addr' if `in_addr_t' is not defined. */
+#undef in_addr_t
+
/* Define if inet6 structures are defined in netinet/in.h. */
#undef HAVE_INET6
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them