Commit Graph

25 Commits

Author SHA1 Message Date
Tom Tromey 1d336a099d natField.cc (BooleanClass): Don't define.
* java/lang/reflect/natField.cc (BooleanClass): Don't define.
	* java/lang/reflect/natArray.cc (BooleanClass): Don't define.
	* java/lang/Class.h (Object): Added `class$' field.
	* java/lang/Object.h (Object): Added `class$' field.
	* defineclass.cc (ClassClass): Use `class$' form.
	(ClassObject): Likewise.
	* resolve.cc (ClassObject): Use `class$' form.
	(ObjectClass): Likewise.
	* interpret.cc (ClassError): Removed.
	* java/net/natPlainDatagramSocketImpl.cc (BooleanClass): Use
	`class$' form.
	(IntegerClass): Likewise.
	* java/net/natPlainSocketImpl.cc (BooleanClass): Use `class$'
	form.
	* java/lang/natClassLoader.cc (CloneableClass): Use `class$' form.
	(ObjectClass, ClassClass, VMClassLoaderClass, ClassLoaderClass,
	SerializableClass): Likewise.
	Include Serializable.h, Cloneable.h.
	* java/lang/natSystem.cc (SystemClass): Removed.
	(init_properties): Use `class$' form.
	* java/lang/natObject.cc (CloneableClass): Removed.
	(clone): Use `class$' form.
	* java/lang/natClass.cc (CloneableClass): Use `class$' form.
	(ObjectClass, ErrorClass, ClassClass, MethodClass, FieldClass,
	ConstructorClass): Likewise.
	* java/lang/reflect/natMethod.cc (ObjectClass): Use `class$' form.
	(ClassClass, VoidClass, ByteClass, ShortClass, CharacterClass,
	IntegerClass, LongClass, FloatClass, DoubleClass): Likewise.
	* java/io/natObjectInputStream.cc (ObjectClass): Use `class$'
	form.
	(ClassClass): Likewise.
	* include/jvm.h (StringClass): Use `class$' form.
	* prims.cc (ObjectClass): Removed.
	(_Jv_RunMain): Use `class$' form.
	(_Jv_AllocObject): Likewise.
	* jni.cc (ClassClass): Use `class$' form.
	(ThrowableClass): Likewise.
	(ObjectClass): Likewise.
	(MethodClass): Likewise.
	(ThreadGroupClass): Likewise.
	(NativeThreadClass): Likewise.
	* boehm.cc (ObjectClass): Removed.
	(ClassClass): Removed.
	(_Jv_MarkObj): Use `class$' form.
	* gcj/field.h (JvFieldIsRef): Use `class$' form.
	Include RawData.h.

From-SVN: r36740
2000-10-06 01:49:32 +00:00
Bryce McKinlay 56042127de * java/net/natPlainDatagramSocketImpl.cc (mcastGrp): Fix typo.
From-SVN: r36170
2000-09-06 00:04:46 +01:00
Bryce McKinlay a3bcdaf9e9 natPlainDatagramSocketImpl.cc: Change various `JvThrow' calls to `throw'.
2000-09-05  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/net/natPlainDatagramSocketImpl.cc: Change various `JvThrow'
	calls to `throw'.
	(send): Undo last patch.
	Remove the label only.
	(mcastGrp): Ditto.
	* java/net/natPlainSocketImpl.cc: Change various `JvThrow' calls to
	`throw'.
	* java/net/natInetAdress.cc: Ditto.

From-SVN: r36165
2000-09-05 22:57:23 +01:00
Bryce McKinlay 820112852a natIconv.cc (read): Remove unused local.
2000-09-05  Bryce McKinlay  <bryce@albatross.co.nz>

	* gnu/gcj/convert/natIconv.cc (read): Remove unused local.
	(write): Ditto.
	* gnu/gcj/runtime/FileDeleter.java (deleteOnExitNow): Check for null
	stack. Synchronize.
	* java/lang/fdlibm.h: #undef __P if previously defined.
	* java/lang/natSystem.cc (currentTimeMillis): Remove unused local.
	* java/net/natPlainDatagramSocketImpl.cc (send): Remove unreachable
	block.
	(mcastGrp): Ditto.

From-SVN: r36158
2000-09-05 12:05:59 +01:00
Tom Tromey 366a0fd804 natPlainSocketImpl.cc (bind): Don't go to error case when errno not set.
* java/net/natPlainSocketImpl.cc (bind): Don't go to error case
	when errno not set.
	(connect): Likewise.
	(accept): Likewise.
	(getOption): Likewise.
	* java/net/natPlainDatagramSocketImpl.cc (bind): Don't go to error
	case when errno not set.
	(peek): Likewise.
	(send): Likewise.
	(receive): Likewise.
	(mcastGrp): Likewise.
	(setOption): Likewise.
	(getOption): Likewise.

From-SVN: r35617
2000-08-11 03:07:59 +00:00
Tom Tromey f536cd95fb Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (libgcj_la_SOURCES): Added posix.cc.
	* java/net/natPlainSocketImpl.cc: Include posix.h.
	(accept): Use _Jv_select.
	* java/net/natPlainDatagramSocketImpl.cc: Include posix.h.
	(receive): Use _Jv_select.
	* java/io/natFileDescriptorPosix.cc: Include posix.h.
	(available): Use _Jv_select.
	* java/lang/natSystem.cc: Include posix.h.
	(currentTimeMillis): Use _Jv_gettimeofday.
	* include/posix.h: New file.
	* posix.cc: New file.

From-SVN: r35435
2000-08-02 21:54:04 +00:00
Tom Tromey 878885b411 [multiple changes]
2000-03-15  Tom Tromey  <tromey@cygnus.com>

	* java/io/natFileDescriptorWin32.cc (winerr): Now static.

	* prims.cc (win32_exception_handler): Reformatted.

	* include/win32-threads.h (_Jv_HaveCondDestroy): New define.
	(_Jv_HaveMutexDestroy): Likewise.

2000-03-15 Jon Beniston <jb7216@bristol.ac.uk>

	* java/io/natFileDescriptorWin32.cc: New file.
	* java/io/natFileWin32.cc: New file.
	* java/net/natInetAddress.cc: Added conditional inclusion of
	Windows / Winsock headers.
	* java/net/natPlainDatagramSocketImpl.cc: Added conditional
	inclusion of Windows / Winsock headers.
	* java/net/natPlainSocketImpl.cc: Added conditional inclusion of
	Windows / Winsock headers.
	* include/win32-signal.h: New file.
	* include/win32-threads.h: New file.
	* win32-threads.cc: New file.
	* exception.cc (win32_get_restart_frame): New function.
	* prims.cc (win32_exception_handler): New function.
	(main_init) Performs Winsock initialisation.
	(main_init) Installs exeception handler.

From-SVN: r32567
2000-03-15 22:03:19 +00:00
Tom Tromey 2ba5f77454 All files: Updated copyright information.
* All files: Updated copyright information.
	* COPYING: New file.
	* COPYING.LIB: Removed.
	* LIBGCJ_LICENSE: We now use GPL + special exception.

From-SVN: r32387
2000-03-07 19:55:28 +00:00
Tom Tromey 7c734b1758 * All files: Updated copyright to reflect Cygnus purchase.
From-SVN: r31504
2000-01-19 18:39:27 +00:00
Warren Levy 730ecdd3c3 natPlainDatagramSocketImpl.cc (peek): Removed unnecesary comment.
* java/net/natPlainDatagramSocketImpl.cc (peek): Removed unnecesary
	comment.
	(receive): Set the sender's address in the DatagramPacket.

From-SVN: r31218
2000-01-04 22:41:58 +00:00
Bryce McKinlay 5ac99d9adc Boolean.java (Boolean(String)): Set Value' to false on a null String constructor parameter.
1999-12-16  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/lang/Boolean.java (Boolean(String)): Set Value' to false on a
        null String constructor parameter.
        * java/net/natPlainSocketImpl.cc: Remove unneccessary sprintf calls
        for exception messages.
        BooleanClass: declare.
        (setOption): Use BooleanClass instead of Class.forName() for
        instanceof test.
        (bind): Cast 4th parameter of setsockopt to char *' for
        compatibility with older Solaris headers.
        * java/net/natPlainDatagramSocketImpl.cc: Remove unneccessary
        sprintf calls for exception messages.
        BooleanClass, IntegerClass: declare.
        (setOption): Use BooleanClass and IntegerClass, not Class.forName()
        for instanceof test.

From-SVN: r30988
1999-12-17 05:11:28 +00:00
Bryce McKinlay 429d7c746f re GNATS java.net/57 (potential buffer overruns)
1999-11-23  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/net/natPlainSocketImpl.cc: Fix potential buffer overruns in
        Exception messages. PR java.net/57.
        (bind): set SO_REUSEADDR before bind.
        * java/net/natPlainDatagramSocketImpl.cc: Fix potential buffer
        overruns. PR java.net/57.

From-SVN: r30637
1999-11-23 11:40:26 +00:00
Tom Tromey 4b68fe8a36 configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Set classpath when invoking gcj.  Use changequote
	around sed invocation.

	* java/net/natPlainSocketImpl.cc: Stub native functions if
	DISABLE_JAVA_NET is defined.
	* java/net/natPlainDatagramSocketImpl.cc (setTimeToLive): Fixed
	typo in exception string.
	(getTimeToLive): Likewise.
	Stub native functions if DISABLE_JAVA_NET is defined.
	* java/net/natInetAddress.cc: Stub native functions if
	DISABLE_JAVA_NET is defined.
	* configure.host: Disable java.net for mips-tx39.
	* configure, include/config.h.in: Rebuilt.
	* acconfig.h (DISABLE_JAVA_NET): Undefine.
	* configure.in: Added --disable-java-net and new define
	`DISABLE_JAVA_NET'.

From-SVN: r29759
1999-10-02 00:19:01 +00:00
Tom Tromey b65fcf051f * java/net/natPlainDatagramSocketImpl.cc: Indentation fix.
From-SVN: r29737
1999-09-30 22:20:29 +00:00
Tom Tromey 27e934d8ba configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Build include/Makefile.
	* Makefile.in: Rebuilt.
	* Makefile.am (SUBDIRS): Added gcj and include.
	(install-data-local): New target.
	(extra_headers): New macro.
	* include/Makefile.in: New file.
	* include/Makefile.am: New file.

	* interpret.cc: Don't include gcj/field.h or gcj/cni.h.
	* java/lang/reflect/natField.cc: Don't include gcj/field.h or
	gcj/cni.h.
	* boehm.cc: Don't include java-threads.h or gcj/field.h.
	* resolve.cc: Include config.h.
	* defineclass.cc: Include config.h.
	* include/java-interp.h: Don't include config.h.
	* include/jvm.h: Include java-threads.h, Object.h, java-gc.h,
	cni.h.

	* gcj/javaprims.h: Regenerated namespace decls.
	* classes.pl (scan): Don't put `;' after closing brace.

	* Makefile.in: Rebuilt.
	* Makefile.am (INCLUDES): Added -I for top_srcdir.
	* configure.in: Create gcj/Makefile.
	* gcj/Makefile.in: New file.
	* gcj/Makefile.am: New file.
	* java/lang/Object.h: Don't include any other headers.
	* gcj/array.h: Renamed from include/java-array.h.
	* gcj/field.h: Renamed from include/java-field.h.
	* gcj/method.h: Renamed from include/java-method.h.
	* gcj/cni.h, gcj/javaprims.h: Moved from include/.
	Updated all files to reflect new include structure.

From-SVN: r29278
1999-09-10 22:03:10 +00:00
Alexandre Oliva ccfe7e4650 configure.in: Check for in_addr_t in netinet/in.h too.
* configure.in: Check for in_addr_t in netinet/in.h too.  Check
for ip_mreq too.
* acconfig.h: Define HAVE_IN_ADDR_T instead of in_addr_t.
(HAVE_STRUCT_IP_MREQ): Added.
* configure, include/config.h.in: Rebuilt.
* java/net/natInetAddress.cc (aton): Typedef in_addr_t to jint
if needed.
* java/net/natPlainDatagramSocketImpl.cc (McastReq, mcastGrp):
Disable if ip_mreq is not available.

From-SVN: r28798
1999-08-21 14:26:44 +00:00
Bryce McKinlay 25fef12b66 ServerSocket.java: Define ANY_IF.
* java/net/ServerSocket.java: Define ANY_IF.
        (ServerSocket (int,int)): Use ANY_IF instead of null to bind to
        all network interfaces.
        * java/net/DatagramSocket.java (DatagramSocket): ditto.
        * java/net/natPlainSocketImpl.cc (bind): Expect 0.0.0' instead of
        null.
        * java/net/natPlainDatagramSocketImpl (bind): Expect 0.0.0'
        instead of null.

From-SVN: r28429
1999-08-03 01:30:53 +01:00
Alexandre Oliva 130e63de4a configure.in: Check for bstring.h.
1999-08-01  Alexandre Oliva  <oliva@dcc.unicamp.br>

	* configure.in: Check for bstring.h.
	* configure, include/config.h.in: Rebuilt.
	* java/net/natPlainDatagramSocketImpl.cc: #include bstring.h.
	* java/net/natPlainSocketImpl.cc: Likewise.

From-SVN: r28378
1999-08-01 23:39:53 +00:00
Warren Levy 6130b0af10 configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Added inet_ntoa to AC_CHECK_FUNCS.
	* include/config.h.in: Rebuilt.
	* java/net/natPlainDatagramSocketImpl.cc: Added header checking.
	(mcastGrp): Updated FIXME comments.
	(setOption): Fixed typo.
	(getOption):Implemented IP_MULTICAST_IF.

From-SVN: r27929
1999-07-02 18:50:21 +00:00
Warren Levy e75a9d7719 PlainDatagramSocketImpl.java (ttl): Removed.
* java/net/PlainDatagramSocketImpl.java (ttl): Removed.
	* java/net/natPlainDatagramSocketImpl.cc (setTimeToLive): Implemented.
	(getTimeToLive): Implemented.
	(setOption): Implemented IP_MULTICAST_IF.

From-SVN: r27922
1999-07-02 04:25:05 +00:00
Warren Levy 05dfd09c0c DatagramSocketImpl.java (localPort): Fixed typo to match JDK.
* java/net/DatagramSocketImpl.java (localPort): Fixed typo to match JDK.
	* java/net/natPlainDatagramSocketImpl.cc (bind): ditto.
	* java/text/ChoiceFormat.java (nextDouble(double, boolean)): Method
	is not final per JDK.
	* java/util/PropertyResourceBundle.java (handleGetObject): Method is
	public per JDK.
	* java/util/zip/DataFormatException.java: Class extends Exception.
	* java/util/zip/Deflater.java (finalize): Method is protected per JDK.
	* java/util/zip/ZipEntry.java: Class implements ZipConstants.
	* java/util/zip/ZipInputStream.java: ditto.
	(closeEntry): Changed method name to match JDK spec.

From-SVN: r27717
1999-06-23 12:24:59 +00:00
Bryce McKinlay 1920afb3c6 natPlainSocketImpl.cc (bind): Bind to any/all network interfaces if host==NULL.
* java/net/natPlainSocketImpl.cc (bind): Bind to any/all network
        interfaces if host==NULL.
        (accept): Throw message with InterruptedIOException.
        (getOption): Cache localAddress.
        * java/net/natPlainDatagramSocketImpl.cc (bind): Don't need
        'address' for DatagramSocket.
        (setTimeToLive): Fix compiler warnings.
        (getOption): Cache localAddress.
        * java/net/Socket.java (getLocalAddress): Don't need local
        InetAddress object. Add FIXME comment about calling checkConnect().
        * java/net/ServerSocket.java (ServerSocket(int)): Initialize
        connection queue to 50 as per JDK 1.2 docs.
        (ServerSocket(int,int)): Listen on all network interfaces by
        default, per JDK 1.2 docs.
        * java/net/PlainDatagramSocketImpl.java: Don't need 'address'.
        Add localAddress caching.

From-SVN: r27559
1999-06-17 01:21:26 +01:00
Warren Levy 07515641a5 DatagramSocket.java (laddr): Removed.
* java/net/DatagramSocket.java (laddr): Removed.
	(DatagramSocket): Removed attempts to get or set laddr if null.
	(getLocalAddress): Reimplemented per spec.
	* java/net/MulticastSocket.java (setTimeToLive): Throw exception
	when ttl is 0.
	(joinGroup): Throw NullPointerException if any argument is null.
	(leaveGroup): ditto.
	* java/net/PlainDatagramSocketImpl.java: Updated comments.
	* java/net/PlainSocketImpl.java (timeout): Added.
	(getInputStream): Added FIXME comment on how to support timeouts
	for TCP.
	* java/net/ServerSocket.java (ServerSocket): Added FIXME comment.
	* java/net/Socket.java: Added FIXME comments to identify
	conflicting specs between the JCL and JDK 1.2 documents.
	* java/net/natPlainDatagramSocketImpl.cc (bind): Use INADDR_ANY
	if host is null.  Get localport value resolved by kernel if bind
	lport is 0.
	(receive): Implemented support for timeouts in UDP.
	(setOption): Implemented based on natPlainSocketImpl version.
	(getOption): ditto.
	* java/net/natPlainSocketImpl.cc (bind): Get localport value
	resolved by kernel if bind lport is 0.
	(connect): Get localport value resolved by kernel if bind wasn't
	done to set localport.
	(accept): Implemented support for timeouts for ServerSocket.
	(setOption): Save value for SO_TIMEOUT.
	(getOption): Return timeout for SO_TIMEOUT.

From-SVN: r27230
1999-05-28 19:29:53 +00:00
Warren Levy f2ed9e9656 [multiple changes]
1999-05-26  Bryce McKinlay <bryce@albatross.co.nz>
	* java/net/DatagramSocket.java (getSoTimeout): Verify class type.
	* java/net/DatagramSocketImpl.java (getOption): Made abstract.
	(setOption): Made abstract.
	* java/net/PlainDatagramSocketImpl.java: Mirror SocketOptions fields
	to avoid cpp conflicts in native code.
	* java/net/PlainSocketImpl.java: Mirror SocketOptions fields to avoid
	cpp conflicts in native code.
	* java/net/ServerSocket.java (toString): Prepended "ServerSocket".
	* java/net/Socket.java (getLocalAddress): Implemented.
	(setTcpNoDelay): Implemented.
	(getTcpNoDelay): Implemented.
	(setSoLinger): Implemented.
	(getSoLinger): Implemented.
	(getSoTimeout): Verify class type.
	(setSendBufferSize): Implemented.
	(getSendBufferSize): Implemented.
	(setReceiveBufferSize): Implemented.
	(getReceiveBufferSize): Implemented.
	(toString): Prepended "Socket".
	* java/net/SocketImpl.java (toString): Rewritten.
	(getOption): Made abstract.
	(setOption): Made abstract.
	* java/net/natPlainSocketImpl.cc (connect): Set localport properly.
	(setOption): Implemented.
	(getOption): Implemented.
1999-05-26  Warren Levy  <warrenl@cygnus.com>
	* java/net/DatagramSocket.java (DatagramSocket): Get local host
	address when null.  Set SO_REUSEADDR for multicasts.
	(getSoTimeout): Implemented.
	(setSoTimeout): Implemented.
	* java/net/DatagramSocketImpl.java: Implement SocketOptions interface.
	* java/net/MulticastSocket.java (getInterface): Implemented.
	(setInterface): Implemented.
	(setTimeToLive): Check for invalid ttl.
	(joinGroup): Verify multicast address and security.
	(leaveGroup): Verify multicast address and security.
	(send): Implemented.
	* java/net/PlainDatagramSocketImpl.java (timeout): Added.
	(iface): Added.
	(ttl): Added.
	(setOption): Added.
	(getOption): Added.
	(mcastGrp): Added.
	(getTTL): Implemented as non-native.
	(setTTL): ditto.
	(join): ditto.
	(leave): ditto.
	* java/net/ServerSocket.java (setSoTimeout): Implemented.
	(getSoTimeout): Implemented.
	(setSocketFactory): Made synchronized.
	* java/net/Socket.java (setSoTimeout): Implemented.
	(getSoTimeout): Implemented.
	(close): Made synchronized.
	(setSocketImplFactory): Made synchronized.
	* java/net/SocketImpl.java: Implement SocketOptions interface.
	* java/net/natInetAddress.cc: Corrected module name at top of file.
	* java/net/natPlainDatagramSocketImpl.cc (McastReq): Added union.
	(bind): Added FIXME.
	(peek): Implemented.
	(setTTL): Removed.
	(getTTL): Removed.
	(join): Removed.
	(leave): Removed.
	(mcastGrp): Added.
	(setOption): Implemented for SO_REUSEADDR.
	(getOption): Implemented for SO_REUSEADDR.

From-SVN: r27184
1999-05-26 17:00:06 +00:00
Warren Levy 39b1a0588f Makefile.am (ordinary_java_source_files): Added DatagramPacket.java...
* Makefile.am (ordinary_java_source_files): Added DatagramPacket.java,
	DatagramSocket.java, DatagramSocketImpl.java, MulticastSocket.java,
	PlainDatagramSocketImpl.java, and SocketOptions.java.
	(nat_source_files): Added natPlainDatagramSocketImpl.cc.
	* Makefile.in: Rebuilt.
	* java/net/DatagramPacket.java: New file.
	* java/net/DatagramSocket.java: New file.
	* java/net/DatagramSocketImpl.java: New file.
	* java/net/MulticastSocket.java: New file.
	* java/net/PlainDatagramSocketImpl.java: New file.
	* java/net/SocketOptions.java: New file.
	* java/net/natPlainDatagramSocketImpl.cc: New file.

From-SVN: r26997
1999-05-18 18:02:01 +00:00