This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: {Patch] java.net network functions
- From: Michael Koch <konqueror at gmx dot de>
- To: Richard Earnshaw <rearnsha at arm dot com>, tromey at redhat dot com
- Cc: java-patches at gcc dot gnu dot org
- Date: Fri, 22 Nov 2002 11:29:26 +0100
- Subject: Re: {Patch] java.net network functions
- References: <200211221004.gAMA4nt31150@pc960.cambridge.arm.com>
Am Freitag, 22. November 2002 11:04 schrieb Richard Earnshaw:
> Unfortunately this is still broken...
>
> /work/rearnsha/gnu/egcs/gcc/xgcc -shared-libgcc
> -B/work/rearnsha/gnu/egcs/g cc/ -nostdinc++
> -L/work/rearnsha/gnu/egcs/arm-elf/thumb/libstdc++-v3/src
> -L/work/rearnsha/gnu/egcs/arm-elf/thumb/libstdc++-v3/src/.libs
> -nostdinc -B/work/rearnsha/gnu/egcs/arm-elf/thumb/newlib/ -isystem
> /work/rearnsha/gnu/egcs/arm-elf/thumb/newlib/targ-include -isystem
> /home/rearnsha/gnusrc/egcs-cross/newlib/libc/include
> -B/work/rearnsha/gnu/install/arm-elf/bin/
> -B/work/rearnsha/gnu/install/arm- elf/lib/ -isystem
> /work/rearnsha/gnu/install/arm-elf/include
> -L/work/rearnsha/gnu/egcs/ld -mthumb -DHAVE_CONFIG_H -I.
> -I/home/rearnsha/gnusrc/egcs-cross/libjava -I./include -I./gcj
> -I/home/rearnsha/gnusrc/egcs-cross/libjava -Iinclude
> -I/home/rearnsha/gnusrc/egcs-cross/libjava/include
> -I/home/rearnsha/gnusrc/egcs-cross/libjava/../boehm-gc/include
> -DSILENT=1 -DNO_SIGNALS=1 -DNO_EXECUTE_PERMISSION=1
> -DALL_INTERIOR_POINTERS=1 -DJAVA_FINALIZATION=1 -DGC_GCJ_SUPPORT=1
> -DATOMIC_UNCOLLECTABLE=1 -DNO_SIGSET=1 -DNO_DEBUGGING=1
> -I/home/rearnsha/gnusrc/egcs-cross/libjava/. /./libjava/../gcc
> -I/home/rearnsha/gnusrc/egcs-cross/libjava/../zlib -fno-rtti
> -fnon-call-exceptions -fdollars-in-identifiers -Wswitch-enum
> -I/usr/X11R6/include -W -Wall -D_GNU_SOURCE
> -DPREFIX=\"/work/rearnsha/gnu/i nstall\" -g -O2 -mthumb -MD -MT
> java/io/natFileDescriptor.lo -MF java/io/natFileDescriptor.pp -c
> java/io/natFileDescriptor.cc -o java/io/natFileDescriptor.o
> java/io/natFile.cc: In member function `jboolean
> java::io::File::_access(__java_int)':
> java/io/natFile.cc:41: warning: unused parameter `jint query'
> java/io/natFile.cc: In member function `jlong
> java::io::File::attr(__java_i nt)
> ':
> java/io/natFile.cc:85: warning: unused parameter `jint query'
> java/io/natFile.cc: In member function `virtual java::lang::String*
> java::io::File::getCanonicalPath()':
> java/io/natFile.cc:110: warning: unused variable `char buf2[1024]'
> java/io/natFile.cc: In member function
> `JArray<java::lang::Object*>*
> java::io::File::performList(java::io::FilenameFilter*,
> java::io::FileFilter*, java::lang::Class*)':
> java/io/natFile.cc:141: warning: unused parameter `
> java::io::FilenameFilter*filter'
> java/io/natFile.cc:141: warning: unused parameter `
> java::io::FileFilter*fileFilter'
> java/io/natFile.cc:141: warning: unused parameter `
> java::lang::Class*result_type'
> java/io/natFileDescriptor.cc: In member function `jint
> java::io::FileDescriptor::open(java::lang::String*,
> __java_int)': java/io/natFileDescriptor.cc:125: error:
> `_Jv_platform_close_on_exec' undeclared (first use this function)
> java/io/natFileDescriptor.cc:125: error: (Each undeclared
> identifier is reported only once for each function it appears in.)
> java/io/natFileDescriptor.cc: In member function `void
>
> etc, etc.
>
> Michael, it would really help if you could set up a cross build
> environment so that you can test these issues before you install
> your changes.
Commited a fix. See attachment.
I already have a cross build system for windows. Its impossible to set
up a special cross build system for each possible case of lib
combinations. All I commited worked/compiled fine on my i386-linux
system.
Michael
--
Homepage: http://www.worldforge.org/
GPG-key: http://konqueror.dyndns.org/~mkoch/michael.gpg
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.1554
diff -b -u -r1.1554 ChangeLog
--- ChangeLog 21 Nov 2002 18:01:21 -0000 1.1554
+++ ChangeLog 22 Nov 2002 10:23:15 -0000
@@ -1,3 +1,11 @@
+2002-11-22 Michael Koch <konqueror@gmx.de>
+
+ * include/posix.h:
+ (_Jv_platform_on_close): Moved out of #ifndef DISBALE_JAVA_NET.
+ * include/win32.h:
+ (_Jv_platform_on_close): Moved out of #ifndef DISBALE_JAVA_NET.
+ (backtrace): Moved out of #ifndef DISBALE_JAVA_NET.
+
2002-11-21 Michael Koch <konqueror@gmx.de>
* include/posix.h: I put too much into the #ifndef DISABLE_JAVA_NET.
Index: include/posix.h
===================================================================
RCS file: /cvs/gcc/gcc/libjava/include/posix.h,v
retrieving revision 1.10
diff -b -u -r1.10 posix.h
--- include/posix.h 21 Nov 2002 18:01:22 -0000 1.10
+++ include/posix.h 22 Nov 2002 10:23:15 -0000
@@ -49,6 +49,13 @@
extern void _Jv_platform_initialize (void);
extern void _Jv_platform_initProperties (java::util::Properties*);
+inline void
+_Jv_platform_close_on_exec (jint fd)
+{
+ // Ignore errors.
+ ::fcntl (fd, F_SETFD, FD_CLOEXEC);
+}
+
#ifndef DISABLE_JAVA_NET
static inline int
@@ -67,13 +74,6 @@
_Jv_close (jint fd)
{
return ::close (fd);
-}
-
-inline void
-_Jv_platform_close_on_exec (jint fd)
-{
- // Ignore errors.
- ::fcntl (fd, F_SETFD, FD_CLOEXEC);
}
// Avoid macro definitions of bind from system headers, e.g. on
Index: include/win32.h
===================================================================
RCS file: /cvs/gcc/gcc/libjava/include/win32.h,v
retrieving revision 1.13
diff -b -u -r1.13 win32.h
--- include/win32.h 21 Nov 2002 14:34:12 -0000 1.13
+++ include/win32.h 22 Nov 2002 10:23:15 -0000
@@ -38,6 +38,12 @@
extern void _Jv_platform_initProperties (java::util::Properties*);
extern jlong _Jv_platform_gettimeofday ();
+inline void
+_Jv_platform_close_on_exec (jint)
+{
+ // Ignore.
+}
+
#ifndef DISBALE_JAVA_NET
static inline int
@@ -58,12 +64,6 @@
return ::closesocket (fd);
}
-inline void
-_Jv_platform_close_on_exec (jint)
-{
- // Ignore.
-}
-
inline int
_Jv_bind (int fd, struct sockaddr *addr, int addrlen)
{
@@ -93,12 +93,13 @@
{
return ::recv (s, (char*) buf, len, 0);
}
+
+#endif /* DISBALE_JAVA_NET */
+
#define HAVE_BACKTRACE
/* Store up to SIZE return address of the current program state in
ARRAY and return the exact number of values stored. */
extern int backtrace (void **__array, int __size);
-
-#endif /* DISBALE_JAVA_NET */
#endif /* __JV_WIN32_H__ */