This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: patch to enable inet_addr() on Win32 [ok for mainline?]
- From: Adam Megacz <gcj at lists dot megacz dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: "java at gcc dot gnu dot org" <java at gcc dot gnu dot org>
- Date: 27 May 2002 15:51:47 -0700
- Subject: Re: patch to enable inet_addr() on Win32 [ok for mainline?]
- Organization: Myself
- References: <77430000.1022463027@warlock.codesourcery.com>
Mark Mitchell <mark@codesourcery.com> writes:
> This definitely needs a comment. (You can cut-and-paste your commentary
> above; it was helpful.)
Gotcha. See revised patch below.
> Before this goes in on the mainline, please explore this alternative
> with the Java folks and convince yourselves that there's really no
> other fix.
Okay, I just took a look at this. Turns out that gcj's configury uses
AC_CHECK_FUNCS, which doesn't work right when crosscompiling. Changing
it to AC_CHECK_DECL would be pretty invasive and risk breaking other
platforms (IMHO).
> If you add a comment -- and the patch is approved for the mainline --
> the patch is also OK for the branch.
Here's the revised patch. Ok for mainline?
- a
Index: java/net/natInetAddress.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/natInetAddress.cc,v
retrieving revision 1.18.18.1
diff -u -r1.18.18.1 natInetAddress.cc
--- java/net/natInetAddress.cc 4 Mar 2002 20:02:19 -0000 1.18.18.1
+++ java/net/natInetAddress.cc 27 May 2002 22:54:40 -0000
@@ -9,6 +9,7 @@
details. */
#include <config.h>
+#include <platform.h>
#ifdef WIN32
Index: include/win32.h
===================================================================
RCS file: /cvs/gcc/gcc/libjava/include/win32.h,v
retrieving revision 1.3.8.5
diff -u -r1.3.8.5 win32.h
--- include/win32.h 24 Apr 2002 01:04:45 -0000 1.3.8.5
+++ include/win32.h 27 May 2002 22:54:40 -0000
@@ -35,4 +35,8 @@
ARRAY and return the exact number of values stored. */
extern int backtrace (void **__array, int __size);
+// configure cannot correctly detect inet_addr due to Win32's
+// oddball header naming scheme
+#define HAVE_INET_ADDR
+
#endif /* __JV_WIN32_H__ */