Commit Graph

807 Commits

Author SHA1 Message Date
Warren Levy 580ac50392 Removed extraneous conflict marker.
From-SVN: r34754
2000-06-28 11:26:42 +00:00
Warren Levy 2017da526c Gnu.java: New file.
* gnu/java/security/provider/Gnu.java: New file.
	* gnu/java/security/provider/SHA.java: New file.
	* gnu/java/security/provider/SHA1PRNG.java: New file.
	* Makefile.am: Added the above files.
	* Makefile.in: Rebuilt.

	* java/io/ObjectStreamClass.java (setUID): Use Gnu SHA instead of SHS.

From-SVN: r34753
2000-06-28 11:24:05 +00:00
Bryce McKinlay 06772c7d0e ThreadGroup.java: Added synchronized flag to many methods.
* ThreadGroup.java: Added synchronized flag to many methods.
	(destroyed_flag): Removed.
	(isDestroyed, removeGroup, removeThread): Test for parent == null.
	(activeCount): Added spec note.

From-SVN: r34750
2000-06-28 07:03:11 +01:00
Warren Levy d9984f96fc Principal.java: New file.
* java/security/Principal.java: New file.
	* Makefile.am: Added Principal.java.
	* Makefile.in: Rebuilt.

From-SVN: r34749
2000-06-28 01:31:42 +00:00
Rolf W. Rasmussen b32dabe5ed MouseEvent.java: Fixed coordinate space confusion.
2000-06-27  Rolf W. Rasmussen  <rolfwr@ii.uib.no>

	* java/awt/event/MouseEvent.java: Fixed coordinate space
	confusion.

From-SVN: r34746
2000-06-27 21:30:34 +00:00
Tom Tromey 56067b0077 PushbackInputStream.java (read): If there are characters in the buffer, don't also call super.read().
* java/io/PushbackInputStream.java (read): If there are characters
	in the buffer, don't also call super.read().
	* java/io/PushbackReader.java (read): If there are characters in
	the buffer, don't also call super.read().

From-SVN: r34745
2000-06-27 21:27:50 +00:00
Tom Tromey 260e1a2bb0 * java/lang/Double.java (valueOf): Call parseDouble().
From-SVN: r34737
2000-06-27 18:35:54 +00:00
Warren Levy 7b245d2461 PropertyChangeEvent.java (oldVal): Renamed to oldValue.
* java/beans/PropertyChangeEvent.java (oldVal): Renamed to oldValue.
	(newVal): Renamed to newValue.
	* java/beans/PropertyVetoException.java (changeEvent): Renamed to evt.
	* java/beans/beancontext/BeanContextServiceRevokedEvent.java
	(revokeNow): Renamed to invalidateRefs.
	* java/io/OptionalDataException.java: Updated FIXME.
	(eof): New placeholder field.
	(length); Ditto.
	* java/io/WriteAbortedException.java (message): Made transient.
	* java/lang/ClassNotFoundException.java: Updated comments for JDK 1.2.
	* java/lang/Throwable.java (stackTrace): Made transient.
	* java/net/InetAddress.java: Made Serializable.
	* java/security/KeyPair.java: Made Serializable.
	* java/security/Provider.java: Replaced with Classpath version that
	implements serialization and proper methods.
	* java/text/ChoiceFormat.java (strings): Renamed to choiceFormats.
	(limits): Renamed to choiceLimits.

Serialization changes per:
http://java.sun.com/products/jdk/1.2/docs/api/serialized-form.html

From-SVN: r34726
2000-06-27 05:10:03 +00:00
Tom Tromey cf036e712c natDouble.cc (parseDouble): Renamed from doubleValueOf.
* java/lang/natDouble.cc (parseDouble): Renamed from
	doubleValueOf.
	* java/lang/Double.java (parseDouble): Renamed from
	doubleValueOf.  Now public.

From-SVN: r34679
2000-06-24 18:11:01 +00:00
Andrew Haley 56e3dd2cea ieeefp.h: Handle ia64, fr30, mcore.
* java/lang/ieeefp.h: Handle ia64, fr30, mcore.
	* java/lang/natThrowable.cc: On IA-64, use __ia64_backtrace.

From-SVN: r34667
2000-06-23 19:53:33 +00:00
Tom Tromey 782c59d653 natMethod.cc: Include <alloca.h>.
* java/lang/reflect/natMethod.cc: Include <alloca.h>.
	* java/lang/natDouble.cc: Always include <alloca.h>.
	Fix for PR libgcj/267.

From-SVN: r34665
2000-06-23 17:39:00 +00:00
Bryce McKinlay 0ee935e162 ThreadGroup.java (add(Thread)): Rename to addThread() to comply with classpath VM spec.
2000-06-21  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/ThreadGroup.java (add(Thread)): Rename to addThread() to
	comply with classpath VM spec.
	(add(Group)): Rename to addGroup().
	* java/lang/Thread.java (Thread): Use addThread().
	* java/lang/natThread.cc (finish_): Use removeThread().

From-SVN: r34627
2000-06-21 04:55:35 +01:00
Bryce McKinlay 6dfd8a7790 ThreadGroup.java: Merged with classpath.
2000-06-20  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/ThreadGroup.java: Merged with classpath.
	* prims.cc (_Jv_RunMain): Don't use 
ain_group'.
	* gnu/gcj/runtime/FirstThread.java: Remove ThreadGroup constructor
	argument.
	* java/lang/Thread.java (Thread): Bootstrap initial thread from
	ThreadGroup.root if Thread.currentThread is null. Honour the
	ThreadGroup's max priority setting.

From-SVN: r34615
2000-06-20 14:30:14 +01:00
Tom Tromey d4d17e95f1 re GNATS gcj/260 ("Klass.class" expression should cause Klass to be initialized)
* java/lang/natClass.cc (forName): Removed dead code.  Initialize
	returned class.  For PR gcj/260.

From-SVN: r34590
2000-06-18 22:14:06 +00:00
Tom Tromey 3fff847575 re GNATS libgcj/261 (Macro-inconsistency)
Fix for PR libgcj/261:
	* include/win32-signal.h (MAKE_THROW_FRAME): Added `_exception'
	argument.
	* include/sparc-signal.h (MAKE_THROW_FRAME): Added `_exception'
	argument.  (This is a patch from long ago that somehow went
	missing.)

From-SVN: r34575
2000-06-16 15:52:24 +00:00
Tom Tromey ff1c0096a1 natIconv.cc (iconv_adapter): New function.
* gnu/gcj/convert/natIconv.cc (iconv_adapter): New function.
	(read): Use it.
	(write): Likewise.

From-SVN: r34570
2000-06-16 01:11:12 +00:00
Bryce McKinlay 1bf8972740 2000-06-15 Bryce McKinlay <bryce@albatross.co.nz>
Fix for PR java.lang/258:
	* prims.cc (_Jv_PrimClass): Set state of primitive class to
	JV_STATE_DONE, to prevent accidental initialization.
	* java/lang/natClass.cc (_Jv_IsAssignableFrom): Call
	_Jv_InterfaceAssignableFrom if target is an interface and source is
	an interface or an abstract class. Remove redundant initializeClass
	calls. Remove duplicate if_idt test.
	(_Jv_InterfaceAssignableFrom): New function.
	* java/lang/Class.h (_Jv_InterfaceAssignableFrom): Prototype.

From-SVN: r34563
2000-06-15 13:04:50 +01:00
Bryce McKinlay d655f87d6f 2000-06-15 Bryce McKinlay <bryce@albatross.co.nz>
Fix for PR java.lang/258:
	* prims.cc (_Jv_PrimClass): Set state of primitive class to
	JV_STATE_DONE, to prevent accidental initialization.
	* java/lang/natClass.cc (_Jv_IsAssignableFrom): Call
	_Jv_InterfaceAssignableFrom if target is an interface and source is
	an interface or an abstract class. Remove redundant initializeClass
	calls. Remove duplicate if_idt test.
	* java/lang/Class.h (_Jv_InterfaceAssignableFrom): New function.

From-SVN: r34562
2000-06-15 12:58:18 +01:00
Tom Tromey c74e221410 prims.cc (DECLARE_PRIM_TYPE): Define a vtable as well.
* prims.cc (DECLARE_PRIM_TYPE): Define a vtable as well.
	(_Jv_PrimClass): Set `methods' by calling _Jv_FindArrayClass.
	* include/jvm.h (struct _Jv_ArrayVTable): Declare.
	(NUM_OBJECT_METHODS): New define.
	* java/lang/natClassLoader.cc (_Jv_FindArrayClass): Added
	`array_vtable' parameter.  Added assertion.
	* java/lang/Class.h (_Jv_FindArrayClass): Added `array_vtable'
	parameter.

From-SVN: r34312
2000-05-31 23:50:37 +00:00
Bryce McKinlay f1aa7a521a cni.h: Include <string.h>.
2000-05-31  Bryce McKinlay  <bryce@albatross.co.nz>

	* gcj/cni.h: Include <string.h>.
	* defineclass.cc: Include <alloca.h>.
	* interpret.cc: Ditto.
	* gij.cc: Include <stdlib.h>.

From-SVN: r34311
2000-05-31 23:49:19 +01:00
Tom Tromey efc7058478 name-finder.h: Include <sys/wait.h>.
* include/name-finder.h: Include <sys/wait.h>.
	(_Jv_name_finder::pid): Now of type `pid_t'.
	(_Jv_name_finder::~_Jv_name_finder): Call waitpid().
	* java/lang/Throwable.java (CPlusPlusDemangler.close): Call
	`proc.waitFor()'.

From-SVN: r34279
2000-05-30 23:26:02 +00:00
Warren Levy 0d0cd44169 ObjectOutputStream.java (writeObject): Use component type when writing arrays.
* java/io/ObjectOutputStream.java (writeObject): Use component type
	when writing arrays.
	Fixed typo.

From-SVN: r34142
2000-05-24 21:15:51 +00:00
Bryce McKinlay 1c02a3d964 re GNATS libgcj/226 (implicit __builtin_expect) and GNATS gcj/228 (compressed JAR files)
2000-05-20  Bryce McKinlay  <bryce@albatross.co.nz>

	Fix for PR libgcj/226:
	* java/lang/Class.h (_Jv_InitClass): Don't call __builtin_expect,
	since this is an installed header.

	Fix for PR libgcj/228:
	* java/util/zip/ZipFile (getInputStream): Create inflater with
	nowrapper option.

	* java/util/zip/natInflater.cc (inflate): Throw zlib's error message
	with DataFormatException.

From-SVN: r34064
2000-05-21 00:30:46 +01:00
Tom Tromey fa5b690ab6 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (hack1): Removed.
	(awto_files): Likewise.
	(libgcjawt_la_SOURCES): Likewise.
	(EXTRA_libgcjawt_la_SOURCES): Likewise.
	(libgcjawt_la_DEPENDENCIES): Likewise.
	(libgcjawt_la_LIBADD): Likewise.
	(libgcjawt_la_LDFLAGS): Likewise.
	(libgcjawt_la_LINK): Likewise.
	($(awt_java_source_files:.java=.class)): Likewise.
	(libgcj.zip): Don't depend on AWT files.
	(MOSTLYCLEANFILES): Don't include AWT files.
	($(awto_files)): Removed.
	(nat_headers): Removed AWT files.
	(cond_awt_java_source_files): Removed.
	(ordinary_java_source_files): Added awt_java_source_files.
	* libgcj.spec.in (*lib): Removed -lgcjawt.
	* configure: Rebuilt.
	* configure.in: Removed --enable-java-awt option.

From-SVN: r34058
2000-05-20 20:26:51 +00:00
Bryce McKinlay ee2f99a584 ZipEntry.java: Implement Cloneable, per JDK1.2 docs.
2000-05-20  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/util/zip/ZipEntry.java: Implement Cloneable, per JDK1.2 docs.
	(ZipEntry): Copy the Name' field.
	(clone): Implement JDK1.2 method.
	(setCompressedSize): ditto.
	(hashCode): ditto.

From-SVN: r34043
2000-05-20 06:46:20 +01:00
Tom Tromey ee7ea78d2a Removed duplicate ChangeLog entry
From-SVN: r34042
2000-05-20 01:17:57 +00:00
Tom Tromey 1dcc053603 BufferedWriter.java: Merged with Classpath.
* java/io/BufferedWriter.java: Merged with Classpath.
	* java/io/BufferedOutputStream.java: Merged with Classpath.

From-SVN: r34041
2000-05-19 23:35:34 +00:00
Tom Tromey 6c80c45e30 Jumbo patch:
* Imported beans and serialization
* Updated IA-64 port
* Miscellaneous bug fixes

From-SVN: r34028
2000-05-19 17:55:34 +00:00
Bryce McKinlay c1f76317e4 From Gregory R. Warnes <warnes@biostat.washington.edu>:
* gnu/gcj/protocol/jar/Connection.java (getJarFile): Test for null
	`jarFile', not `jarFileURL'.

From-SVN: r34005
2000-05-19 00:50:34 +01:00
Bryce McKinlay fc5b21380e Thread.java: Declare `data' as Object, not RawData.
2000-05-18  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/Thread.java: Declare `data' as Object, not RawData.
	* java/lang/natThread.java (initialize_native): Cast `data' to
	jobject.
	* gnu/gcj/RawData.java: Clarify documentation.

From-SVN: r33981
2000-05-18 11:08:25 +01:00
Andrew Haley 3951562dfa ppc-signal.h: New file.
2000-05-15  Andrew Haley  <aph@cygnus.com>

        * include/ppc-signal.h: New file.

From-SVN: r33932
2000-05-16 14:38:21 +00:00
Tom Tromey 839ba6c895 ZipInputStream.java (getNextEntry): When reading file headers, don't include `size' in the skip call.
* java/util/zip/ZipInputStream.java (getNextEntry): When reading
	file headers, don't include `size' in the skip call.

From-SVN: r33850
2000-05-11 17:05:03 +00:00
Bryce McKinlay ac83e16bc4 StringBuffer.java (replace): Calculate length for arraycopy() correctly.
2000-05-10  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/StringBuffer.java (replace): Calculate length for
	arraycopy() correctly.

From-SVN: r33822
2000-05-10 12:13:17 +01:00
Bryce McKinlay fe517fb2c9 StringBuffer.java (delete): Call arrayCopy() correctly.
2000-05-10  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/StringBuffer.java (delete): Call arrayCopy() correctly.
	Avoid arrayCopy() call where possible. Update `count' _after_ calling
	arrayCopy().
	(replace): Reimplemented. Fix javadoc.
	(reverse): Call ensureCapacity_unsynchronized().
	(StringBuffer (String)): Use DEFAULT_CAPACITY.

From-SVN: r33819
2000-05-10 11:15:13 +01:00
Tom Tromey 2238de654f StringBuffer.java (toString): Don't mark buffer as shared.
* java/lang/StringBuffer.java (toString): Don't mark buffer as
	shared.
	(insert(int,char[],int,int): New method.
	(delete): New method from Classpath.
	(deleteCharAt): Likewise.
	(substring): Likewise.
	(shared): No longer private.
	Added JavaDoc comments from Classpath.
	* java/lang/String.java (String(StringBuffer)): Ensure `buffer' is
	shared.

From-SVN: r33809
2000-05-09 22:46:58 +00:00
Tom Tromey 89b6698a3e Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (LIBLINK): New macro.
	(libgcj_la_LINK): Use it.
	(libgcjawt_la_LINK): Likewise.

From-SVN: r33760
2000-05-07 16:02:00 +00:00
Tom Tromey fad163ed2f Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (libgcj.zip): Don't pass -L to javac.

From-SVN: r33728
2000-05-06 16:25:13 +00:00
Tom Tromey 327f248083 re GNATS libgcj/220 (build fails with "only absolute run-paths are allowed" error during linking)
Fix for PR libgcj/220:
	* Makefile.in: Rebuilt.
	* Makefile.am (gij_LDFLAGS): Don't use libstdc++.
	(jv_convert_LDFLAGS): Likewise.
	(libgcj_la_LDFLAGS): Likewise.
	(GCJLINK): New macro.
	(jv_convert_LINK): Use it.
	(gij_LINK): Likewise.
	(libgcj_la_LINK): New macro.
	(libgcjawt_la_LINK): Likewise.

From-SVN: r33706
2000-05-05 16:11:36 +00:00
Tom Tromey a52dee2f36 field.h (JvFieldIsRef): Return false for gnu.gcj.RawData field.
* gcj/field.h (JvFieldIsRef): Return false for gnu.gcj.RawData
	field.
	* boehm.cc (_Jv_MarkObj): Removed dead code.  Use `STATIC', not
	`0x0008'.
	Include Modifier.h.

From-SVN: r33702
2000-05-05 04:46:26 +00:00
Bryce McKinlay 9d4c21486c natClass.cc (isInstance): Use __builtin_expect.
2000-05-05  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/natClass.cc (isInstance): Use __builtin_expect.
	(_Jv_IsAssignableFrom): Ditto.
	(_Jv_IsInstanceOf): Ditto.
	(_Jv_CheckCast): Ditto.
	(_Jv_CheckArrayStore): Ditto.
	* java/lang/Class.h (_Jv_InitClass): Ditto.
	* java/lang/natObject.cc (_Jv_MonitorEnter): __builtin_expect `false',
	not `0'.
	(notify): Ditto.
	(notifyAll): Ditto.
	(wait): Ditto.
	(_Jv_MonitorExit): Ditto.
	* boehm.cc (_Jv_MarkObj): Ditto.
	(_Jv_MarkObj): Ditto.
	(_Jv_MarkArray): Ditto.
	* prims.cc (_Jv_AllocObject): Ditto.
	(_Jv_NewObjectArray): Ditto.
	(_Jv_NewPrimArray): Ditto.
	(_Jv_Malloc): Ditto.
	(_Jv_Realloc): Ditto.
	(_Jv_MallocUnchecked): Ditto.
	(_Jv_divI): Ditto.
	(_Jv_remI): Ditto.
	(_Jv_divJ): Ditto.
	(_Jv_remJ): Ditto.

From-SVN: r33698
2000-05-05 03:56:14 +01:00
Tom Tromey aff3283b59 Removed erroneous ChangeLog entry
From-SVN: r33672
2000-05-04 15:51:47 +00:00
Tom Tromey f70b7142c2 Locale.java (Locale): Don't explicitly check for null.
* java/util/Locale.java (Locale): Don't explicitly check for
	null.
	* java/util/Hashtable.java (containsKey): Don't explicitly check
	for null.
	(get): Likewise.
	* java/util/BitSet.java (and, or, xor): Don't explicitly check for
	null.
	* java/util/zip/ZipEntry.java (ZipEntry): Don't explicitly check
	for null.
	* java/text/StringCharacterIterator.java
	(StringCharacterIterator): Don't check for null.
	* java/text/ChoiceFormat.java (setChoices): Don't explicitly check
	for null pointer.
	* java/net/MulticastSocket.java (joinGroup): Don't explicitly
	check for null pointer.
	(leaveGroup): Likewise.
	* java/net/DatagramPacket.java (DatagramPacket): Removed erroneous
	comment.
	(setData): Likewise.
	* java/lang/ThreadGroup.java (ThreadGroup): Don't explicitly check
	for `p==null'.

From-SVN: r33671
2000-05-04 15:50:34 +00:00
Jakub Jelinek 1f57788658 Makefile.am (GCJCOMPILE, [...]): Move -L option out of FLAGS.
2000-04-28  Jakub Jelinek  <jakub@redhat.com>

	* Makefile.am (GCJCOMPILE, JCFLAGS, JF1CLAGS, jv_convert_LINK,
	gij_LINK, libgcj.zip, .java=.class): Move -L option out of FLAGS.
	(libgcj_la_LDFLAGS): Add -L../libstdc++ for in-gcc builds.
	(jv_convert_LDFLAGS, gij_LDFLAGS): Add `pwd`/../libstdc++ to
	-rpath for in-gcc builds.
	* Makefile.in: Rebuilt.

From-SVN: r33587
2000-05-01 21:36:39 +00:00
Tom Tromey 72ddef6d32 Removed mistakenly-committed ChangeLog entry
From-SVN: r33512
2000-04-28 16:29:30 +00:00
Tom Tromey f9f70f2dda re GNATS gcj/218 (Java executables can abort trying to access a null pointer in a leaf function)
* libgcj.spec.in (*jc1): Added -fasynchronous-exceptions.
	Fix for PR gcj/218.

From-SVN: r33511
2000-04-28 16:11:56 +00:00
Bryce McKinlay 065ccab369 String.java (toString): Remove `final' hack.
2000-04-28  Bryce McKinlay  <bryce@albatross.co.nz>

	* libjava/java/lang/String.java (toString): Remove `final' hack.

From-SVN: r33508
2000-04-28 08:56:34 +01:00
Tom Tromey 40f4ae3280 Runtime support for PR gcj/2:
* prims.cc (_Jv_ThrowNullPointerException): New function.
	* include/jvm.h (_Jv_ThrowNullPointerException): Declare.

From-SVN: r33492
2000-04-27 23:13:31 +00:00
Bryce McKinlay af4464eb46 prims.cc (_Jv_NewObjectArray): Fix typo.
2000-04-27  Bryce McKinlay  <bryce@albatross.co.nz>

        * prims.cc (_Jv_NewObjectArray): Fix typo.

From-SVN: r33479
2000-04-27 12:47:13 +01:00
Tom Tromey 09acb3e19d Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (AM_CXXFLAGS): Added -fasynchronous-exceptions.

From-SVN: r33447
2000-04-26 17:29:05 +00:00
Jeff Sturm 448415dcae natFirstThread.cc (run): Initialize class before calling main.
* gnu/gcj/runtime/natFirstThread.cc (run): Initialize class before
	calling main.

From-SVN: r33377
2000-04-24 15:07:16 +00:00
Anthony Green 1143c0a03f + 2000-04-22 Anthony Green <green@cygnus.com> + + * include/jvm.h (__builtin_expect): Define as unused for now.
+ 2000-04-22  Anthony Green  <green@cygnus.com>
+
+ 	* include/jvm.h (__builtin_expect): Define as unused for now.
+ 	* java/lang/natObject.cc (_Jv_MonitorEnter): Add __builtin_expect.
+ 	(notify): Ditto.
+ 	(notifyAll): Ditto.
+ 	(wait): Ditto.
+ 	(_Jv_MonitorExit): Ditto.
+ 	* boehm.cc (_Jv_MarkObj): Ditto.
+ 	(_Jv_MarkObj): Ditto.
+ 	(_Jv_MarkArray): Ditto.
+ 	(_Jv_AllocBytes): Ditto.
+ 	* prims.cc (_Jv_AllocObject): Ditto.
+ 	(_Jv_NewObjectArray): Ditto.
+ 	(_Jv_NewPrimArray): Ditto.
+ 	(_Jv_Malloc): Ditto.
+ 	(_Jv_Realloc): Ditto.
+ 	(_Jv_MallocUnchecked): Ditto.
+ 	(_Jv_divI): Ditto.
+ 	(_Jv_remI): Ditto.
+ 	(_Jv_divJ): Ditto.
+ 	(_Jv_remJ): Ditto.
+
+ 	* include/Makefile.in: Rebuilt.
+ 	* include/Makefile.am (include_HEADERS): Add jvmpi.h.
+

From-SVN: r33339
2000-04-22 17:09:39 +00:00
Tom Tromey 6cd167e1a7 PipedInputStream.java, [...]: Yet another new version from Classpath.
* java/io/PipedInputStream.java, java/io/PipedOutputStream.java:
	Yet another new version from Classpath.

From-SVN: r33328
2000-04-21 21:41:32 +00:00
Tom Tromey 7234f9bc03 re GNATS libgcj/15 (_REENTRANT should be defined more consistently)
Fix for PR libgcj/15:
	* java/util/natGregorianCalendar.cc (_REENTRANT,
	_POSIX_PTHREAD_SEMANTICS): Don't define.
	* java/net/natInetAddress.cc (_REENTRANT): Don't define.
	* java/lang/natSystem.cc (_REENTRANT, _POSIX_PTHREAD_SEMANTICS):
	Don't define.
	* java/io/natFile.cc (_REENTRANT, _POSIX_PTHREAD_SEMANTICS): Don't
	define.
	* configure: Rebuilt.
	* configure.in: If using POSIX threads, define _REENTRANT if
	needed.  Define _POSIX_PTHREAD_SEMANTICS.  Don't define
	GETHOSTBYNAME_R_NEEDS_REENTRANT.

From-SVN: r33318
2000-04-21 20:38:43 +00:00
Tom Tromey 051d082b26 PipedInputStream.java, [...]: New version from Classpath.
* java/io/PipedInputStream.java, java/io/PipedReader.java,
	java/io/PipedOutputStream.java, java/io/PipedWriter.java: New
	version from Classpath.

From-SVN: r33316
2000-04-21 20:12:05 +00:00
Tom Tromey 93bc735f86 re GNATS libgcj/213 (Another parallel build error)
Fix for PR libgcj/213:
	* Makefile.in: Rebuilt.
	* Makefile.am (gij_SOURCES): Added gij.cc.
	(EXTRA_gij_SOURCES): Removed.
	(gij_LDADD): Removed gij.lo.
	(gij_DEPENDENCIES): Likewise.
	($(gij_OBJECTS)): Depend on nat_headers.

From-SVN: r33307
2000-04-21 14:23:44 +00:00
Tom Tromey ab8d774e06 Handler.java (openConnection): Use `setURL', not `url.set'.
* gnu/gcj/protocol/file/Handler.java (openConnection): Use
	`setURL', not `url.set'.

From-SVN: r33306
2000-04-21 14:18:49 +00:00
Tom Tromey d3474943bf Fix for PR java.io/204:
* java/io/PipedInputStream.java, java/io/PipedReader.java,
	java/io/PipedOutputStream.java, java/io/PipedWriter.java: Imported
	from Classpath.

From-SVN: r33300
2000-04-21 01:18:16 +00:00
Tom Tromey 18fcc4961b re GNATS libgcj/212 (build is broken on Linux/Alpha)
Fix for PR libgcj/212:
	* gcj/javaprims.h (_Jv_word, _Jv_word2): Removed definitions.
	* include/jvm.h (_Jv_word, _Jv_word2): Define.
	* java/lang/Class.h (_Jv_word): Declare.

From-SVN: r33292
2000-04-20 22:24:33 +00:00
Tom Tromey 6e84eab83f * jni.cc (_Jv_JNI_PopSystemFrame): Clear `env->ex'.
From-SVN: r33285
2000-04-20 17:39:30 +00:00
Tom Tromey af98124ef9 jni.cc (_Jv_JNI_FindClass): Use system class loader if class doesn't have a loader.
* jni.cc (_Jv_JNI_FindClass): Use system class loader if class
	doesn't have a loader.

From-SVN: r33272
2000-04-20 05:49:48 +00:00
Bryce McKinlay 4824d1bb6e boehm.cc: (_Jv_MarkObj...
2000-04-19  Bryce McKinlay  <bryce@albatross.co.nz>

	* boehm.cc: (_Jv_MarkObj, _Jv_MarkArray): Cast pointers for
	MAYBE_MARK to ptr_t, for compatibility with new GC version.

From-SVN: r33252
2000-04-19 11:10:39 +01:00
Bryce McKinlay 8bfecb841a re GNATS java.io/202 (File creation doesn't observe umask)
2000-04-16  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/io/natFileDescriptorPosix.cc (open): Use mode 0666. Fix for
	PR libgcj/202.
	(available): Initialize `Where' to prevent bogus compiler warning.

From-SVN: r33181
2000-04-16 04:09:27 +01:00
Tom Tromey cc309dd512 natString.cc (intern): Temporarily disable finalizer registration.
* java/lang/natString.cc (intern): Temporarily disable finalizer
	registration.

From-SVN: r33127
2000-04-12 21:17:00 +00:00
Tom Tromey 50b99cc8fe natString.cc (unintern): Added `obj' argument.
* java/lang/natString.cc (unintern): Added `obj' argument.
	(intern): Register finalizer for string.
	* java/lang/String.java (unintern): Now static; added obj
	argument.

From-SVN: r33124
2000-04-12 20:45:59 +00:00
Tom Tromey c23c855f38 Vector.java (VectorEnumeration): Now `final'.
* java/util/Vector.java (VectorEnumeration): Now `final'.
	* java/util/Hashtable.java (HashtableEntry): Now `final'.
	(HashtableEnumeration): Likewise.
	* java/util/zip/ZipFile.java (ZipEnumeration): Now `final'.
	* java/text/RuleBasedCollator.java (RBCElement): Now `final'.

From-SVN: r33083
2000-04-11 20:02:48 +00:00
Warren Levy d0123c54ca ObjectStreamException.java: New file.
* java/io/ObjectStreamException.java: New file.
	* java/io/OptionalDataException.java: New file.
	* java/io/StreamCorruptedException.java: New file.
	* java/math/BigDecimal.java: New file.
	* java/sql/CallableStatement.java: New file.
	* java/sql/Connection.java: New file.
	* java/sql/DataTruncation.java: New file.
	* java/sql/DatabaseMetaData.java: New file.
	* java/sql/Date.java: New file.
	* java/sql/Driver.java: New file.
	* java/sql/DriverManager.java: New file.
	* java/sql/DriverPropertyInfo.java: New file.
	* java/sql/PreparedStatement.java: New file.
	* java/sql/ResultSet.java: New file.
	* java/sql/ResultSetMetaData.java: New file.
	* java/sql/SQLException.java: New file.
	* java/sql/SQLWarning.java: New file.
	* java/sql/Statement.java: New file.
	* java/sql/Time.java: New file.
	* java/sql/Timestamp.java: New file.
	* java/sql/Types.java: New file.
	* Makefile.am: Added above new files.
	* Makefile.in: Rebuilt.

	* mauve-libgcj: Turned on java.math, java.sql and java.security tests.
	* java/net/MulticastSocket.java (MulticastSocket): Pass values a la
	DatagramSocket constructor instead of null.

java.sql is JDK 1.1 Compliant

From-SVN: r33077
2000-04-11 09:21:53 +00:00
Anthony Green e472b4f96b posix-threads.h (_Jv_MutexUnlock): Replace _JV_NOT_OWNER.
2000-04-08  Anthony Green  <green@cygnus.com>

	* include/posix-threads.h (_Jv_MutexUnlock): Replace
	_JV_NOT_OWNER.

From-SVN: r33039
2000-04-09 06:53:00 +00:00
Anthony Green 568fe067bc posix-threads.cc (_Jv_MutexLock): Moved back to posix-threads.h.
2000-04-08  Anthony Green  <green@cygnus.com>

	* posix-threads.cc (_Jv_MutexLock): Moved back to posix-threads.h.
	(_Jv_MutexUnlock): Ditto.
	* include/posix-threads.h (_Jv_MutexLock): From posix-threads.cc.
	(_Jv_MutexUnlock): Ditto.

From-SVN: r33037
2000-04-09 05:41:56 +00:00
Anthony Green bdf2ced905 StringBuffer.java (ensureCapacity): Don't call Math::max.
2000-04-08  Anthony Green  <green@cygnus.com>

	* java/lang/StringBuffer.java (ensureCapacity): Don't call Math::max.
	(ensureCapacity_unsynchronized): New private method.
	(append): Use ensureCapacity_unsynchronized.

From-SVN: r33036
2000-04-09 04:52:43 +00:00
Tom Tromey 4eaf5996ad Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added new files.
	* java/awt/IllegalComponentStateException.java: New file.
	* java/awt/ItemSelectable.java: New file.
	* java/awt/event/WindowEvent.java: Finished.
	* java/awt/event/TextEvent.java: Finished.
	* java/awt/event/ContainerEvent.java: New file.
	* java/awt/Component.java (getX, getY): New methods.
	* java/awt/event/PaintEvent.java: New file.
	* java/awt/event/MouseEvent.java: New file.
	* java/awt/ActiveEvent.java: New file.
	* java/awt/event/KeyEvent.java: Finished.
	* java/awt/event/ItemEvent.java: New file.
	* java/awt/Adjustable.java: New file.
	* java/awt/event/InputMethodEvent.java: New file.
	* java/awt/event/InputEvent.java: Finished.
	* java/awt/event/FocusEvent.java: New file.
	* java/awt/event/MouseMotionAdapter.java: New file.
	* java/awt/event/MouseAdapter.java: New file.
	* java/awt/event/KeyAdapter.java: New file.
	* java/awt/event/FocusAdapter.java: New file.
	* java/awt/event/ContainerAdapter.java: New file.
	* java/awt/event/ComponentEvent.java: Finished.
	* java/awt/event/AdjustmentEvent.java: New file.
	* java/awt/event/ComponentAdapter.java: New file.
	* java/awt/event/ActionEvent.java: Finished.
	* java/awt/event/MouseMotionListener.java: New file.
	* java/awt/event/MouseListener.java: New file.
	* java/awt/event/ItemListener.java: New file.
	* java/awt/event/InputMethodListener.java: New file.
	* java/awt/event/ContainerListener.java: New file.
	* java/awt/event/FocusListener.java: New file.
	* java/awt/event/ComponentListener.java: New file.
	* java/awt/event/AWTEventListener.java: New file.
	* java/awt/event/AdjustmentListener.java: New file.

From-SVN: r33034
2000-04-09 04:13:27 +00:00
Anthony Green 3bd835f73f natObject.cc (_Jv_MonitorEnter): Only perform null check when we have to.
2000-04-08  Anthony Green  <green@redhat.com>

	* java/lang/natObject.cc (_Jv_MonitorEnter): Only perform null
	check when we have to.

	* gcj/array.h: Mark elements(JArray<T>& x) and elements(JArray<T>*
	x) as `inline'.

	* java/util/StringTokenizer.java: Minor optimization.  Eliminates
	one method call.

	* java/util/Vector.java (VectorEnumeration.nextElement): Manually
	inline hasMoreElements.

From-SVN: r33033
2000-04-09 01:26:20 +00:00
Tom Tromey 24969f074e configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Recognize --enable-java-awt.
	(AWT): New conditional.
	* Makefile.in: Rebuilt.
	* Makefile.am (toolexeclib_LTLIBRARIES): Build libgcjawt.la if
	requested.
	(libgcjawt_la_SOURCES): New macro.
	(EXTRA_libgcjawt_la_SOURCES): Likewise.
	(libgcjawt_la_DEPENDENCIES): Likewise.
	(libgcjawt_la_LIBADD): Likewise.
	(libgcjawt_la_LDFLAGS): Likewise.
	(libgcj.zip): Depend on cond_java_awt_source_files
	(cond_awt_java_source_files): New macro.
	(MOSTLYCLEANFILES): Added awto_files.
	(awto_files): New macro.  Use where javao_files used.
	(nat_headers): Use cond_awt_java_source_files.

From-SVN: r32954
2000-04-06 00:29:39 +00:00
Tom Tromey 69c0caa166 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added AWTException.java.
	* java/awt/AWTException.java: New file.

From-SVN: r32907
2000-04-04 19:56:20 +00:00
Tom Tromey 6719cc92e8 jvm.h (_Jv_GetArrayElementFromElementType): More commentary from Alex.
* include/jvm.h (_Jv_GetArrayElementFromElementType): More
	commentary from Alex.

From-SVN: r32894
2000-04-03 23:36:49 +00:00
Tom Tromey 0c2534d98d Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am ($(javao_files)): Depend on libgcj.zip.
	From H.J. Lu.

From-SVN: r32885
2000-04-03 18:07:45 +00:00
Anthony Green 54c2f04ba0 JVMPI changes...
Sun Apr  2 08:27:18 2000  Anthony Green  <green@redhat.com>

        * configure: Rebuilt.
	* configure.in: Add --disable-jvmpi.
        * include/config.h.in: Rebuilt.
        * acconfig.h: Add ENABLE_JVMPI.

	* include/jvm.h: Declare _Jv_DisableGC and _Jv_EnableGC.
        (_Jv_JVMPI_Notify_OBJECT_ALLOC): New define.
        (_Jv_JVMPI_Notify_THREAD_END): New define.
        (_Jv_JVMPI_Notify_THREAD_END): New define.
        * prims.cc (_Jv_JVMPI_Notify_OBJECT_ALLOC): Declare.
	(_Jv_JVMPI_Notify_THREAD_END): Declare.
        (_Jv_JVMPI_Notify_THREAD_END): Declare.

	* prims.cc (_Jv_AllocObject): Generate JVMPI object allocation
        events.

        * java/lang/natThread.cc: Include JVMPI headers if necessary.
        (finish_): Generate JVMPI thread end events.
        (run_): Generate JVMPI thread start events.
	* gnu/gcj/runtime/natFirstThread.cc (run): Call JNI_OnLoad for any
        preloaded JNI library.
        Include JVMPI headers if necessary.
        (run): Generate JVMPI thread start events.

        * boehm.cc: Define GC_disable and GC_enable.
	(_Jv_DisableGC): New function.
        (_Jv_EnableGC): New function.
        (disable_gc_mutex): Declare.
        * nogc.cc (_Jv_DisableGC): New function.
	(_Jv_EnableGC): New function.

        * jni.cc (_Jv_JNI_GetEnv): Handle JVMPI interface requests.
        (_Jv_JVMPI_Interface): Define.
        (jvmpiEnableEvent): New function.
        (_Jv_JNI_Init): Initialize _Jv_JVMPI_Interface.

        * include/jvmpi.h: New file.

From-SVN: r32866
2000-04-02 15:34:17 +00:00
Bryce McKinlay 8e4b9c9713 Synchronized gcjh commands for java/lang/Thread.h with Makefile.in.
From-SVN: r32776
2000-03-28 05:43:44 +01:00
Bryce McKinlay b834f1fa06 Makefile.in: New #defines and friends for Thread.h.
* Makefile.in: New #defines and friends for Thread.h.
        * posix-threads.cc: (struct starter): Remove `object'.
        (_Jv_CondWait): Use interruptable condition variables and new
        recursive mutexes. New return codes on interrupt or non-ownership
        of mutex.
        (_Jv_CondNotify): Ditto.
        (_Jv_CondNotifyAll): Ditto.
        (_Jv_ThreadInterrupt): Set thread interrupt flag directly. Interrupt
        the target thread by signaling its wait condition.
        (_Jv_ThreadInitData): Set `thread_obj' in the thread data struct,
        not the starter struct. Initialize wait_mutex and wait_cond.
        (_Jv_MutexLock): New recursive mutex implementation. Moved from
        posix-threads.h.
        (_Jv_MutexUnlock): Ditto.
        (really_start): Set info->data->thread from pthread_self() to work
        around a race condition. Destroy wait_mutex and wait_cond when run()
        returns.
        * java/lang/Thread.java: (isInterrupted_): Renamed to overloaded
        `isInterrupted(boolean)'. Clear interrupted flag if clear_flag is
        set.
        startable_flag: New private field.
        (Thread): Initialize `startable_flag'.
        (toString): Check for null thread group.
        * java/lang/natThread.cc: (struct natThread): New fields
        `join_mutex', `join_cond'. Removed fields `joiner', `next'.
        (class locker): Removed.
        (initialize_native): Initialize `join_cond' and `join_mutex'.
        (interrupt): Now just calls _Jv_ThreadInterrupt().
        (join): Simplified. Just wait on the target thread's join condition.
        (finish_): Remove join list code. Unset thread group. Signal
        potential joiners by notifying the dying threads join_cond.
        (start): Check for illegal restarts.
        * java/lang/natObject.cc: Check for return value of _Jv_CondWait and
        act appropriatly.
        * include/posix-threads.h: Remove all HAVE_RECURSIVE_MUTEX related
        #defines and #ifdefs.
        (struct _Jv_Thread_t): New fields `thread_obj', `wait_cond',
        `wait_mutex', `next'.
        (struct _Jv_ConditionVariable_t): Define as a struct instead of
        directly mapping to pthread_cond_t.
        (struct _Jv_Mutex_t): New recursive implementation.
        (_Jv_PthreadCheckMonitor): Reimplemented. Simple `owner' check.
        _Jv_HaveCondDestroy: Never define this for posix-threads.
        (_Jv_CondNotify): Remove inline implementation(s), prototype instead.
        (_Jv_CondNotifyAll): Ditto.
        (_Jv_MutexLock): Ditto.
        (_Jv_MutexUnlock): Ditto.
        (_Jv_MutexInit): Changed to reflect new mutex implementation.
        (_Jv_MutexDestroy): Ditto.
        (_Jv_CondDestroy): Removed.
        (_Jv_PthreadGetMutex): Removed.
        * include/win32-threads.h: (_Jv_CondNotify): Guess _JV_NOT_OWNER on an
        error. Add a FIXME about this.
        (_Jv_CondNotifyAll): Ditto.
        * win32-threads.cc: (_Jv_CondWait): Return 0 on a timeout. Guess
        _JV_NOT_OWNER on other errors. Add FIXME.

From-SVN: r32773
2000-03-28 03:22:24 +01:00
Tom Tromey 4e2d1dbdd3 jni.cc (_Jv_JNI_PopSystemFrame): If environment has exception set, throw it.
* jni.cc (_Jv_JNI_PopSystemFrame): If environment has exception
	set, throw it.
	(call): Don't throw exception here.

From-SVN: r32770
2000-03-27 19:51:46 +00:00
Tom Tromey 99444711eb [multiple changes]
2000-03-26  Tom Tromey  <tromey@cygnus.com>

	* java/lang/mprec.h: Use SIZEOF_VOID_P.
	* interpret.cc: Use SIZEOF_VOID_P.
	* include/java-cpool.h (_Jv_storeLong): Use SIZEOF_VOID_P.
	(_Jv_loadLong): Likewise.
	(_Jv_storeDouble): Likewise.
	* configure: Rebuilt.
	* configure.in: Check size of void*.

	* resolve.cc (ncode): Use FFI_PREP_RAW_CLOSURE and FFI_RAW_SIZE.

2000-03-26  Hans Boehm  <boehm@acm.org>

	* include/java-cpool.h (_Jv_storeLong, _Jv_loadLong,
	_Jv_storeDouble, _Jv_loadDouble): Define differently on 64 bit
	machine.
	* java/lang/ieeefp.h: Define __IEEE_BIG_ENDIAN or
	__IEEE_LITTLE_ENDIAN appropriately on IA64.
	* java/lang/mprec.h: Don't define Pack_32 on 64 bit machine.
	* javaprims.h (_Jv_word): Added `l' and `d' entries in 64 bit
	case.
	* resolve.cc (FFI_PREP_RAW_CLOSURE): New define.
	(FFI_RAW_SIZE): Likewise.
	(_Jv_InterpMethod::ncode): Use them.
	* interpret.cc (PUSHL, PUSHD, POPL, POPD, LOADL, LOADD, STOREL,
	STORED): Define differently on a 64 bit machine.
	(continue1): Use ffi_java_raw_call when appropriate.

From-SVN: r32754
2000-03-26 20:33:04 +00:00
Warren Levy 552cc5b57e BigInteger.java (divide): Handle the special case when dividing by 1 and the high bit of the dividend is set.
* java/math/BigInteger.java(divide): Handle the special case when
	dividing by 1 and the high bit of the dividend is set.
	(setShiftRight): Handle case when count == 0.

From-SVN: r32724
2000-03-24 09:18:12 +00:00
Warren Levy 111393dfd6 Font.java (isBold): Fix syntax error.
* java/awt/Font.java(isBold): Fix syntax error.
	(isItalic): ditto.
	* java/awt/Frame.java(postEvent): ditto.
	* java/awt/Menu.java(postEvent): ditto.
	* java/awt/MenuBar.java(postEvent): ditto.
	* java/awt/Toolkit.java(init): Included a stub.

From-SVN: r32723
2000-03-24 09:09:56 +00:00
Bryce McKinlay 604de2bddf Event.java: Add all the event type constants.
2000-03-21  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/awt/Event.java: Add all the event type constants.
        (Event): Implemented constructors.
        (controlDown): Implemented.
        (metaDown): Implemented.
        (paramString): Stubbed.
        (shiftDown): Implemented.
        (toString): Implemented.
        (translate): Implemented.

From-SVN: r32676
2000-03-21 21:33:53 +00:00
Bryce McKinlay a09f61183a * java/lang/natClass.cc (isInstance): Use JV_CLASS, not getClass().
From-SVN: r32665
2000-03-21 05:54:42 +00:00
Bryce McKinlay afccdd1d6c natClass.cc (isInstance): Use _Jv_IsAssignableFrom(), not Class.isAssignableFrom().
* java/lang/natClass.cc (isInstance): Use _Jv_IsAssignableFrom(),
        not Class.isAssignableFrom().

From-SVN: r32664
2000-03-21 05:44:29 +00:00
Bryce McKinlay a162f9d81e natClass.cc (isInstance): Initialize `this'.
2000-03-21  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/lang/natClass.cc (isInstance): Initialize `this'.
        (isAssignableFrom): Initialize `this' and `klass'.
        (_Jv_IsAssignableFrom): If an interface has no idt, it is not
        implemented by any loaded class, so return false.

From-SVN: r32663
2000-03-21 05:12:20 +00:00
Warren Levy 54b43a686d Color.java: Specified java.io for Serializable.
* java/awt/Color.java: Specified java.io for Serializable.
	* java/awt/Toolkit.java: Imported java.net.URL.

From-SVN: r32639
2000-03-19 12:20:12 +00:00
Warren Levy b6166b4d0f * java/awt/Color.java: Rewrote to be more memory efficient (& compile).
From-SVN: r32634
2000-03-19 11:23:27 +00:00
Warren Levy d05165c393 Color.java: New file.
* java/awt/Color.java: New file.
	* java/awt/Graphics.java: New file.
	* java/awt/Image.java: New file.
	* java/awt/Paint.java: New file.
	* java/awt/PaintContext.java: New file.
	* java/awt/Transparency.java: New file.
	* java/util/Collection.java: New file.
	* java/util/Comparator.java: New file.
	* java/util/Iterator.java: New file.
	* java/util/List.java: New file.
	* java/util/ListIterator.java: New file.
	* Makefile.am: Added above new files.
	* Makefile.in: Rebuilt.

	* java/awt/Font.java (PLAIN): New field.
	(BOLD): New field.
	(ITALIC): New field.
	(ROMAN_BASELINE): New field.
	(CENTER_BASELINE): New field.
	(HANGING_BASELINE): New field.
	(name): New field.
	(style): New field.
	(size): New field.
	(pointSize): New field.
	(Font): Implemented constructor.
	(isPlain): Implemented method.
	(isBold): Implemented method.
	(isItalic): Implemented method.
	(getName): Implemented method.
	(getStyle): Implemented method.
	(getSize): Implemented method.
	(getSize2D): Implemented method.
	(decode): Stubbed.
	* java/awt/Frame.java (getFont): Stubbed.
	(postEvent): Stubbed.
	(remove): Stubbed.
	* java/awt/Menu.java (postEvent): Stubbed.
	* java/awt/MenuBar.java (getFont): Stubbed.
	(postEvent): Stubbed.
	* java/awt/Toolkit.java (getImage): Added abstract method.

From-SVN: r32598
2000-03-17 00:45:06 +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 90a883ae6b jni.cc (mangled_name): Fixed assertion.
* jni.cc (mangled_name): Fixed assertion.
	(JNI_GetCreatedJavaVMs): Don't comment out `buf_len' argument;
	turned assert into actual failure.

From-SVN: r32546
2000-03-14 21:59:54 +00:00
Warren Levy ea7f51a4af Key.java (serialVersionUID): Set to 0 for now.
* java/security/Key.java(serialVersionUID): Set to 0 for now.
	* java/security/interfaces/DSAPrivateKey.java(serialVersionUID): Ditto.
	* java/security/interfaces/DSAPublicKey.java(serialVersionUID): Ditto.

From-SVN: r32464
2000-03-10 05:10:40 +00:00
Warren Levy 8560e49702 AlgorithmParameterGeneratorSpi.java: New file.
* java/security/AlgorithmParameterGeneratorSpi.java: New file.
	* java/security/DigestException.java: New file.
	* java/security/GeneralSecurityException.java: New file.
	* java/security/InvalidAlgorithmParameterException.java: New file.
	* java/security/InvalidKeyException.java: New file.
	* java/security/InvalidParameterException.java: New file.
	* java/security/Key.java: New file.
	* java/security/KeyException.java: New file.
	* java/security/KeyPair.java: New file.
	* java/security/KeyPairGenerator.java: New file.
	* java/security/KeyPairGeneratorSpi.java: New file.
	* java/security/NoSuchProviderException.java: New file.
	* java/security/PrivateKey.java: New file.
	* java/security/Provider.java: New file.
	* java/security/PublicKey.java: New file.
	* java/security/SecureRandom.java: New file.
	* java/security/Security.java: New file.
	* java/security/Signature.java: New file.
	* java/security/SignatureException.java: New file.
	* java/security/interfaces/DSAKey.java: New file.
	* java/security/interfaces/DSAParams.java: New file.
	* java/security/interfaces/DSAPrivateKey.java: New file.
	* java/security/interfaces/DSAPublicKey.java: New file.
	* java/security/interfaces/RSAPrivateCrtKey.java: New file.
	* java/security/interfaces/RSAPrivateKey.java: New file.
	* java/security/interfaces/RSAPublicKey.java: New file.
	* java/security/spec/AlgorithmParameterSpec.java: New file.
	* java/security/spec/InvalidKeySpecException.java: New file.
	* java/security/spec/InvalidParameterSpecException.java: New file.
	* java/security/spec/KeySpec.java: New file.
	* java/security/spec/RSAPrivateCrtKeySpec.java: New file.
	* java/security/spec/RSAPrivateKeySpec.java: New file.
	* java/security/spec/RSAPublicKeySpec.java: New file.
	* Makefile.am: Added above java.security files.
	* Makefile.in: Rebuilt.

	* java/security/MessageDigest.java: Rewritten.
	* java/security/SecureClassLoader.java: Added JDK1.2 comment.

From-SVN: r32461
2000-03-10 02:43:57 +00:00
Bryce McKinlay d585552a72 Updated README.
From-SVN: r32456
2000-03-09 22:20:43 +00:00
Bryce McKinlay fb863f625e natClassLoader.cc (_Jv_FindArrayClass): Call _Jv_PrepareConstantTimeTables.
2000-03-09  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/lang/natClassLoader.cc (_Jv_FindArrayClass): Call
        _Jv_PrepareConstantTimeTables.
        * java/lang/natClass.cc (_Jv_PrepareConstantTimeTables): Array
        classes should have an IDT, so don't return if klass is an array
        class.

From-SVN: r32445
2000-03-09 09:22:36 +00:00
Tom Tromey c500e5ec9f natArray.cc (newInstance): Don't allow array of `void' to be created.
* java/lang/reflect/natArray.cc (newInstance): Don't allow array
	of `void' to be created.

From-SVN: r32443
2000-03-09 04:50:49 +00:00
Warren Levy d98729aa0e * java/math/BigInteger.java(signum): Handle zero properly.
From-SVN: r32441
2000-03-09 04:35:30 +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
Bryce McKinlay ddf0fc6c9f resolve.cc (_Jv_SearchMethodInClass): New function.
2000-03-07  Bryce McKinlay  <bryce@albatross.co.nz>

        * resolve.cc (_Jv_SearchMethodInClass): New function.
        (_Jv_ResolvePoolEntry): Search superinterfaces for interface
        methods.
        * java/lang/Class.h (_Jv_SearchMethodInClass): New prototype.

2000-03-07  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/lang/Class.h (union _Jv_IDispatchTable): New declaration.
        (struct _Jv_ifaces): New declaration.
        JV_CLASS: New macro definition.
        (getComponentType): Relocate below isArray() for inlining.
        (getModifiers): Declare `inline'.
        (getSuperclass): Ditto.
        (isArray): Ditto.
        (isPrimitive): Ditto.
        (_Jv_IsAssignableFrom): New prototype.
        (_Jv_LookupInterfaceMethodIdx): New prototype. Predeclare with "C"
        linkage.
        (_Jv_InitClass): Move from natClass.cc. Declare `inline'.
        Check for JV_STATE_DONE before invoking initializeClass().
        (_Jv_PrepareConstantTimeTables): New prototype.
        (_Jv_GetInterfaces): Ditto.
        (_Jv_GenerateITable): Ditto.
        (_Jv_GetMethodString): Ditto.
        (_Jv_AppendPartialITable): Ditto.
        (_Jv_FindIIndex): Ditto.
        depth, ancestors, idt: New class fields.

        * java/lang/natClass.cc (isAssignableFrom): Move functionality to
        inline function `_Jv_IsAssignableFrom'. Use that function.
        (isInstance): Declare `inline'.
        (initializeClass): Get lock on class before checking `state'. Unlock
        before calling resolveClass0. Call _Jv_PrepareConstantTimeTables
	with the lock held.
        (_Jv_LookupInterfaceMethod): Use _Jv_GetMessageString.
        (_Jv_IsAssignableFrom): New inline function. Test assignability
	using class->depth and ancestor table.
        (_Jv_IsInstanceOf): Use _Jv_IsAssignableFrom.
        (_Jv_CheckCast): Move from prims.cc. Use JV_CLASS and
        _Jv_IsAssignableFrom.
        (_Jv_CheckArrayStore): Ditto.
        (_Jv_LookupInterfaceMethodIdx): New function.
        INITIAL_IOFFSETS_LEN, INITIAL_IFACES_LEN: New #defines.
        (_Jv_PrepareConstantTimeTables): New function.
        (_Jv_IndexOf): Ditto.
        (_Jv_GetInterfaces): Ditto.
        (_Jv_GenerateITable): Ditto.
        (_Jv_GetMethodString): Ditto.
        (_Jv_AppendPartialITable): Ditto.
        iindex_mutex, iindex_mutex_initialized: New static fields.
        (_Jv_FindIIndex): New function.

        * java/lang/natClassLoader.cc (_Jv_NewClass): Set new jclass fields.

        * prims.cc (_Jv_CheckCast): Moved to natClass.cc.
        (_Jv_CheckArrayStore): Ditto.
        (JvNewCharArray, JvNewBooleanArray, JvNewByteArray, JvNewShortArray,
        JvNewIntArray, JvNewLongArray, JvNewFloatArray, JvNewDoubleArray):
        Moved to gcj/array.h.
        (_Jv_Realloc): New function.

        * gcj/cni.h: Move _Jv_PrimClass definitions to gcj/array.h.

        * gcj/array.h: _Jv_PrimClass definitions moved from gcj/cni.h.
        (JvNewCharArray, JvNewBooleanArray, JvNewByteArray,
        JvNewShortArray, JvNewIntArray, JvNewLongArray, JvNewFloatArray,
        JvNewDoubleArray): Implementations moved from prims.cc and
        declared `inline'.

        * gcj/javaprims.h (_Jv_Realloc): Prototype.

        * include/jvm.h (_Jv_LookupInterfaceMethodIdx): Prototype.

From-SVN: r32382
2000-03-07 09:52:56 +00:00
Tom Tromey 8d00f6171a jni.cc (MARK_NONE): New define.
* jni.cc (MARK_NONE): New define.
	(MARK_USER): Likewise.
	(MARK_SYSTEM): Likewise.
	(struct _Jv_JNI_LocalFrame): Made `marker' bigger and `size'
	smaller.
	(_Jv_JNI_DeleteLocalRef): Use MARK_NONE in assert.
	(_Jv_JNI_EnsureLocalCapacity): Use MARK_NONE.
	(_Jv_JNI_PushLocalFrame): Use MARK_USER.
	(_Jv_JNI_PopLocalFrame): New version with additional `stop'
	argument.
	(call): Use MARK_SYSTEM.
	(_Jv_GetJNIEnvNewFrame): New function.
	(_Jv_LookupJNIMethod): New function.
	(_Jv_JNI_PopSystemFrame): New function.
	(call): Use _Jv_JNI_PopSystemFrame and _Jv_LookupJNIMethod.

From-SVN: r32373
2000-03-07 00:10:52 +00:00
Tom Tromey 4d54cfecc3 re GNATS libgcj/43 (jni.h not installed)
Fix for PR libgcj/43:
	* include/Makefile.in: Rebuilt.
	* include/Makefile.am (include_HEADERS): New define.

From-SVN: r32351
2000-03-06 02:50:38 +00:00
Anthony Green 008b7307cb javaprims.h ("Java"): Remove FirstThread.
2000-03-08  Anthony Green  <green@redhat.com>

	* gcj/javaprims.h ("Java"): Remove FirstThread.

From-SVN: r32349
2000-03-05 22:31:02 +00:00
Warren Levy c261e080ef DatagramSocket.java (DatagramSocket(int,InetAddress)): Handle null addresses.
* java/net/DatagramSocket.java(DatagramSocket(int,InetAddress)):
	  Handle null addresses.

From-SVN: r32339
2000-03-05 09:01:16 +00:00
Anthony Green aa1e467f34 re GNATS gcj/151 (strange result on Math.sin(1e50))
* configure.host (libgcj_flags): Define __NO_MATH_INLINES.
	See PR gcj/151.

From-SVN: r32337
2000-03-05 08:32:51 +00:00
Anthony Green 0f9c645ea5 configure: Rebuilt.
* configure: Rebuilt.
	      * configure.in (ZLIBTESTSPEC): New macro.
	      (GCTESTSPEC): New macro.
        (LIBGCJTESTSPEC): New macro.
        * libgcj-test.spec.in: New file.

From-SVN: r32330
2000-03-04 21:50:19 +00:00
Tom Tromey b099f07de9 java-interp.h: Don't include MethodInvocation.h.
* include/java-interp.h: Don't include MethodInvocation.h.
	(class _Jv_InterpMethod): Don't make MethodInvocation a friend.
	* Makefile.in: Rebuilt.
	* Makefile.am (gnu/gcj/runtime/MethodInvocation.h): Removed.
	(ordinary_java_source_files): Don't mention
	MethodInvocation.java.
	* gnu/gcj/runtime/MethodInvocation.java: Removed.
	* interpret.cc (MethodInvocation::continue1): Removed.
	(run): Handle exceptions here.
	* java/lang/ClassLoader.java (defineClass1, defineClass2):
	Removed.
	* java/lang/natClassLoader.cc (defineClass0): Catch exceptions
	here.
	(defineClass2): Removed.

	* java/lang/reflect/Method.java (hack_trampoline, hack_call):
	Removed.
	* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Catch
	exceptions here.
	(hack_call): Removed.

	* java/lang/Class.h (Class): Removed hackRunInitializers,
	hackTrampoline.
	* java/lang/natClass.cc (hackRunInitializers): Removed.
	(initializeClass): Catch exceptions here.
	Include ExceptionInInitializerError.h.
	* java/lang/Class.java (hackTrampoline, hackRunInitializers):
	Removed.

	* java/lang/Object.h (Object): Don't mention hack12_6.
	* java/lang/natObject.cc (_Jv_FinalizeObject): Catch exceptions
	here.
	* java/lang/Object.java (hack12_6): Removed.

	* java/lang/natThread.cc (run_): Renamed.  Catch exceptions here.
	(start): Use run_, not run__.
	* java/lang/Thread.java (run_): Renamed from run__; old run_
	removed.

	* jni.cc (_Jv_JNI_FindClass): Handle exceptions.
	(_Jv_JNI_EnsureLocalCapacity): Likewise.
	(_Jv_JNI_DefineClass): Likewise.
	(_Jv_JNI_ThrowNew): Likewise.
	(_Jv_JNI_AllocObject): Likewise.
	(_Jv_JNI_GetAnyMethodID): Likewise.
	(_Jv_JNI_CallAnyMethodV): Likewise.
	(_Jv_JNI_CallAnyMethodA): Likewise.
	(_Jv_JNI_CallAnyVoidMethodV): Likewise.
	(_Jv_JNI_CallAnyVoidMethodA): Likewise.
	(_Jv_JNI_GetAnyFieldID): Likewise.
	(_Jv_JNI_NewString): Likewise.
	(_Jv_JNI_NewStringUTF): Likewise.
	(_Jv_JNI_GetStringUTFChars): Likewise.
	(_Jv_JNI_NewObjectArray): Likewise.
	(_Jv_JNI_NewPrimitiveArray): Likewise.
	(_Jv_JNI_GetPrimitiveArrayRegion): Likewise.
	(_Jv_JNI_GetStringRegion): Likewise.
	(_Jv_JNI_GetStringUTFRegion): Likewise.
	(_Jv_JNI_SetPrimitiveArrayRegion): Likewise.
	(_Jv_JNI_MonitorEnter): Likewise.
	(_Jv_JNI_MonitorExit): Likewise.
	(_Jv_JNI_ToReflectedField): Likewise.
	(_Jv_JNI_ToReflectedMethod): Likewise.
	(_Jv_JNI_RegisterNatives): Likewise.
	(_Jv_JNI_AttachCurrentThread): Likewise.
	(_Jv_JNI_DestroyJavaVM): Likewise.

From-SVN: r32294
2000-03-02 20:25:20 +00:00
Mo DeJong fee2681f8a ZipOutputStream.java (closeEntry): Fixed error caused by the incorrect casting of a long to an int.
2000-02-28  Mo DeJong  <mdejong@cygnus.com>

	* java/util/zip/ZipOutputStream.java(closeEntry) : Fixed
	error caused by the incorrect casting of a long to an int.

From-SVN: r32257
2000-02-29 17:08:00 +00:00
Mo DeJong f8b7a5d26b ZipOutputStream.java (write_entry): Fixed SIGSEV caused by use of the wrong instance variable.
2000-02-28  Mo DeJong  <mdejong@cygnus.com>

	* java/util/zip/ZipOutputStream.java(write_entry) : Fixed
	SIGSEV caused by use of the wrong instance variable.

From-SVN: r32256
2000-02-29 17:04:35 +00:00
Bryce McKinlay 91da35dbf2 File.java (File(String, String)): For dirPath, treat an empty String the same as `null'.
2000-02-27  Bryce McKinlay  <bryce@albatross.co.nz>

       * java/io/File.java (File(String, String)): For dirPath, treat an
       empty String the same as `null'.

From-SVN: r32217
2000-02-27 10:43:47 +00:00
Anthony Green e1b1511329 Minor clean up and bug fix.
From-SVN: r32196
2000-02-26 21:12:54 +00:00
Tom Tromey ac52f669c5 jni.cc (_Jv_JNI_RegisterNatives): Conditionalize body on `INTERPRETER'.
* jni.cc (_Jv_JNI_RegisterNatives): Conditionalize body on
	`INTERPRETER'.

From-SVN: r32156
2000-02-25 23:49:34 +00:00
Bryce McKinlay 4ae4a3c973 re GNATS libgcj/38 (Static initializer in DecimalFormat eventually depends on itself)
2000-02-25  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/net/URLConnection.java (initializeDateFormats): New
        private method.
        (getHeaderFieldDate): Call initializeDateFormats if required.
        locale, dateFormat1, dateFormat2, dateFormat3: Don't initialize
        these.
        Fix for PR libgcj/38.

From-SVN: r32153
2000-02-25 22:38:33 +00:00
Warren Levy 12b595c7c4 BigInteger.java (ival): Made private.
* java/math/BigInteger.java(ival): Made private.
	(words): Ditto.
	(neg): Ditto.

From-SVN: r32143
2000-02-25 04:00:09 +00:00
Anthony Green 9b90451bee Forgot to commit ChangeLog
From-SVN: r32087
2000-02-21 08:21:52 +00:00
Tom Tromey 38b3a2c089 * boehm.cc (_Jv_AllocBytes): Clear returned memory.
From-SVN: r32085
2000-02-21 05:14:06 +00:00
Bryce McKinlay a0e34aaae4 ZipEntry.java (setCrc): Fix overflow.
2000-02-19  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/util/zip/ZipEntry.java (setCrc): Fix overflow.
        (setSize): ditto.

From-SVN: r32062
2000-02-19 02:54:14 +00:00
Tom Tromey 8ade47715e jvm.h (_Jv_GetJavaVM): Declare.
* include/jvm.h (_Jv_GetJavaVM): Declare.
	* include/java-interp.h (_Jv_GetFirstMethod): New function.
	(_Jv_MethodBase::get_method): New method.
	(_Jv_JNIMethod::set_function): New method.
	* jni.cc (_Jv_JNI_UnregisterNatives): New function.
	(_Jv_JNI_RegisterNatives): New function.
	(_Jv_JNIFunctions): Updated for new functions.
	(_Jv_GetJavaVM): New function.
	(_Jv_JNI_GetJavaVM): Use it.  Now static.
	(_Jv_JNI_AttachCurrentThread): Create a new JNIEnv if this thread
	is already a Java thread but does not have a JNIEnv yet.

	* java/lang/natRuntime.cc (_load): Pass the JavaVM to the onload
	function.

From-SVN: r32056
2000-02-18 21:22:06 +00:00
Tom Tromey 8dd8ff2e98 Rotated ChangeLogs
From-SVN: r32043
2000-02-17 22:57:30 +00:00
Tom Tromey de3cb4e4c1 re GNATS gcj/152 (Installation flaw)
* gcj/field.h (_Jv_Field::getClass): Don't use JvAssert.
	Fixes PR gcj/152.

From-SVN: r32036
2000-02-17 18:34:14 +00:00
Tom Tromey 5ef57049f9 * jni.cc (_Jv_JNI_CallStaticMethodV): Added some assertions.
From-SVN: r32021
2000-02-17 00:54:34 +00:00
Tom Tromey 1adbc4d8be jni.cc (_Jv_JNI_NewObjectV): Corrected assertion.
* jni.cc (_Jv_JNI_NewObjectV): Corrected assertion.
	(_Jv_JNI_NewObject): Likewise.
	(_Jv_JNI_NewObjectA): Likewise.
	(_Jv_JNI_CallAnyMethodV): In constructor case, pass correct value
	as "return" type to _Jv_CallAnyMethodA.
	(_Jv_JNI_CallAnyMethodA): Likewise.
	(_Jv_JNI_CallAnyVoidMethodV): Likewise.

From-SVN: r32017
2000-02-16 22:42:41 +00:00
Tom Tromey d77a164002 jni.cc (_Jv_JNI_FindClass): Use ClassLoader.loadClass, not findClass.
* jni.cc (_Jv_JNI_FindClass): Use ClassLoader.loadClass, not
	findClass.

From-SVN: r32013
2000-02-16 18:42:48 +00:00
Tom Tromey d348bda453 resolve.cc (ncode): Set args_raw_size.
* resolve.cc (ncode): Set args_raw_size.  Compute jni_cif and
	jni_arg_types.
	(init_cif): Added `rtype_p' argument.
	* include/java-interp.h (class _Jv_MethodBase): Added
	args_raw_size.
	(class _Jv_InterpMethod): Removed args_raw_size.
	(class _Jv_JNIMethod): Added jni_cif and jni_arg_types fields.
	* jni.cc (call): Pass JNIEnv and (for static methods only) the
	class pointer as well as the ordinary arguments.

From-SVN: r31995
2000-02-16 00:07:34 +00:00
Tom Tromey cdd59e7bdf * jni.cc (mangled_name): Skip leading `(' in signature.
From-SVN: r31993
2000-02-15 22:59:23 +00:00
Tom Tromey abfb784400 * jni.cc (add_char): Added missing `else'.
From-SVN: r31991
2000-02-15 22:42:10 +00:00
Tom Tromey 2d759f7165 jni.cc (_Jv_JNI_AttachCurrentThread): Return error if malloc fails.
* jni.cc (_Jv_JNI_AttachCurrentThread): Return error if malloc
	fails.

From-SVN: r31986
2000-02-15 20:39:36 +00:00
Bryce McKinlay 2e5aca8386 Updated ChangeLog
From-SVN: r31982
2000-02-15 08:53:00 +00:00
Tom Tromey 26c3229c0b re GNATS gcj/150 (System.loadLibrary() semantics arn't the same as in the JDK)
* java/lang/natRuntime.cc (_load): On Unix, prefix library name
	with `lib' for loadLibrary.  Fixes PR gcj/150.

From-SVN: r31976
2000-02-15 07:53:11 +00:00
Warren Levy 34540fe35e MPN.java (findLowestBit): Made methods public.
* gnu/gcj/math/MPN.java(findLowestBit): Made methods public.

	* java/math/BigInteger.java(BigInteger(int,int,java.util.Random):
	  New constructor.
	(min): Implemented.
	(max): Implemented.
	(modPow): Rewritten to not use the naive, slow, brute force approach.
	(isProbablePrime): Implemented.
	(testBit): Implemented.
	(flipBit): Implemented.
	(getLowestSetBit): Implemented.

From-SVN: r31966
2000-02-14 10:23:29 +00:00
Anthony Green 97ce4a51fa gcj/142
i386 and i486 should configure the same as i586 and i686.

From-SVN: r31954
2000-02-13 18:07:09 +00:00
Tom Tromey dd16866663 File.java (createTempFile): Use low bits from counter, not high bits.
* java/io/File.java (createTempFile): Use low bits from counter,
	not high bits.

From-SVN: r31946
2000-02-12 20:13:42 +00:00
Anthony Green 95311793fe More thanks.
From-SVN: r31942
2000-02-12 03:49:13 +00:00
Tom Tromey 28ec5077d7 interpret.cc (continue1): Use STOREA, not STOREI, to implement astore instruction.
* interpret.cc (continue1): Use STOREA, not STOREI, to implement
	astore instruction.  From Hans Boehm.

From-SVN: r31939
2000-02-11 23:24:28 +00:00
Warren Levy 136b5d77fc BigInteger.java (BigInteger(String, int)): New constructor.
* java/math/BigInteger.java(BigInteger(String, int)): New constructor.
	(BigInteger(String)): New constructor.
	(not): Rewritten using version from Kawa's BitOps class.
	(valueOf): New private methods from Kawa's BitOps class.
	(swappedOp): ditto.
	(bitOp): ditto.
	(setBitOp): ditto.
	(and): Implemented.
	(or): Implemented.
	(xor): Implemented.
	(andNot): Implemented.
	(clearBit): Implemented.
	(setBit): Implemented.
	(bitCount): Implemented.
	(toByteArray): Implemented.

From-SVN: r31926
2000-02-11 19:09:03 +00:00
Tom Tromey 9d381124d8 * java/io/File.java (nextValue): Now synchronized.
From-SVN: r31925
2000-02-11 18:44:37 +00:00
Tom Tromey 304ccb1075 natFileDescriptorPosix.cc (open): Recognize EXCL flag.
* java/io/natFileDescriptorPosix.cc (open): Recognize EXCL flag.
	* java/io/FileDescriptor.java (EXCL): New static field.
	* java/io/File.java (tmpdir): New static field.
	(createTempFile): New method.
	(nextValue): New method.
	* java/lang/natSystem.cc (init_properties): Set java.io.tmpdir
	property.

From-SVN: r31922
2000-02-11 17:32:52 +00:00
Tom Tromey 26439cc59c jni.h (JNI_FALSE): Renamed from JNI_TRUE; oops.
* include/jni.h (JNI_FALSE): Renamed from JNI_TRUE; oops.
	(jboolean): Declare as an attributed int, not a bool.
	(_Jv_func): Declare differently for C.

From-SVN: r31907
2000-02-10 23:44:05 +00:00
Tom Tromey aaf0766e9f natNativeThread.cc: New file.
* gnu/gcj/jni/natNativeThread.cc: New file.
	* gnu/gcj/jni/NativeThread.java: New file.
	* java/lang/Thread.java (data): Now a RawData.
	* include/jvm.h (_Jv_GetCurrentJNIEnv, _Jv_SetCurrentJNIEnv):
	Declare.
	* Makefile.in: Rebuilt.
	* Makefile.am (java/lang/Thread.h): New target.
	(ordinary_java_source_files): Added NativeThread.java.
	(nat_source_files): Added natNativeThread.cc.
	* java/lang/natThread.cc: Include <jni.h>
	(struct natThread): Added `jni_env' field.
	(_Jv_GetCurrentJNIEnv): New function.
	(_Jv_SetCurrentJNIEnv): Likewise.
	(initialize_native): Initialize jni_env.
	Include RawData.h.
	* jni.cc (ThreadGroupClass): New define.
	(_Jv_JNI_InvokeFunctions): New structure.
	(JNI_GetCreatedJavaVMs): New function.
	(the_vm): New global.
	(JNI_GetDefaultJavaVMInitArgs): New function.
	Include NativeThread.h.
	(NativeThreadClass): New define.
	(_Jv_JNI_EnsureLocalCapacity): Return JNI_ERR, not -1.
	(_Jv_JNI_DestroyJavaVM): New function.
	(_Jv_JNI_AttachCurrentThread): New function.
	(_Jv_JNI_DetachCurrentThread): New function.
	(_Jv_JNI_GetEnv): New function.
	(JNI_CreateJavaVM): New function.
	(_Jv_JNI_GetJavaVM): New function.
	(_Jv_JNIFunctions): Added entry for GetJavaVM.
	* include/jni.h (JavaVMAttachArgs): New structure.
	(JNI_EDETACHED): New define.
	(JNI_EVERSION): Likewise.
	(JavaVM): Define properly.
	(struct JNIInvokeInterface): New structure.
	(class _Jv_JavaVM): New class.
	(JNI_OnLoad, JNI_OnUnload): Declare.
	(JNI_GetDefaultJavaVMInitArgs, JNI_CreateJavaVM,
	JNI_GetCreatedJavaVMs): Declare.
	(JavaVMInitArgs): New typedef.
	(JavaVMOption): Likewise.
	(JNI_ERR): New define.
	(JNI_OK): Likewise.

From-SVN: r31901
2000-02-10 20:31:48 +00:00
Andrew Haley 715bdd8117 interpret.cc: Don't include fdlibm.h.
2000-02-10  Andrew Haley  <aph@cygnus.com>

	* interpret.cc: Don't include fdlibm.h.
	Replace #if with #ifdef throughout.
	Declare extern __ieee754_fmod.
	(continue1): Remove op_getfield, op_getstatic, op_putfield,
	op_putstatic insns.
	* resolve.cc (_Jv_PrepareClass): Use imeth as method pointer.
	Search class hierarchy for superclass vtable.

	* java/lang/natClassLoader.cc (_Jv_UnregisterClass): Don't fall
	off the end of a pointer list.

	* java/lang/natThread.cc (stop): Don't abort, throw an exception
	instead.
	(suspend): Ditto.

From-SVN: r31897
2000-02-10 17:16:30 +00:00
Tom Tromey 7e3b6e312a natRuntime.cc (_load): Call add_library.
* java/lang/natRuntime.cc (_load): Call add_library.
	(loadLibraryInternal): Likewise.

From-SVN: r31877
2000-02-10 00:17:10 +00:00
Tom Tromey c56c8c43b9 natIconv.cc (Input_iconv::finalize): Call iconv_close when handle is not NULL.
* gnu/gcj/convert/natIconv.cc (Input_iconv::finalize): Call
	iconv_close when handle is not NULL.  Thanks to Andrew Haley.
	(Output_iconv::finalize): Likewise.

From-SVN: r31876
2000-02-10 00:14:54 +00:00
Tom Tromey bad196d78e Properties.java (setProperty): New method.
* java/util/Properties.java (setProperty): New method.
	(store): New method.

From-SVN: r31855
2000-02-08 21:30:45 +00:00
Tom Tromey 3fd64b5a09 Runtime.java (_load): Declare.
* java/lang/Runtime.java (_load): Declare.
	(load, loadLibrary): Wrote in terms of _load.
	* java/lang/natRuntime.cc (load): Call JNI_OnLoad if it appears in
	library.
	(loadLibrary): Likewise.
	Include <jni.h>.
	(_load): New method.
	(loadLibrary, load): Removed.

From-SVN: r31846
2000-02-08 00:26:58 +00:00
Tom Tromey 278abd2849 jni.cc (ThrowableClass): New define.
* jni.cc (ThrowableClass): New define.
	(_Jv_JNI_Throw): Check argument.
	(_Jv_JNI_ThrowNew): Likewise.
	(wrap_value): Don't wrap object if it is NULL.
	(_Jv_JNI_DefineClass): Use wrap_value.
	(_Jv_JNI_FindClass): Likewise.
	(_Jv_JNI_GetSuperclass): Likewise.
	(_Jv_JNI_ExceptionOccurred): Likewise.
	(_Jv_JNI_AllocObject): Likewise.
	(_Jv_JNI_GetObjectClass): Likewise.
	(_Jv_JNI_NewString): Likewise.
	(_Jv_JNI_NewStringUTF): Likewise.
	(_Jv_JNI_NewObjectArray): Likewise.
	(_Jv_JNI_GetObjectArrayElement): Likewise.
	(_Jv_JNI_NewPrimitiveArray): Likewise.
	(_Jv_JNI_ToReflectedField): Likewise.
	(_Jv_JNI_ToReflectedMethod): Likewise.
	(_Jv_JNI_AllocObject): Check argument.
	(_Jv_JNI_NewObjectV): Likewise.
	(_Jv_JNI_NewObject): Likewise.
	(_Jv_JNI_NewObjectA): Likewise.
	(_Jv_JNI_GetObjectClass): Likewise.
	(_Jv_JNI_GetField): Likewise.
	(_Jv_JNI_SetField): Likewise.

From-SVN: r31845
2000-02-08 00:23:09 +00:00
Tom Tromey 7c51d9fb95 interpret.cc (PUSHL): Don't use expression statement.
* interpret.cc (PUSHL): Don't use expression statement.
	(PUSHD): Likewise.
	(LOADL): Likewise.
	(STOREL): Likewise.

From-SVN: r31844
2000-02-08 00:17:28 +00:00
Tom Tromey f39b788a15 jni.cc (add_char): Conditional on INTERPRETER.
* jni.cc (add_char): Conditional on INTERPRETER.
	(mangled_name): Likewise.
	(call): Likewise.
	* include/java-interp.h (class _Jv_MethodBase): Conditional on
	INTERPRETER.
	(class _Jv_JNIMethod): Likewise.

From-SVN: r31839
2000-02-07 21:17:30 +00:00
Warren Levy 4f88416976 Added credits for Per Bothner's work on MPN.java and IntNum.java (for
BigInteger).

From-SVN: r31795
2000-02-04 22:11:07 +00:00
Warren Levy 25c449becf Makefile.am: Added MPN.java and BigInteger.java.
* Makefile.am: Added MPN.java and BigInteger.java.
	* Makefile.in: Rebuilt.
	* gnu/gcj/math/MPN.java: New file.
	* java/math/BigInteger.java: New file.

From-SVN: r31794
2000-02-04 22:00:36 +00:00
Tom Tromey facc279fc1 defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase pointers.
* defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase
	pointers.
	(handleMethodsEnd): Fixed error messages.  Create a _Jv_JNIMethod
	if the method is native.
	* resolve.cc (ncode): Don't handle native methods.
	(_Jv_JNIMethod::ncode): New method.
	(_Jv_PrepareClass): Handle native methods.
	* jni.cc (call): Renamed from _Jv_JNI_conversion_call.
	Include AbstractMethodError.h.
	(add_char): New function.
	(mangled_name): Likewise.
	* include/java-interp.h (class _Jv_JNIMethod): New class.
	(class _Jv_MethodBase): New class.
	(class _Jv_InterpMethod): Derive from _Jv_MethodBase.
	(_Jv_InterpClass): Changed `interpreted_methods' field to type
	`_Jv_MethodBase'.

	* include/jvm.h (_Jv_FindSymbolInExecutable): Declare.
	* java/lang/natRuntime.cc (libraries_size, libraries_count,
	libraries): New globals.
	(add_library): New function.
	(_Jv_FindSymbolInExecutable): New function.

	* java/lang/natClassLoader.cc (initiated_classes, loaded_classes):
	Now static.

From-SVN: r31790
2000-02-04 20:49:27 +00:00
Andrew Haley 43c5c8a630 Throwable.java (CPlusPlusDemangler): New class.
2000-02-04  Andrew Haley  <aph@cygnus.com>

        * java/lang/Throwable.java (CPlusPlusDemangler): New class.
        (printStackTrace): Use a CPlusPlusDemangler to demangle names.
        * java/lang/natThrowable.cc (printRawStackTrace): Rename
        printStackTrace to printRawStackTrace.

From-SVN: r31785
2000-02-04 16:59:35 +00:00
Tom Tromey 14447d9674 Calendar.java (toString): New method.
* java/util/Calendar.java (toString): New method.
	* java/util/SimpleTimeZone.java (clone): New method.
	(toString): New method.
	* java/util/TimeZone.java (clone): New method.
	* java/text/SimpleDateFormat.java (clone): New method.
	* java/text/NumberFormat.java (clone): New method.
	(equals): New method.
	* java/text/Format.java (clone): New method.
	* java/text/DateFormatSymbols.java (DateFormatSymbols): New
	constructor.
	(clone): New method.
	* java/text/DateFormat.java (clone): New method.
	* java/text/Collator.java (clone): New method.

From-SVN: r31775
2000-02-03 18:26:51 +00:00
Tom Tromey 7d3151e1c9 PipedOutputStream.java (write(byte[], int, int)): New method.
* java/io/PipedOutputStream.java (write(byte[], int, int)): New
	method.

From-SVN: r31774
2000-02-03 17:17:26 +00:00
Tom Tromey ee6713e782 java-interp.h (_Jv_JNI_conversion_call): Declare.
* include/java-interp.h (_Jv_JNI_conversion_call): Declare.
	* resolve.cc (ncode): Use _Jv_JNI_conversion_call when
	constructing the closure if the function is native.
	* jni.cc (_Jv_JNI_conversion_call): Now returns `void'.  No longer
	a template function, #if'd out, or static.
	Include <java-interp.h>.

From-SVN: r31746
2000-02-02 01:55:03 +00:00
Tom Tromey 8928191114 * include/jni.h (class _Jv_JNIEnv): Corrected calls using `...'.
From-SVN: r31745
2000-02-02 01:47:01 +00:00
Tom Tromey 7d34aa4cff * include/jni.h (class _Jv_JNIEnv): Added all C++ inline methods.
From-SVN: r31739
2000-02-01 21:04:44 +00:00
Tom Tromey ee7f72e41f jni.cc (_Jv_JNI_PopLocalFrame): Leave loop when `n == NULL'.
* jni.cc (_Jv_JNI_PopLocalFrame): Leave loop when `n == NULL'.
	(_Jv_JNI_conversion_call): _Jv_JNI_PopLocalFrame will never leave
	`locals == NULL'.
	(wrap_value): New function.
	(_Jv_JNI_CallAnyMethodV): Use it.
	(_Jv_JNI_CallAnyMethodA): Likewise.
	(_Jv_JNI_GetField): Use wrap_value; removed specialized version.
	(_Jv_JNI_GetStaticField): Likewise.

From-SVN: r31736
2000-02-01 17:36:05 +00:00
Tom Tromey 5dc489c190 jni.cc (_Jv_JNI_GetField): Specialize for jobject.
* jni.cc (_Jv_JNI_GetField): Specialize for jobject.
	(_Jv_JNI_GetStaticField): Likewise.

From-SVN: r31735
2000-02-01 16:32:21 +00:00
Tom Tromey 7e648cf954 prims.cc (_Jv_MallocUnchecked): New function.
* prims.cc (_Jv_MallocUnchecked): New function.
	(main_init): Call _Jv_JNI_Init.
	* include/jvm.h (_Jv_MallocUnchecked): Declare.
	(_Jv_JNI_Init): Declare.
	* jni.cc: Include Hashtable.h, OutOfMemoryError.h, Integer.h,
	<string.h>.
	(_Jv_JNI_NewGlobalRef): New function.
	(_Jv_JNI_DeleteGlobalRef): New function.
	(_Jv_JNI_DeleteLocalRef): New function.
	(_Jv_JNI_conversion_call): Initialize and clear local reference
	frame.
	(_Jv_JNI_NewLocalRef): New function.
	(struct _Jv_JNI_LocalFrame): New structure.
	(_Jv_JNI_PushLocalFrame): New function.
	(_Jv_JNI_EnsureLocalCapacity): New function.
	(FRAME_SIZE): New define.
	(_Jv_JNI_GetStringChars): Mark string, not characters.
	(_Jv_JNI_ReleaseStringChars): Unmark string, not characters.
	(_Jv_JNI_GetPrimitiveArrayElements): Mark array, not elements.
	(_Jv_JNI_ReleasePrimitiveArrayElements): Unmark array, not
	elements.
	(_Jv_JNI_DefineClass): Make return value a local ref.
	(_Jv_JNI_FindClass): Likewise.
	(_Jv_JNI_GetSuperclass): Likewise.
	(_Jv_JNI_ExceptionOccurred): Likewise.
	(_Jv_JNI_AllocObject): Likewise.
	(_Jv_JNI_GetObjectClass): Likewise.
	(_Jv_JNI_CallAnyMethodV): Likewise.
	(_Jv_JNI_NewString): Likewise.
	(_Jv_JNI_NewStringUTF): Likewise.
	(_Jv_JNI_NewObjectArray): Likewise.
	(_Jv_JNI_GetObjectArrayElement): Likewise.
	(_Jv_JNI_ToReflectedField): Likewise.
	(_Jv_JNI_ToReflectedMethod): Likewise.
	(_Jv_JNIFunctions): Updated table for new functions.
	(_Jv_JNI_Init): New function.
	(mark_for_gc): Wrote.
	(unmark_for_gc): Wrote.
	* include/jni.h (struct JNINativeInterface): Removed name from
	PopLocalFrame parameter.
	(class _Jv_JNIEnv): Added `locals' field.

From-SVN: r31730
2000-02-01 06:14:26 +00:00
Anthony Green ab5cffc5e8 natIconv.cc (read): Minor fixes.
* gnu/gcj/convert/natIconv.cc (read): Minor fixes.
    (write): Ditto.

From-SVN: r31712
2000-01-31 08:56:09 +00:00
Tom Tromey 946efde181 config.h.in: Rebuilt.
* include/config.h.in: Rebuilt.
	* acconfig.h (HAVE_ICONV): Define.
	* configure: Rebuilt.
	* configure.in: Check for `iconv' function.
	* gnu/gcj/convert/BytesToUnicode.java (getDecoder): Try iconv if
	no specific encoder exists.
	* gnu/gcj/convert/UnicodeToBytes.java (getEncoder): Try iconv if
	no specific encoder exists.
	* Makefile.in: Rebuilt.
	* Makefile.am (convert_source_files): Mention Input_iconv.java and
	Output_iconv.java.
	(nat_source_files): Added natIconv.cc.
	* gnu/gcj/convert/natIconv.cc: New file.
	* gnu/gcj/convert/Input_iconv.java: New file.
	* gnu/gcj/convert/Output_iconv.java: New file.

From-SVN: r31708
2000-01-31 04:53:47 +00:00
Tom Tromey d0a844f86b Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (LIBFFIINCS): Added MULTIBUILDTOP.

From-SVN: r31672
2000-01-28 20:00:21 +00:00
Tom Tromey 355dff4cef method.h (JvNumMethods): Moved from Class.h.
* gcj/method.h (JvNumMethods): Moved from Class.h.
	(JvGetFirstMethod): Likewise.
	* java/lang/Class.h (Object): Updated decl of
	_Jv_JNI_ToReflectedField.
	(Object): Added _Jv_JNI_ToReflectedMethod as a friend.
	* Makefile.in: Rebuilt.
	* Makefile.am (java/lang/reflect/Field.h): Added `jboolean'
	argument of _Jv_JNI_ToReflectedField.
	(java/lang/reflect/Constructor.h): Added _Jv_JNI_ToReflectedMethod
	as a friend.
	(java/lang/reflect/Method.h): Likewise.
	* include/jni.h (class _Jv_JNIEnv): Added `klass' member.  Use
	__GCJ_JNI_IMPL__.
	(jweak): New typedef.
	(struct JNINativeInterface): Correctly declare remaining entries.
	* jni.cc: Include Class.h, ClassLoader.h.
	(_Jv_JNI_FindClass): New function.
	(_Jv_JNI_DefineClass): New function.
	(_Jv_JNI_conversion_call): New function.
	(_Jv_JNI_FindClass): Use current class loader to find class.
	(_Jv_JNI_ExceptionCheck): New function.
	(_Jv_JNI_FromReflectedField): Now static.
	(MethodClass): New define.
	(_Jv_JNI_FromReflectedMethod): New function.
	(_Jv_JNI_ToReflectedMethod): Likewise.
	Include Method.h.
	(_Jv_JNI_IsAssignableFrom): Renamed.
	(_Jv_JNI_GetStringRegion): New function.
	Include StringIndexOutOfBoundsException.h.
	(_Jv_JNI_GetStringUTFRegion): New function.
	(_Jv_JNIFunctions): Updated for new functions.
	(_Jv_JNI_GetPrimitiveArrayCritical): New function
	(_Jv_JNI_ReleasePrimitiveArrayCritical): Likewise.
	(_Jv_JNI_GetStringCritical): New function.
	(_Jv_JNI_ReleaseStringCritical): Likewise.
	(get_throwable): Removed.
	(GCJ_JV_JNIENV_FRIEND): Removed.
	(__GCJ_JNI_IMPL__): Define.
	Include method.h.

From-SVN: r31638
2000-01-26 23:56:36 +00:00
Tom Tromey 673fdf6d77 resolve.cc (get_ffi_type_from_signature): Handle case where boolean is an int.
* resolve.cc (get_ffi_type_from_signature): Handle case where
	boolean is an int.

From-SVN: r31637
2000-01-26 23:44:40 +00:00
Tom Tromey 8de7c9a0eb interpret.cc (run): Don't call println.
* interpret.cc (run): Don't call println.
	Don't include PrintStream.h.

From-SVN: r31622
2000-01-26 00:56:36 +00:00
Tom Tromey 8a9220959f natConstructor.cc (newInstance): Use _Jv_CallAnyMethodA.
* java/lang/reflect/natConstructor.cc (newInstance): Use
	_Jv_CallAnyMethodA.
	* include/jvm.h: Declare _Jv_CallAnyMethodA.
	* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Renamed
	from _Jv_CallNonvirtualMethodA.  Changed interface; overloaded.
	Include <jni.h>.
	(COPY): Removed.
	(invoke): Use _Jv_CallAnyMethodA.
	(VAL): Redefined.
	* java/lang/Class.h (Class): Declare JvGetFirstStaticField,
	JvNumStaticFields, JvNumMethods, and JvGetFirstMethod as friend
	functions.
	(struct _Jv_Method): Added getNextMethod method.
	(JvNumMethods): New function.
	(JvGetFirstMethod): Likewise.
	* gcj/field.h (JvGetFirstStaticField): New function.
	(JvNumStaticFields): Likewise.
	(getNextField): Renamed from getNextInstanceField.
	(struct _Jv_Field): New method getClass.
	* jni.cc: Wrote many new functions.
	* include/jni.h (JNI_TRUE): Define.
	(JNI_FALSE): Likewise.
	(jobject, jclass, jstring, jarray, jthrowable, jobjectArray,
	jbyteArray, jshortArray, jintArray, jlongArray, jbooleanArray,
	jcharArray, jfloatArray, jdoubleArray): New typedefs.
	(jfieldID, jmethodID): Likewise.
	(JNI_COMMIT, JNI_ABORT): New defines.
	(JNINativeMethod): New struct.
	(struct JNINativeInterface): Correctly declared more entries.
	(class _Jv_JNIEnv): Added `ex' member.
	(JNI_VERSION_1_1): New define.
	(JNI_VERSION_1_2): Likewise.

	* boehm.cc (_Jv_MarkObj): Use getNextField, not
	getNextInstanceField.

From-SVN: r31553
2000-01-21 23:50:31 +00:00
Tom Tromey 0b9309b6e4 resolve.cc (StringClass): Removed.
* resolve.cc (StringClass): Removed.
	* defineclass.cc (StringClass): Removed.

From-SVN: r31539
2000-01-20 17:32:26 +00:00
Bryce McKinlay dda482c1e4 Updated NEWS file.
From-SVN: r31522
2000-01-19 23:08:05 +00:00
Tom Tromey 74436afa42 * interpret.cc (PC_REGISTER_ASM): Removed.
From-SVN: r31510
2000-01-19 21:08:03 +00:00
Tom Tromey db70b4bd91 natThrowable.cc: Don't use `#pragma implementation'.
* java/lang/natThrowable.cc: Don't use `#pragma implementation'.
	From Bryce McKinlay.

From-SVN: r31505
2000-01-19 18:59:27 +00:00
Tom Tromey 7c734b1758 * All files: Updated copyright to reflect Cygnus purchase.
From-SVN: r31504
2000-01-19 18:39:27 +00:00
Bryce McKinlay f7ccaa38a7 configure: Rebuilt.
2000-01-18  Bryce McKinlay <bryce@albatross.co.nz>

	* configure: Rebuilt.
	* configure.in: Recognize --disable-interpreter.

From-SVN: r31496
2000-01-19 05:06:03 +00:00
Andrew Haley b9f243c201 name-finder.cc (lookup): Check for dladdr function.
2000-01-18  Andrew Haley  <aph@cygnus.com>

	* name-finder.cc (lookup): Check for dladdr function.
	acconfig.h (HAVE_DLADDR): Add.
	configure.in: Check for HAVE_DLADDR
	configure: Rebuilt.
	include/config.h.in:  Rebuilt.

From-SVN: r31487
2000-01-18 14:42:14 +00:00
Andrew Haley 0447654432 prims.cc (_Jv_RunMain): Set the name of this executable.
2000-01-17  Andrew Haley  <aph@cygnus.com>

	* prims.cc (_Jv_RunMain): Set the name of this executable.

From-SVN: r31486
2000-01-18 14:37:34 +00:00
Tom Tromey d269d25cd3 natThrowable.cc (fillInStackTrace): Return `this' even when backtrace can't be computed.
* java/lang/natThrowable.cc (fillInStackTrace): Return `this' even
	when backtrace can't be computed.

From-SVN: r31483
2000-01-18 06:22:13 +00:00
Tom Tromey 4f5a5d5cdb configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Fixed typo in AC_CONFIG_SUBDIRS call.

From-SVN: r31482
2000-01-18 05:33:35 +00:00
Tom Tromey 7af8555855 Runtime.java (loadLibraryInternal): Declare.
* java/lang/Runtime.java (loadLibraryInternal): Declare.
	* java/lang/natClassLoader.cc (_Jv_FindClass): Removed dead copy.
	(_Jv_FindClassInCache): Likewise.
	(_Jv_FindClass): Don't conditionalize body on INTERPRETER.
	(findSystemClass): Try to load class from compiled module.
	Include Runtime.h.
	* java/lang/natRuntime.cc (load): Use UTF-8 copy of filename.
	(loadLibrary): Likewise.
	(lt_preloaded_symbols): Define.
	(loadLibraryInternal): New method.
	* include/config.h.in: Rebuilt.
	* acconfig.h (USE_LTDL): Added.
	* Makefile.am (SUBDIRS): Added $(DIRLTDL).
	(INCLUDES): Added $(INCLTDL).b
	(libgcj_la_DEPENDENCIES): Added $(LIBLTDL).
	(libgcj_la_LIBADD): Likewise.
	* aclocal.m4, configure: Rebuilt.
	* configure.in: Added libltdl support.

From-SVN: r31472
2000-01-17 19:22:20 +00:00
Tom Tromey 451f21ef2d * prims.cc (_Jv_PrimClass): Use `JV_STATE_NOTHING', not `0'.
From-SVN: r31467
2000-01-17 18:56:43 +00:00
Andrew Haley 283a159fe3 natThrowable.cc: New file.
2000-01-14  Andrew Haley  <aph@cygnus.com>

	* java/lang/natThrowable.cc: New file.

	* java/lang/Throwable.java (fillInStackTrace): Make native.
	(printStackTrace): Call native method to do this.
	(Throwable): Call fillInStackTrace.
	(stackTrace): New variable.

	* include/jvm.h: Add _Jv_ThisExecutable functions.

	* prims.cc: (_Jv_execName): New variable.
	(catch_segv): Call fillInStackTrace.
	(catch_fpe): Ditto.
	(_Jv_ThisExecutable): New functions.
	(JvRunMain): Set the name of this executable.

	* Makefile.am: Add java/lang/natThrowable.cc.
	Add name-finder.cc.
	* Makefile.in: Rebuilt.

	* acconfig.h: Add HAVE_PROC_SELF_EXE.

	* configure.in: Force link with __frame_state_for in
	FORCELIBGCCSPEC.  Add new checks for backtrace.
	* include/config.h.in: Rebuilt.

	* name-finder.cc: New file.
	* include/name-finder.h: New file.

From-SVN: r31460
2000-01-17 15:45:24 +00:00
Anthony Green 2a198bc4bf StringBuffer.java (StringBuffer): Don't special case null argument.
2000-01-16  Anthony Green  <green@cygnus.com>

	* java/lang/StringBuffer.java (StringBuffer): Don't special case
	null argument.

From-SVN: r31451
2000-01-17 00:00:43 +00:00
Jeff Sturm 2ce7461bd0 StreamTokenizer.java (nextToken): Avoid unread(TT_EOF).
2000-01-16  Jeff Sturm  <jsturm@sigma6.com>

	* java/io/StreamTokenizer.java (nextToken): Avoid unread(TT_EOF).

From-SVN: r31449
2000-01-16 21:33:46 +00:00
Tom Tromey 357100a3ef natClassLoader.cc (_Jv_FindClass): Register `loader', not system loader, as initiating loader.
* java/lang/natClassLoader.cc (_Jv_FindClass): Register `loader',
	not system loader, as initiating loader.

From-SVN: r31395
2000-01-13 18:13:31 +00:00
Tom Tromey 6baee4c5c3 natSystem.cc (getpwuid_adaptor): New adaptor for HP/UX.
* java/lang/natSystem.cc (getpwuid_adaptor): New adaptor for
	HP/UX.  From David Scott Urban.

From-SVN: r31332
2000-01-11 18:58:13 +00:00
Jeff Sturm 0cf69affdd natMath.cc (pow): Cast args to `double', not `jdouble'.
2000-01-10  Jeff Sturm  <jsturm@sigma6.com>

	* java/lang/natMath.cc (pow): Cast args to `double', not
	`jdouble'.
	(atan2): Likewise.
	(IEEEremainder): Likewise.
	* java/lang/mprec.h: Don't wrap includes in `extern "C"'.
	* java/lang/fdlibm.h: Don't wrap includes in `extern "C"'.

From-SVN: r31305
2000-01-10 20:02:47 +00:00
Anthony Green b11f64301a natString.cc (init): Test for overflow condition during out of bounds check.
2000-01-09  Anthony Green  <green@cygnus.com>

	* java/lang/natString.cc (init): Test for overflow condition
	during out of bounds check.
	(getChars): Throw StringIndexOutOfBoundsException, not
	ArrayIndexOutOfBoundsException.
	(getBytes): Ditto.
	(regionMatches): Obey case option during string comparison.

	* configure.host (ligcj_interpreter): New variable.  Enable
	interpreter by default on IA-32.
	* configure.in:  Examine libgcj_interpreter.
	* configure: Rebuilt.

From-SVN: r31300
2000-01-09 22:25:54 +00:00
Tom Tromey be63d11f60 * mauve-libgcj: Don't disable ClassTest.
From-SVN: r31278
2000-01-07 20:42:26 +00:00
Tom Tromey bd3a924b10 * java/lang/natClass.cc (getClasses): Wrote.
From-SVN: r31276
2000-01-07 20:23:01 +00:00
Tom Tromey 55ff3de705 natClass.cc (_getConstructors): Correctly check whether method name is the init name.
* java/lang/natClass.cc (_getConstructors): Correctly check
	whether method name is the init name.
	(getMethod): Look at accflags on method in `klass', not `this'.

From-SVN: r31258
2000-01-06 18:18:15 +00:00
Tom Tromey 41ecf9300e natClass.cc (getMethod): Compute offset relative to `klass's methods table, not `this's table.
* java/lang/natClass.cc (getMethod): Compute offset relative to
	`klass's methods table, not `this's table.

	* java/lang/reflect/natMethod.cc (_Jv_CallNonvirtualMethodA):
	In unwrapping/widening case, check whether `k' is null, not
	whether it is primitive.  Initialize `num' from `argelts', not
	`paramelts'.  Correct create and pass arguments to ffi_call.
	Don't let presence of `this' argument affect index used to look in
	argument arrays.
	(COPY): Set appropriate element in `values' vector.

From-SVN: r31253
2000-01-06 00:56:21 +00:00
Tom Tromey d6ab24c514 * java/lang/natClass.cc: Include <gcj/method.h>.
From-SVN: r31249
2000-01-05 22:52:54 +00:00
Tom Tromey 1258cadadc Class.h (_getMethods): Correctly declare as private, not public.
* java/lang/Class.h (_getMethods): Correctly declare as private,
	not public.

From-SVN: r31246
2000-01-05 22:29:27 +00:00
Tom Tromey 6f2b93eb2f Class.h (_getMethods): Declare.
* java/lang/Class.h (_getMethods): Declare.
	* java/lang/Class.java (_getMethods): Declare.
	* java/lang/natClass.cc (getDeclaringClass): Always return NULL.
	(getDeclaredClasses): Always return empty array.
	(_getMethods): New method.
	(getMethods): Wrote.
	(getDeclaredMethod): Return `rmethod'.
	(finit_name): New global.
	(getDeclaredMethods): Check for finit_name.
	(_getMethods): Likewise.
	(getMethod): Only return public methods.

From-SVN: r31245
2000-01-05 22:22:10 +00:00
Tom Tromey 5dab1948f6 natMethod.cc (get_ffi_type): Test size of jboolean and select correct ffi type on that basis.
* java/lang/reflect/natMethod.cc (get_ffi_type): Test size of
	jboolean and select correct ffi type on that basis.
	(_Jv_CallNonvirtualMethodA): Handle `void' return type.
	Constructor call always has `void' return type.

From-SVN: r31242
2000-01-05 17:23:34 +00:00
Tom Tromey 95c6cc0ab5 Class.h (getSignature): Updated.
* java/lang/Class.h (getSignature): Updated.
	* java/lang/Class.java (getSignature): Updated.
	* java/lang/natClass.cc (getSignature): Added `is_constructor'
	argument.
	(getConstructor): Ensure constructor is public.
	(_getConstructors): Check for public-ness of constructor when
	`declared' is false, not when it is true.

From-SVN: r31241
2000-01-05 16:35:20 +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
Tom Tromey 0f918fea8b [multiple changes]
2000-01-04  Tom Tromey  <tromey@cygnus.com>

	* java/lang/reflect/natConstructor.cc (newInstance): Pass
	declaring class as return_type argument to
	_Jv_CallNonvirtualMethodA.
	* java/lang/reflect/natMethod.cc (_Jv_CallNonvirtualMethodA): In
	constructor case, create object and use it as `this' argument.
	* java/lang/Class.h (_getConstructors): Declare.
	(_getFields): Declare.
	* java/lang/Class.java (getConstructors): Wrote.
	(_getConstructors): New native method.
	(getDeclaredConstructors): Wrote.
	(_getFields): Declare new native method.
	* java/lang/natClass.cc (_Jv_LookupInterfaceMethod): Removed
	incorrect comment.
	(getMethod): Work correctly when class is primitive.
	(getDeclaredMethods): Likewise.  Compute offset using `method',
	not `mptr'.
	(getDeclaredMethod): Likewise.
	(getConstructor): Wrote.
	(ConstructorClass): New define.
	(getDeclaredConstructor): Wrote.
	(_getConstructors): New method.
	(_getFields): New method.
	(getFields): Wrote.

	* Makefile.in: Rebuilt.
	* Makefile.am (AM_CXXFLAGS): Added -D_GNU_SOURCE.

	* prims.cc: Remove `#pragma implementation'.
	* gcj/array.h: Remove `#pragma interface'.

	* prims.cc (_Jv_equaln): New function.
	* java/lang/Class.java (getSignature): Declare.
	* resolve.cc (_Jv_LookupDeclaredMethod): Moved to natClass.cc.
	* java/lang/natClass.cc (_Jv_LookupDeclaredMethod): Moved from
	resolve.cc.
	(getSignature): New method.
	(getDeclaredMethod): Wrote.
	(getMethod): Wrote.
	Include StringBuffer.h.
	* java/lang/Class.h (Class): Added _Jv_FromReflectedConstructor
	as a friend.  Unconditionally declare _Jv_LookupDeclaredMethod as
	a friend.
	(getSignature): Declare.
	* include/jvm.h (_Jv_GetTypesFromSignature): Declare.
	(_Jv_equaln): Declare.
	(_Jv_CallNonvirtualMethodA): Declare.
	* Makefile.in: Rebuilt.
	* Makefile.am (nat_source_files): Added natConstructor.cc.
	(java/lang/reflect/Constructor.h): New target.
	* java/lang/reflect/natConstructor.cc: New file.
	* java/lang/reflect/Constructor.java (newInstance): Now native.
	(declaringClass): Renamed from decl_class.
	(offset): Renamed from index.
	(getType): New native method.
	(getModifiers): Now native.
	(getParameterTypes): Call getType if required.
	(hashCode): Include hash code from declaring class.
	(modifiers): Removed.
	(toString): Call getType if required.
	* gcj/method.h (_Jv_FromReflectedConstructor): New function.
	* java/lang/reflect/natMethod.cc (hack_call): New method.
	Removed `#if 0' around FFI code.
	Include <gnu/gcj/RawData.h>.
	(invoke): Use _Jv_CallNonvirtualMethodA.  Throw
	IllegalArgumentException when argument object and class disagree.
	(_Jv_GetTypesFromSignature): New function.
	(getType): Use it.
	(ObjectClass): New define.
	(_Jv_CallNonvirtualMethodA): New function.
	* java/lang/reflect/Method.java (hack_trampoline): New method.
	(hack_call): New native method.

1999-12-21  Per Bothner  <per@bothner.com>

	* java/lang/natClass.cc (getDeclaredMethods): Correctly compute
	offset in new Method.

From-SVN: r31199
2000-01-04 08:46:52 +00:00
Bryce McKinlay 43cbc9430d natObject.cc (notify): Throw message with IllegalMonitorStateException.
1999-12-22  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/lang/natObject.cc (notify): Throw message with
        IllegalMonitorStateException.
        (notifyAll): Ditto.
        (wait): Ditto.
        * java/lang/Thread.java (isInterrupted): Don't clear interrupt_flag.
        (isInterrupted_): New function, which does clear interrupt_flag.
        (interrupt): Use `isInterrupted_'.
        * java/lang/natThread.cc (interrupt): Add comment.
        (join): Set `Prev' in joiner loop.
        Change various calls to `isInterrupted' to use `isInterrupted_'.
        * posix-threads.cc (_Jv_CondWait): Allways use pthread_cond_timedwait
        on linux. Set result to 0 on an interrupt. Test interrupted status
        of java Thread object directly.
        FLAG_INTERRUPTED: removed.
        (_Jv_ThreadStart): Throw OutOfMemoryError if pthread_create fails.
        (_Jv_ThreadInterrupt): Don't set FLAG_INTERRUPTED.
        (_Jv_InitThreads): Don't block SIGINT.
        (_Jv_ThreadWait): Don't configure SIGINT handler.

From-SVN: r31082
1999-12-24 01:00:46 +00:00
Tom Tromey f9f1f4a651 * mauve-libgcj: Added java.lang.reflect.Modifier.toString12.
From-SVN: r31061
1999-12-21 23:50:01 +00:00
Tom Tromey bcc7684092 Modifier.java (STRICT): New constant.
* java/lang/reflect/Modifier.java (STRICT): New constant.
	(isStrict): New method.
	(toString): Added `strict'.

From-SVN: r31040
1999-12-20 23:05:21 +00:00
Anthony Green d352598f80 Alpha Linux changes.
From-SVN: r31030
1999-12-20 05:55:34 +00:00
Anthony Green 7013e7cda9 libgcjdata.c: New file.
1999-12-19  Anthony Green  <green@cygnus.com>

        * libgcjdata.c: New file.
        * libgcj.spec.in: Use @LIBDATASTARTSPEC@ in startfile.
        * configure: Rebuilt.
        * configure.in (LIBDATASTARTSPEC): Force data with a known name
        into the program.
        * Makefile.in: Rebuilt.
        * Makefile.am: Build libgcjdata.a.

        * libgcj.spec.in: Use @FORCELIBGCCSPEC@ in startfile.
        * configure: Rebuilt.
        * configure.in (FORCELIBGCCSPEC): Force important parts of libgcc
        into every program.

From-SVN: r31027
1999-12-20 02:18:11 +00:00
Tom Tromey ccfe7d0a0d re GNATS libgcj/111 (bug in reflection code)
* java/lang/reflect/Method.java (toString): Call getType if
	required.  Partial fix for PR libgcj/111.  From Per Bothner.

From-SVN: r31002
1999-12-18 00:44:00 +00:00
Tom Tromey ce63fdce90 * java/lang/natPosixProcess.cc (startProcess): Don't use sprintf.
From-SVN: r30996
1999-12-17 16:06:17 +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
Tom Tromey 6150df627a natSystem.cc (init_properties): Don't set user.name or user.home if NO_GETUID defined.
* java/lang/natSystem.cc (init_properties): Don't set user.name or
	user.home if NO_GETUID defined.  Only set user.dir if getcwd
	exists.

	* include/config.h.in: Rebuilt.
	* acconfig.h (NO_GETUID): New define.
	* configure.in: Rebuilt.
	* configure.in: Define NO_GETUID in cross case.  Check for getcwd
	in native case.

From-SVN: r30964
1999-12-15 22:38:56 +00:00
Tom Tromey c97e511d31 re GNATS libgcj/117 (_Jv_PthreadCheckMonitor test is not portable.)
* include/posix-threads.h (_Jv_PthreadCheckMonitor): Handle case
	where no recursive mutexes exist.  Fixes PR libgcj/117.

From-SVN: r30847
1999-12-09 16:57:27 +00:00
Anthony Green d3189ab7da jvm.h: Declare many functions with __attribute__((__malloc__)).
* include/jvm.h: Declare many functions with
	__attribute__((__malloc__)).
	* gcj/javaprims.h: Ditto.

From-SVN: r30794
1999-12-06 06:33:56 +00:00
Anthony Green 38a7fbac35 Updated the thanks list.
From-SVN: r30764
1999-12-03 03:00:39 +00:00
Bryce McKinlay aa620e4294 natString.cc (equalsIgnoreCase): return false if anotherString is null.
* java/lang/natString.cc (equalsIgnoreCase): return false if
        anotherString is null.
        * java/lang/Boolean.java (valueOf): return FALSE if argument is
        null.

From-SVN: r30763
1999-12-02 19:59:30 +00:00
Bryce McKinlay c390b4a687 ServerSocket.java (ServerSocket): Bind to any interface if bindAddr is null.
1999-12-02  Bryce McKinlay  <bryce@albatross.co.nz>

        * libjava/java/net/ServerSocket.java (ServerSocket): Bind to any
        interface if bindAddr is null.

From-SVN: r30755
1999-12-02 10:09:24 +00:00
Tom Tromey 4cb74b7695 re GNATS libgcj/98 (pthread_mutex_init in libjava/posix-threads.cc)
* posix-threads.cc (_Jv_MutexInit): Use _Jv_PthreadGetMutex to get
	mutex to initialize.  Initialize `count' if required.
	Fixes PR libgcj/98.

From-SVN: r30725
1999-11-30 18:53:15 +00:00
Per Bothner 9b811d11de exception.cc: Remove prototype declarations for malloc and free.
1999-11-27  Per Bothner  <per@bothner.com>

	* exception.cc:  Remove prototype declarations for malloc and free.
	These clash with recent versions of glibc, which specifies `throws ()'
	when __cplusplus is defined.  Instead, #include <stdlib.h>.

From-SVN: r30709
1999-11-29 19:43:55 +00:00
Tom Tromey 93d4556218 prims.cc (_Jv_NewObjectArray): Use _Jv_GetArrayElementFromElementType.
* prims.cc (_Jv_NewObjectArray): Use
	_Jv_GetArrayElementFromElementType.
	(_Jv_NewPrimArray): Likewise.
	* java/lang/natObject.cc (clone): Use
	_Jv_GetArrayElementFromElementType instead of sizeof.
	* java/lang/natSystem.cc (arraycopy): Use
	_Jv_GetArrayElementFromElementType.
	* include/jvm.h (_Jv_GetArrayElementFromElementType): New
	function.

From-SVN: r30655
1999-11-25 00:36:51 +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 3cf88fb4e8 sjlj jumbo patch
From-SVN: r30591
1999-11-19 19:13:42 +00:00
Tom Tromey 8cb9ab4b7e * no-threads.cc (_Jv_ThreadStart): Use JvFail and not JvAssert.
From-SVN: r30569
1999-11-18 07:32:50 +00:00
Tom Tromey 5b8c39e0aa natClass.cc (MCACHE_SIZE): Define as a power of 2 minus 1.
* java/lang/natClass.cc (MCACHE_SIZE): Define as a power of 2
	minus 1.
	(method_cache): Made larger.

From-SVN: r30568
1999-11-18 07:19:00 +00:00
Anthony Green a21d059766 ZipFile.java: Compute the offset of the ZipEntry data correctly.
* java/util/zip/ZipFile.java: Compute the offset of the ZipEntry
        data correctly.

From-SVN: r30439
1999-11-07 08:30:31 +00:00
Tom Tromey e4c4f09a1e * java/lang/natThread.cc (destroy): Removed incorrect comment.
From-SVN: r30423
1999-11-05 20:59:40 +00:00
Jeff Sturm 3948f9d08f boehm.cc (_Jv_GCSetInitialHeapSize): Swapped size & current.
1999-11-05  Jeff Sturm  <jsturm@sigma6.com>

	* boehm.cc (_Jv_GCSetInitialHeapSize): Swapped size & current.
	* prims.cc (parse_heap_size): Use end, not spec.  Use 1024
	multipler for `k'.

From-SVN: r30418
1999-11-05 17:34:32 +00:00
Tom Tromey ea638d6c94 natThread.cc (stop): Removed argument name.
* java/lang/natThread.cc (stop): Removed argument name.

	* java/lang/ThreadGroup.java (ThreadGroup(int)): No longer
	`private'; now has default access.
	* Makefile.in: Rebuilt.
	* Makefile.am (java/lang/ThreadGroup.h): Removed.

From-SVN: r30417
1999-11-05 17:10:17 +00:00
Tom Tromey 397f674e7f natClass.cc (method_cache_count): Removed.
* java/lang/natClass.cc (method_cache_count): Removed.
	(_Jv_FindMethodInCache): Don't loop looking for the hash entry.
	(_Jv_AddMethodToCache): Don't loop.

From-SVN: r30397
1999-11-04 19:47:01 +00:00
Tom Tromey 7f80fbe501 configure.in: Removed `qt' threads case.
* configure.in: Removed `qt' threads case.
	* include/quick-threads.h: Removed.
	* quick-threads.cc: Removed.

From-SVN: r30393
1999-11-04 17:12:25 +00:00
Tom Tromey 16f39e241a quick-threads.h (_Jv_ThreadCancel): Removed.
* include/quick-threads.h (_Jv_ThreadCancel): Removed.
	(_Jv_ThreadDestroy): Likewise.
	* include/no-threads.h (_Jv_ThreadCancel): Removed.
	(_Jv_ThreadDestroy): Likewise.
	* include/posix-threads.h (struct _Jv_Thread_t): Removed
	`exception' field.
	(_Jv_ThreadCancel): Removed decl.
	(_Jv_ThreadDestroy): Removed.
	* posix-threads.cc (_Jv_ThreadCancel): Removed.
	(throw_cleanup): Removed.
	(really_start): Don't push or pop cleanup.
	(_Jv_ThreadInitData): Don't initialize `exception' field.
	* java/lang/Thread.java (stop): Officially unimplemented.
	* java/lang/natThread.cc (stop): Officially unimplemented.

From-SVN: r30392
1999-11-04 16:45:11 +00:00
Bryce McKinlay 8fbe2d958a posix-threads.cc: Don't include boehm-config.h.
1999-11-02  Bryce McKinlay  <bryce@albatross.co.nz>

        * posix-threads.cc: Don't include boehm-config.h. Include gcconfig.h
        instead.

From-SVN: r30365
1999-11-03 03:10:22 +00:00
Bryce McKinlay 5e4f217316 posix-threads.cc: Don't include boehm-config.h.
1999-11-02  Bryce McKinlay  <bryce@albatross.co.nz>

        * posix-threads.cc: Don't include boehm-config.h.

From-SVN: r30361
1999-11-03 02:13:40 +00:00
Tom Tromey 965fe4f16f * boehm.cc: Don't include boehm-config.h.
From-SVN: r30359
1999-11-03 01:15:40 +00:00
Tom Tromey e40217a763 boehm.cc (_Jv_InitGC): Set GC_java_finalization.
* boehm.cc (_Jv_InitGC): Set GC_java_finalization.
	(sum_blocks): Removed.
	(_Jv_GCFreeMemory): Use GC_get_free_bytes.

From-SVN: r30335
1999-11-02 00:12:10 +00:00
Bryce McKinlay 6b5ba2ce34 PrintStream (PrintStream): Fix illegal usage of "this" before "super".
1999-11-01  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/io/PrintStream (PrintStream): Fix illegal usage of "this"
          before "super".
        * java/io/OutputStreamWriter (OutputStreamWriter): ditto.
        * java/io/InputStreamReader (InputStreamReader): ditto.

From-SVN: r30300
1999-11-01 01:15:37 +00:00
Tom Tromey b8c3c4f014 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (java/lang/ClassLoader.h): New target.
	* java/lang/natClassLoader.cc (_Jv_FindClass): Removed reference
	to `redirect'.

	* include/java-props.h (_Jv_Compiler_Properties): Changed
	declaration.
	* gcj/array.h (JvRunMain, _Jv_RunMain): Don't declare.
	* include/jvm.h (_Jv_GCSetInitialHeapSize,
	_Jv_GCSetMaximumHeapSize): Declare.
	(JvRunMain, _Jv_RunMain): Declare.
	(_Jv_SetMaximumHeapSize, _Jv_SetInitialHeapSize): Declare.
	* nogc.cc (_Jv_GCSetInitialHeapSize): New function.
	(_Jv_GCSetMaximumHeapSize): Likewise.
	* boehm.cc (_Jv_GCSetInitialHeapSize): New function.
	(_Jv_GCSetMaximumHeapSize): Likewise.
	* prims.cc (parse_heap_size): New function.
	(_Jv_SetInitialHeapSize): Likewise.
	(_Jv_SetMaximumHeapSize): Likewise.
	(_Jv_Compiler_Properties): New global.
	* gij.cc (help): New function.
	(version): Likewise.
	(heap_size): Likewise.
	(heap_max_size): Likewise.
	(main): Parse arguments.  Set _Jv_Compiler_Properties.
	Include <config.h>, <java-props.h>.
	(_Jv_Compiler_Properties): Removed.

From-SVN: r30133
1999-10-22 19:43:41 +00:00
Tom Tromey 4b84737d47 VMClassLoader.java (getVMClassLoader): New method.
* gnu/gcj/runtime/VMClassLoader.java (getVMClassLoader): New
	method.
	(redirect): New static field.
	* java/lang/ClassLoader.java (getSystemClassLoader): Now
	native
	(getVMClassLoader0): Removed.
	* java/lang/natClassLoader.cc (getVMClassLoader0): Removed.
	(redirect): Removed.
	(getSystemClassLoader): Implemented.

From-SVN: r30075
1999-10-18 22:57:07 +00:00
Anthony Green 6c413a50e6 ClassLoader.java (getSystemResource): Use getSystemClassLoader instead of ClassLoader.system.
* java/lang/ClassLoader.java (getSystemResource): Use
        getSystemClassLoader instead of ClassLoader.system.
        (getSystemResourceAsStream): Ditto.

        * java/lang/natClassLoader.cc (redirect): Make static and
        remove #ifdef INTERPRETER so it is always defined.
        (getVMClassLoader0): Remove #ifdef INTERPRETER so it always
        returns a VMClassLoader.

        * java/util/ResourceBundle.java (trySomeGetBundle): Create a
        PropertyResourceBundle if a properties file is found before a
        ResourceBundle class.

From-SVN: r30048
1999-10-17 03:11:50 +00:00
Tom Tromey 76ed0c0a4b gij.cc (main): Formatting fixes.
* gij.cc (main): Formatting fixes.
	(_Jv_Compiler_Properties): Define.
	* java/lang/natSystem.cc (_Jv_Environment_Properties): Don't
	declare.
	(init_properties): Set properites from _Jv_Compiler_Properties.
	* include/java-props.h (_Jv_Compiler_Properties,
	_Jv_Environment_Properties): Declare.

From-SVN: r30020
1999-10-15 16:53:41 +00:00
Tom Tromey 3ae21bfccf * include/java-props.h: Added copyright.
From-SVN: r30018
1999-10-15 15:42:26 +00:00
Anthony Green ffccc6bee2 libtool-version: Catch up by incrementing current.
* libtool-version: Catch up by incrementing current.

        * configure.host: Disable use of GCJ_PROPERTIES for mips-tx39.
        * configure, include/config.h.in: Rebuilt.
        * acconfig.h (DISABLE_GETENV_PROPERTIES): Undefine.
        * configure.in: Added --disable-getenv-properties and new define
        `DISABLE_GETENV_PROPERTIES'.

        * prims.cc (PROCESS_GCJ_PROPERTIES): Define.
        (next_property_key): New function.
        (next_property_value): New function.
        (process_gcj_properties): New function.
        (JvRunMain): Call process_gcj_properties.
        (_JvRunMain): Ditto.

        * java/lang/natSystem.cc (init_properties): Set properties defined
        in GCJ_PROPERTIES.  Also add 1.2 style versioning properties.

        * include/java-props.h: New file.

        * java/lang/natSystem.cc (init_properties): Add new properties to
        conform with Java Product Versioning Specification.

From-SVN: r30007
1999-10-15 06:07:41 +00:00
Tom Tromey 006d4a9b37 configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Fixed test for --disable-java-net.

From-SVN: r29931
1999-10-13 00:00:35 +00:00
Tom Tromey f2646bf2fa configure.in (GCJ): Define as "target-gcj", not "target/gcj" when building Canadian cross.
* configure.in (GCJ): Define as "target-gcj", not "target/gcj"
	when building Canadian cross.
	(NATIVE): Don't define when cross-compiling.

From-SVN: r29848
1999-10-06 23:13:37 +00:00
Tom Tromey 97cf151d27 natPlainSocketImpl.cc: Don't include headers if java.net is disabled.
* java/net/natPlainSocketImpl.cc: Don't include headers if
	java.net is disabled.

From-SVN: r29812
1999-10-04 21:37:30 +00:00
Tom Tromey 39acd93283 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (ZINCS): Removed.  This is defined in configure.in
	when needed, and must be left empty when not needed.

From-SVN: r29809
1999-10-04 19:09:09 +00:00
Anthony Green fc78679f9e Refreshed from htdocs
From-SVN: r29768
1999-10-02 16:39:36 +00:00
Steve Chamberlain f3775ba228 Missing file from last commit
From-SVN: r29766
1999-10-02 15:46:27 +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
Bryce McKinlay faf1fdf0b2 README: New file.
1999-09-29  Bryce McKinlay  <bryce@albatross.co.nz>

        * README: New file.

From-SVN: r29717
1999-09-30 03:17:36 +01:00
Tom Tromey ab31268c62 configure: Rebuilt.
* configure: Rebuilt.
	* configure.in (PROCESS): In POSIX case, only set if not already
	set.
	* configure.host (PROCESS): Set in mips-tx39 case.

From-SVN: r29700
1999-09-28 22:16:57 +00:00
Tom Tromey 54ce745286 aclocal.m4, configure: Rebuilt.
* aclocal.m4, configure: Rebuilt.
	* acinclude.m4 (LIB_AC_PROG_CC, LIB_AC_PROG_CXX): Provide

From-SVN: r29698
1999-09-28 20:14:11 +00:00
Tom Tromey 8c14177ca8 sparc-signal.h (SIGNAL_HANDLER): Third argument now a `void *'.
* include/sparc-signal.h (SIGNAL_HANDLER): Third argument now a
	`void *'.
	(MAKE_THROW_FRAME): Cast third argument back to `ucontext_t *'.

From-SVN: r29682
1999-09-27 21:16:40 +00:00
Tom Tromey 98e7ae2962 re GNATS java.util/47 (Date.toString() returns embedded newline)
Fix for PR java.util/47:
	* configure, include/config.h: Rebuilt.
	* configure.in: Don't look for ctime or ctime_r.
	* Makefile.in: Rebuilt.
	* Makefile.am (nat_source_files): Don't mention natDate.cc.
	* java/util/natDate.cc: Removed.
	* java/util/TimeZone.java (tzIDs, rawOffsets, timeZones): New
	static fields.
	(getAvailableIDs): Rewrote.
	(getTimeZone): Rewrote.
	* java/util/Date.java (toGMTString): New method.
	(toLocaleString): New method.
	(toString): Rewrote.

From-SVN: r29656
1999-09-24 19:12:23 +00:00
Tom Tromey 8cd098069c configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Print message when checking to see if gcj can
	handle -fuse-divide-subroutine.

From-SVN: r29628
1999-09-23 19:38:11 +00:00
Tom Tromey f08113ce11 natFirstThread.cc (run): Renamed from `run0'.
* java/lang/natFirstThread.cc (run): Renamed from `run0'.  Removed
	dead code.
	* java/lang/FirstThread.java (run0): Renamed to `run'.
	(run): Removed.

From-SVN: r29626
1999-09-23 19:05:50 +00:00
Tom Tromey 9b0cb28706 re GNATS gcj/51 (Writing on OutputStream of bad Socket kills app with "Broken pipe")
* prims.cc (main_init): New function.
	(JvRunMain): Call it.
	(_Jv_RunMain): Likewise.
	Include <signal.h>.
	(main_init): Ignore SIGPIPE.  Fixes PR 51.

From-SVN: r29625
1999-09-23 18:50:59 +00:00
Tom Tromey 17f4971f7b * libgcj.spec.in: Use `jc1' spec, not `cc1' spec.
From-SVN: r29602
1999-09-22 20:44:41 +00:00
Bryce McKinlay 5ab00e275b MessageFormat.java (MessageFormat(String)): Set the default locale.
1999-09-16  Bryce McKinlay  <bryce@albatross.co.nz>
	* java/text/MessageFormat.java (MessageFormat(String)): Set the
	default locale.
	* java/text/NumberFormat.java: Check that object is a Number. If
	not, throw IllegialArgumentException.

From-SVN: r29574
1999-09-22 05:41:26 +01:00
Tom Tromey 707f5f6d45 Output_UTF8.java (write): Don't exit loop unless both `inlength' and `bytes_todo' are 0.
* gnu/gcj/convert/Output_UTF8.java (write): Don't exit loop unless
        both `inlength' and `bytes_todo' are 0.  Simplified 2-byte case.

From-SVN: r29570
1999-09-21 23:20:43 +00:00
Tom Tromey 5057b5e8d1 posix-threads.h (_Jv_MutexDestroy): Use _Jv_PthreadGetMutex.
* include/posix-threads.h (_Jv_MutexDestroy): Use
	_Jv_PthreadGetMutex.
	(_Jv_MutexLock): Likewise.
	(_Jv_MutexUnlock): Likewise.

From-SVN: r29569
1999-09-21 23:01:23 +00:00
Tom Tromey 49d385e3cd OutputStreamWriter.java (OutputStreamWriter): Reverted previous patch; it too was incorrect.
* java/io/OutputStreamWriter.java (OutputStreamWriter): Reverted
	previous patch; it too was incorrect.
	* java/io/PrintStream.java (PrintStream): Likewise.

From-SVN: r29566
1999-09-21 21:35:41 +00:00
Tom Tromey 118a6ea134 OutputStreamWriter.java (OutputStreamWriter): Don't refer to `this' before calling superclass constructor.
* java/io/OutputStreamWriter.java (OutputStreamWriter): Don't
	refer to `this' before calling superclass constructor.
	* java/io/PrintStream.java (PrintStream): Don't refer to `this'
	before calling superclass constructor.

From-SVN: r29560
1999-09-21 19:49:13 +00:00
Tom Tromey 8801244b4f configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Send output of `-fuse-divide-subroutine' test
	compilation to /dev/null.

From-SVN: r29529
1999-09-20 20:09:42 +00:00
Tom Tromey 86bcc1a3b4 java-insns.h: Turned constants into an enum.
* include/java-insns.h: Turned constants into an enum.  Added
	multiple-inclusion protection.

From-SVN: r29406
1999-09-14 14:19:59 +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
Tom Tromey f1b856d94e configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Fixed typo; variable is THREADSPEC and not
	THREADSPECS.

From-SVN: r29251
1999-09-10 00:10:04 +00:00
Tom Tromey c45a8466e6 posix-threads.h (_Jv_PthreadCheckMonitor): Reverted previous change and implemented a correct test in the __m_count case.
* include/posix-threads.h (_Jv_PthreadCheckMonitor): Reverted
	previous change and implemented a correct test in the __m_count
	case.

From-SVN: r29209
1999-09-08 17:10:22 +00:00
Tom Tromey 400ec27079 posix-threads.h (_Jv_PthreadCheckMonitor): Changed test in __m_count case.
* include/posix-threads.h (_Jv_PthreadCheckMonitor): Changed test
	in __m_count case.

From-SVN: r29193
1999-09-08 07:01:32 +00:00
Tom Tromey 472236af04 posix-threads.cc (_Jv_CondWait): pthread_ calls return error code and don't set errno.
* posix-threads.cc (_Jv_CondWait): pthread_ calls return error
	code and don't set errno.

From-SVN: r29179
1999-09-08 02:31:33 +00:00
Tom Tromey fd59e3a04e posix-threads.cc (_Jv_CondWait): Check `errno' against EINTR, not `r'.
1999-09-07  Tom Tromey  <tromey@cygnus.com>

	* posix-threads.cc (_Jv_CondWait): Check `errno' against EINTR,
	not `r'.  Changed `done_sleeping' to a `bool'.

1999-09-07  Matt Welsh <mdw@cs.berkeley.edu

	* libjava/posix-threads.cc: Added _Jv_ThreadDataKey.
	Added FLAG_INTERRUPTED to indicate that a thread was interrupted
	by another thread, rather than by the GC.
	(_Jv_CondWait): Prevent premature thread wakeup by GC.
	(_Jv_InitThreads): Initialize _Jv_ThreadDataKey.
	* libjava/include/posix-threads.h (_Jv_ThreadCurrentData): New
	function.

From-SVN: r29177
1999-09-08 00:43:06 +00:00
Tom Tromey 1d189890ae re GNATS libgcj/3 (FileInputStream.available always returns 0)
* configure: Rebuilt.
	* configure.in: Check for fstat function.
	* java/io/natFileDescriptorPosix.cc (available): Use fstat() if
	FIONREAD fails.
This fixes PR 3

From-SVN: r29078
1999-09-03 07:42:40 +00:00
Tom Tromey ec52881776 java-array.h (jobjectArrayjchar): Removed unused declaration.
* include/java-array.h (jobjectArrayjchar): Removed unused
	declaration.

From-SVN: r29068
1999-09-02 23:47:38 +00:00
Tom Tromey 773c6f0076 natClassLoader.cc (_Jv_WaitForState): Call _Jv_PrepareCompiledClass while holding class mutex.
* java/lang/natClassLoader.cc (_Jv_WaitForState): Call
	_Jv_PrepareCompiledClass while holding class mutex.

From-SVN: r29063
1999-09-02 19:33:50 +00:00
Tom Tromey bc5afba452 posix-threads.h (PTHREAD_MUTEX_IS_STRUCT): New define.
* include/posix-threads.h (PTHREAD_MUTEX_IS_STRUCT): New define.
	(_Jv_PthreadGetMutex): Use it.
	(_Jv_PthreadCheckMonitor): Use new M_COUNT macros.
	(_Jv_MutexInit): Use PTHREAD_MUTEX_IS_STRUCT.
	(_Jv_MutexLock): Likewise.
	(_Jv_MutexUnlock): Likewise.
	* include/config.h.in: Rebuilt.
	* acconfig.h (PTHREAD_MUTEX_HAVE_M_COUNT,
	PTHREAD_MUTEX_HAVE___M_COUNT): New undefs.
	* configure: Rebuilt.
	* libgcj.spec.in: Don't mention INTERPSPEC.
	* configure.in (INTERPSPEC): Removed.
	Only run pthreads-related checks when using POSIX threads.  Check
	for m_count and __m_count in mutex structure.

From-SVN: r29048
1999-09-02 06:27:00 +00:00
Matt Welsh a41cb705f6 natClass.cc: Fixed notification of threads when class initialization is complete.
* java/lang/natClass.cc: Fixed notification of threads
	when class initialization is complete.

From-SVN: r29043
1999-09-02 03:46:35 +00:00
Tom Tromey e409a2c8f4 Modifier.java (ALL_FLAGS): New constant.
* java/lang/reflect/Modifier.java (ALL_FLAGS): New constant.
	* resolve.cc: Removed constants defined by
	java.lang.reflect.Modifier.
	Include <java/lang/reflect/Modifier.h>.
	(_Jv_ResolvePoolEntry): Use values from Modifier.
	(_Jv_DetermineVTableIndex): Likewise.
	(_Jv_PrepareClass): Likewise.
	(ncode): Likewise.
	* defineclass.cc (_Jv_ClassReader): Removed constants defined by
	java.lang.reflect.Modifier.
	Include <java/lang/reflect/Modifier.h>.
	(checkExtends): Use values from Modifier.
	(checkImplements): Likewise.
	(handleField): Likewise.
	(handleConstantValueAttribute): Likewise.
	(handleFieldsEnd): Likewise.
	(handleMethod ): Likewise.
	(handleMethodsEnd): Likewise.
	(handleClassBegin): Likewise.
	* interpret.cc: Removed constants defined by
	java.lang.reflect.Modifier.
	(continue1): Use values from Modifier.
	* java/lang/natClassLoader.cc: Removed constants defined by
	java.lang.reflect.Modifier.

From-SVN: r29037
1999-09-01 22:02:20 +00:00
Tom Tromey 6c2a11802a natClassLoader.cc (_Jv_NewClass): Use JV_STATE_NOTHING, not `0'.
* java/lang/natClassLoader.cc (_Jv_NewClass): Use
	JV_STATE_NOTHING, not `0'.
	* java/lang/Class.h: Replaced JV_STATE_ defines with enum.

From-SVN: r29033
1999-09-01 21:05:17 +00:00
Tom Tromey 45329b398e posix-threads.cc (_Jv_CondWait): Use _Jv_PthreadGetMutex.
* posix-threads.cc (_Jv_CondWait): Use _Jv_PthreadGetMutex.
	* include/posix-threads.h (_Jv_Mutex_t): Define as structure,
	except on Linux.
	(_Jv_PthreadGetMutex): New function.
	(_Jv_PthreadCheckMonitor): Use it.
	(_Jv_MutexInit): Likewise.  ALso, initialize `count'.
	(_Jv_MutexLock): Update `count'.
	(_Jv_MutexUnlock): Likewise.
	(_Jv_PthreadCheckMonitor): Use Linux-specific knowledge when
	appropriate.

From-SVN: r29032
1999-09-01 21:03:18 +00:00
Kresten Krab Thorup 4499762c6e * ChangeLog: update.
From-SVN: r29031
1999-09-01 18:49:55 +00:00
Tom Tromey 6e87747b6d posix-threads.cc (_Jv_CondWait): Call _Jv_PthreadCheckMonitor.
* posix-threads.cc (_Jv_CondWait): Call _Jv_PthreadCheckMonitor.
	* include/posix-threads.h (_Jv_PthreadCheckMonitor): New
	function.
	(_Jv_CondNotify): Use it.
	(_Jv_CondNotifyAll): Likewise.

	* java/lang/Class.h (JV_STATE_NOTHING): Correct misspelling.

From-SVN: r29030
1999-09-01 18:29:39 +00:00
Tom Tromey 1aaeb2f0b5 jvm.h (_Jv_makeUtf8TypeConst): Removed unused declaration.
* include/jvm.h (_Jv_makeUtf8TypeConst): Removed unused
	declaration.

From-SVN: r29021
1999-09-01 02:36:40 +00:00
Bryce McKinlay d55d01bdf8 * posix-threads.cc: Include <errno.h>.
From-SVN: r28831
1999-08-25 01:46:23 +01:00
Tom Tromey 657ac7664c boehm.cc: Undefine TRUE and FALSE.
* boehm.cc: Undefine TRUE and FALSE.

	* posix-threads.cc (_Jv_CondWait): Use ETIMEDOUT, not ETIME.

From-SVN: r28810
1999-08-24 04:01:06 +00:00
Tom Tromey 33e8c77e61 re GNATS libgcj/40 (wait(timeout) wrongly throws IllegalMonitorState exception)
* posix-threads.cc (_Jv_CondWait): Treat a timeout as a normal
	result.  PR 40.

From-SVN: r28799
1999-08-22 02:37:04 +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
Alexandre Oliva a3e174eae5 configure.in: Check types ssize_t and in_addr_t.
* configure.in: Check types ssize_t and in_addr_t.
* acconfig.h: Undefine them.
* configure, include/config.h.in: Rebuilt.

From-SVN: r28793
1999-08-21 13:15:55 +00:00
Alexandre Oliva e07eb72abc natSystem.cc (getpwuid_adaptor): New overloaded function that detects the signature of getpwuid_r.
* java/lang/natSystem.cc (getpwuid_adaptor): New overloaded
function that detects the signature of getpwuid_r.
(init_properties): Use it.
* java/util/natDate.cc (ctime_adaptor): Likewise for ctime_r.
(toString): Use it.

From-SVN: r28792
1999-08-21 12:49:39 +00:00
Kresten Krab Thorup f7b4fb110a interpret.cc (continue1): Implement explicit dispatch table.
* interpret.cc (continue1): Implement explicit dispatch table.
	insn_target: Explicit interpreter switch table.
	SAVE_PC: New macro, moves pc saving code into instructions that
	require so.
	NEXT_INSN: New macro, replaces `goto next_insn' in all insns.
	PC_REGISTER_ASM: New macro.
	INLINE_SWITCH: New macro.  Constrols dispatching strategy.
	opcode: Remove local variable.
	{i,l,f,d}{load,store}_{0,1,2,3}: Expand definitions.
	(POKEI): Use _Jv_word.
	(iinc): Use _Jv_word.
	(dupx): Change reference argument (sp) to pointer.
	(jvdump): Remove

	* interpret.cc: Remove instruction timing instrumentation.

	* java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Changed
	comment.  Don't use _Jv_ClassNameSamePackage.

	* gnu/gcj/util/path/{SearchPath,ZipFileEntry,DirectoryPathEntry,
	URLPathEntry, CacheEntry}: Removed.

	* Makefile.am (ordinary_java_source_files): Remove gnu/gcj/util/path
	package.
	(.java.lo): Rule removed.

	* Makefile.in: Rebuilt.

From-SVN: r28777
1999-08-20 11:40:35 +00:00
Tom Tromey bd30fa53ca natThread.cc (class locker): New class.
* java/lang/natThread.cc (class locker): New class.
	(join): Use a locker around _Jv_CondWait.
	(sleep): Likewise.

From-SVN: r28770
1999-08-19 22:58:27 +00:00
Tom Tromey 5a0eb8326f ThreadGroup.java: Fixed now-erroneous comment.
* java/lang/ThreadGroup.java: Fixed now-erroneous comment.
	* java/lang/natThread.cc (finish_): Call ThreadGroup.remove.

From-SVN: r28753
1999-08-18 19:51:23 +00:00
Tom Tromey 4c9d8fa8c5 * include/javaprims.h ("Java"): Regenerated namespace decls.
From-SVN: r28749
1999-08-18 16:34:28 +00:00
Kresten Krab Thorup eb4534a636 natClassLoader.cc (_Jv_PrepareCompiledClass): Renamed from _Jv_InternClassStrings.
* java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Renamed
	from _Jv_InternClassStrings.

	* prims.cc (_Jv_RunMain): New function.
	(JvRunMain): Remove gij-support.

	* gij.cc (main): Use _Jv_RunMain.

	* java/util/zip/ZipFile.java: Call readDirectory in constructor.

	* interpret.cc (PUSHA, PUSHI, PUSHF, PUSHL, PUSHD): Don't store
	argument in temp variable.
	(continue1): For all op_x2y insns, use temp variable for
	intermediate value.  Also remove some comments.

	* java/lang/natClass.cc (newInstance): Call _Jv_InitClass.
	(forName): Don't call _Jv_InitClass.

	* java/lang/Class.java (getResource,getResourceAsStream): Implement.

	* java/util/zip/ZipEntry.java (ZipEntry(ZipEntry)): New construcor.

	* java/util/jar/JarInputStream.java: New file.

	* java/util/jar/JarEntry.java: New file.

	* java/util/jar/JarFile.java: New file.

	* java/net/URLClassLoader.java: New file.

	* java/net/JarURLConnection.java: New file.

	* gnu/gcj/protocol/jar/Handler.java: New file.

	* gnu/gcj/protocol/jar/Connection.java: New file.

	* java/security/SecureClassLoader.java: New file.

	* java/lang/ClassLoader.java (parent): New variable.
	(ClassLoader (ClassLoader)): new constructor.
	(findClass): New method.
	(loadClass): Add default 1.2 implementation.
	(getSystemResourceAsBytes, getResourceAsBytes): Removed.
	(readfully): Removed.

	* gnu/gcj/runtime/VMClassLoader.java: Moved from java/lang.
	(findSystemClass): New method.
	(VMClassLoader): Constructor rewritten.
	(init): New method.
	All other methods removed.

	* java/lang/natClassLoader.cc: Change use of java::lang::VMClassLoader
	to gnu::gcj::runtime::VMClassLoader.
	(_Jv_InternClassStrings): Use _Jv_ResolvePoolEntry.  Also handle
	class entries.
	(VMClassLoader::findSystemClass): renamed from findBootClass.

	* Makefile.am: Add new files.
	(FirstThread.h, ThreadGroup.h): Add _Jv_Main friend.

	* Makefile.in: Rebuilt.

From-SVN: r28748
1999-08-18 14:16:42 +00:00
Tom Tromey 212f5d3026 natThread.cc (sleep): Turn 0 millis and 0 nanos into 1 nano.
* java/lang/natThread.cc (sleep): Turn 0 millis and 0 nanos into 1
	nano.
	* include/quick-threads.h (_Jv_CondWait): Don't round to 0
	inappropriately.

From-SVN: r28742
1999-08-18 03:48:37 +00:00
Tom Tromey 086920c39f configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Set DIVIDESPEC to empty string if compiler does
	not support -fuse-divide-subroutine.

From-SVN: r28727
1999-08-16 17:01:52 +00:00
Per Bothner efc3b511cb resolve.cc (_Jv_PrepareClass): Use ClassLoader::resolveClass0.
1999-08-14  Per Bothner  <per@bothner.com>

	* resolve.cc (_Jv_PrepareClass): Use ClassLoader::resolveClass0.
	* java/lang/natClass.cc (initializeClass): Likewise.
	* java/lang/ClassLoader.java (resolveClass0): New static method.
	(resolveClass): Call resolveClass0.
	(findSystemClass): No longer static.

From-SVN: r28711
1999-08-14 19:49:06 +00:00
Alexandre Oliva cb339d0278 javaprims.h (TRUE, FALSE): Redefine as themselves.
1999-08-12  Alexandre Oliva  <oliva@dcc.unicamp.br>

	* include/javaprims.h (TRUE, FALSE): Redefine as themselves.

From-SVN: r28689
1999-08-12 17:31:34 +00:00
Bryce McKinlay 48ff99d10d BitSet.java (set, [...]): specify "1" constant as long.
* java/util/BitSet.java (set, clear, hashCode): specify "1" constant
        as long.

From-SVN: r28680
1999-08-11 22:30:31 +01:00
Anthony Green 7941ceabf0 [multiple changes]
Mon Aug  9 18:33:38 1999  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

        * Makefile: Rebuilt.
	* Makefile.am (toolexeclibdir): Add $(MULTISUBDIR) even for native
	builds.

	* java/net/natPlainSocketImpl.cc: Include <sys/select.h> only if
	present.

	* configure: Rebuilt.
	* configure.in: Properly align --help output, fix capitalization
	and punctuation.
	* acinclude.m4: Likewise.

1999-08-09  Kresten Krab Thorup  <krab@gnu.org>

	* include/javaprims.h (_Jv_word, _Jv_word2): New types.

	* include/java-interp.h (_Jv_InterpMethodInvocation): Use _Jv_word.
	(_Jv_callInterpretedMethod): Unused. Remove.
	(_Jv_InterpMethod::run,run_normal,run_synch_object,run_synch_class):
	Use ffi_raw.
	* include/java-cpool.h (_Jv_get, _Jv_put): Remove.
	(_Jv_{store,load}{Indexes,Int,Float,Long,Double}): Use _Jv_word.
	* boehm.cc (_Jv_MarkObj): Use _Jv_word.
	* interpret.cc: use _Jv_word.
	* defineclass.cc: use_Jv_word.
	* resolve.cc: Use _Jv_word.
	(_Jv_ResolvePoolEntry): Return _Jv_word.
	* java/lang/Class.h (_Jv_Constants): Use _Jv_word for cpool.
	* java/lang/natClassLoader.cc (_Jv_InternClassStrings): Use _Jv_word.

	* interpret.cc (gnu::gcj::runtime::MethodInvocation::continue1):
	Change comment.

From-SVN: r28641
1999-08-10 05:32:23 +00:00
Rainer Orth 05ca950a64 configure.in (sched_yield): Try librt first, then libposix4.
Mon Aug  9 18:33:38 1999  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* configure.in (sched_yield): Try librt first, then libposix4.
	Add -lrt, -lposix4 to THREADSPEC.

From-SVN: r28629
1999-08-09 19:17:20 +00:00
Anthony Green cb35be5713 * gnu/gcj/util/path/SearchPath.java: Comment out verbose output.
From-SVN: r28608
1999-08-09 01:11:41 +00:00
Anthony Green e3253af520 defineclass.cc (_Jv_VerifyClassName): Verify array names correctly.
* defineclass.cc (_Jv_VerifyClassName): Verify array names
	correctly.

From-SVN: r28606
1999-08-09 00:25:51 +00:00
Anthony Green 58eb6e7cef [multiple changes]
1999-08-09  Anthony Green  <green@cygnus.com>

        * gij.cc: New file.

        * include/config.h.in: Rebuilt.
        * acconfig.h: Add INTERPRETER.

        * configure: Rebuilt.

        * Makefile.in: Rebuilt.
        * Makefile.am (libffi_files): Identify the libffi object files for
        inclusion in libgcj.
        (LIBFFIINCS): Define.

        * interpret.cc (gnu::gcj::runtime::MethodInvocation::continue1):
        Dummy definition for configurations without an interpreter.

        * java/net/natPlainSocketImpl.cc (getOption): Disamiguate call to
        java::lang::Boolean constructor.

        * include/java-interp.h: Always include java-cpool.h.

        * java/lang/natClassLoader.cc (getVMClassLoader0): Always return 0
        when INTERPRETER not defined.

        * java/lang/Class.h (finalize): Define.

        * gnu/gcj/util/path/DirectoryPathEntry.java (getURL): Catch
        IOException from File.getCanonicalPath.
        (getStream): Likewise.

        * NEWS: More news.
        * THANKS: More thanks.

1999-08-09  Kresten Krab Thorup  <krab@gnu.org>

        * resolve.cc (get_ffi_type_from_signature): Generate uint16 for
        jchar type.
        (_Jv_PrepareClass): Allow non-abstract classes to
        have abstract subclasses.
        (_Jv_ResolvePoolEntry): Revert subclass check for protected
        fields and methods.
        * interpret.cc (continue1/perform_invoke): Don't sign extend
        uint16 return val.
        (continue1/lshl,lshr): Push long, not int.
        (continue1/ulshr): Use UINT64, not long long.
        * defineclass.cc (handleFieldsEnd): Handle case when all fields
        are static.
        * java/lang/natClass.cc (forName): Add call to _Jv_InitClass.
        * java/lang/FirstThread.java (run): Add top-level exception
        handler.
        (run0): Renamed from run.

1999-08-08  Kresten Krab Thorup  <krab@gnu.org>

        * configure.in (--with-interpreter): Added.
        * include/config.h.in (INTERPRETER): Added.

        * java/lang/ClassLoader.java: File replaced.
        * java/lang/VMClassLoader.java: New file.
        * java/lang/natClassLoader.cc: New file.
        * gnu/gcj/runtime/MethodInvocation.java: New file.
        * gnu/gcj/util/path/SearchPath.java: New file.
        * gnu/gcj/util/path/PathEntry.java: New file.
        * gnu/gcj/util/path/DirectoryPathEntry.java: New file.
        * gnu/gcj/util/path/ZipPathEntry.java: New file.
        * gnu/gcj/util/path/URLPathEntry.java: New file.
        * gnu/gcj/util/path/CacheEntry.java: New file.
        * include/java-interp.h: New file.
        * include/java-cpool.h: New file.
        * include/java-insns.h: New file.
        * defineclass.cc: New file.
        * interpret.cc: New file.
        * resolve.cc: New file.

        * java/lang/natClass.cc (loaded_classes, _Jv_RegisterClass,
        _Jv_RegisterClasses, _Jv_FindClassInCache, _Jv_FindClass,
        _Jv_NewClass, _Jv_FindArrayClass): Moved to natClassLoader.cc.
        (finalize): New.
        (STATE_NOTHING, STATE_RESOLVED, STATE_IN_PROGRESS, STATE_DONE,
        STATE_ERROR): Moved to java/lang/Class.h and renamed with JV_
        prefix.
        (initializeClass): Use new JV_ prefixed names.  Also, call
        ClassLoader::resolveClass instead of _Jv_ResolveClass.

        * java/lang/Class.h (JV_STATE_PRELOADING, JV_STATE_LOADING,
        JV_STATE_LOADED, JV_STATE_COMPILED, JV_STATE_PREPARED,
        JV_STATE_LINKED): New.
        (_Jv_WaitForState, _Jv_RegisterInitiatingLoader,
        _Jv_UnregisterClass, _Jv_InternClassStrings): New friends.
        (_Jv_IsInterpretedClass, _Jv_InitField, _Jv_LookupDeclaredMethod,
        _Jv_DetermineVTableIndex, _Jv_ResolvePoolEntry, _Jv_PrepareClass,
        _Jv_ClassReader, _Jv_InterpClass, _Jv_InterpMethod,
        _Jv_InterpMethodInvocation): New friends for interpreter.
        (finalize): New.
        (CONSTANT_Class, CONSTANT_String, etc.): Moved to
        include/java-cpool.h and renamed with JV_ prefix.

        * include/jvm.h (_Jv_makeUtf8Const, _Jv_makeUtf8TypeConst): New
        decls.
        (_Jv_UnregisterClass): New decl.

        * java/lang/natClassLoader.cc (_Jv_FindArrayClass): Added
        class loader argument.
        (_Jv_FindClass): Use class loader.

        * prims.cc (_Jv_makeUtf8Const): New function.
        (_Jv_NewObjectArray): Change use of _Jv_FindArrayClass.
        (_Jv_NewPrimArray): Ditto.
        (_Jv_FindClassFromSignature): Ditto.
        * java/lang/reflect/natArray.cc (newInstance): Ditto.
        * java/lang/reflect/natMethod.cc (getType): Ditto.

        * include/java-field.h (_Jv_Field::isRef): Make robust for
        non-resolved contexts.

        * boehm.cc (_Jv_MarkObj): Mark interpreter-related fields.
        Also, don't mark class->next field.

        * java/lang/VirtualMachineError.java: Added FIXME note.

        * configure.in (INTERPSPEC): New spec.
        * libgcj.spec.in: Added INTERPSPEC.
        * Makefile.am: Added gcjh friends for java/lang/VMClassLoader and
        gnu/gcj/runtime/MethodInvocation.
        (libgcj_la_SOURCES): Added resolve.cc defineclass.cc interpret.cc.
        (ordinary_java_source_files): Added above mentioned java classes.

        * configure: Rebuilt.
        * Makefile.in: Rebuilt.

From-SVN: r28597
1999-08-08 14:06:23 +00:00
Tom Tromey 7339705d94 configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Look for sched_yield in -lrt.

From-SVN: r28554
1999-08-06 20:36:46 +00:00
Mojo Jojo 3a6bdebaa0 Locale.java (CHINESE, [...]): New locales.
1999-08-06  Mojo Jojo <mojojojo@pacbell.net>

	* java/util/Locale.java, CHINESE, ENGLISH, FRENCH, GERMAN,
	ITALIAN, JAPANESE, KOREAN, CANADA_FRENCH, GERMANY, ITALY, KOREA,
	SIMPLIFIED_CHINESE, TRADITIONAL_CHINESE, PRC, TAIWAN, CHINA): New
	locales.
	(toString): Print correctly when `country' is empty.

From-SVN: r28548
1999-08-06 08:38:50 +00:00
Per Bothner 67a6001825 configure.in: Also do AC_SUBST for DIVIDESPEC.
1999-08-04  Per Bothner <per@bothner.com>

	* configure.in:  Also do AC_SUBST for DIVIDESPEC.

From-SVN: r28520
1999-08-05 05:21:44 +00:00
Tom Tromey 5b9bbb3917 aclocal.m4, configure: Rebuilt for new libtool.
* aclocal.m4, configure: Rebuilt for new libtool.

[[Split portion of a mixed commit.]]

From-SVN: r28435.2
1999-08-03 03:07:04 +00:00
Bryce McKinlay 120abe3202 natFile.cc (performMkdir): Remove FIXME.
* java/io/natFile.cc (performMkdir): Remove FIXME.
        * java/io/natFileDescriptorPosix.cc (open): Use 0644 file mode.

From-SVN: r28430
1999-08-03 01:32:14 +01: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
Bryce McKinlay a0e4da0d17 boehm.cc (_Jv_RegisterFinalizer): Cast eth' to GC_PTR.
eth'

        * boehm.cc (_Jv_RegisterFinalizer): Cast 
eth' to GC_PTR.
        * exception.cc (_Jv_Throw): Cast _Jv_type_matcher' to __eh_matcher.

From-SVN: r28428
1999-08-03 01:23:03 +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
Tom Tromey db936a7cbd NEWS: Likewise.
* NEWS: Likewise.
	* THANKS: New file.

From-SVN: r28371
1999-08-01 04:04:04 +00:00
Alexandre Oliva 34c5c0e18c configure.in: Check for struct hostent_data and need for -D_REENTRANT for gethostbyname_r...
1999-07-31  Alexandre Oliva  <oliva@dcc.unicamp.br>

	* configure.in: Check for struct hostent_data and need for
	-D_REENTRANT for gethostbyname_r declaration.
	* java/net/natInetAddress.cc: Define _REENTRANT if needed.
	(lookup): Use hostent_data for fixed_buffer.
	* configure, include/config.h.in: Rebuilt.

From-SVN: r28369
1999-08-01 00:14:32 +00:00
Alexandre Oliva 138607df84 natSystem.cc (arraycopy): Use bcopy if memmove is not available.
1999-07-31  Alexandre Oliva  <oliva@dcc.unicamp.br>

	* java/lang/natSystem.cc (arraycopy): Use bcopy if memmove is not
	available.  Don't cast memmove args to (void*).
	* configure.in: Do not abort if memmove is not available.

From-SVN: r28360
1999-07-31 23:41:15 +00:00
Bryce McKinlay 41296e2a23 natString.cc (substring): optimize where substring is entire String.
1999-07-22  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/natString.cc (substring): optimize where substring is
	entire String.
	* java/io/File.java (getName): don't return separator with file name.
	* java/io/natFile.cc (attr): fix overflow.

From-SVN: r28246
1999-07-26 03:51:44 +01:00
Anthony Green a08b508225 * mauve-libgcj: Disable Object Serialization tests.
From-SVN: r28235
1999-07-25 08:48:25 +00:00
Warren Levy 33551dfec5 DatagramSocket.java (DatagramSocket(int, InetAddress)): Default to using PlainDatagramSocketImpl.
* java/net/DatagramSocket.java (DatagramSocket(int, InetAddress)):
	Default to using PlainDatagramSocketImpl.
	* java/net/PlainDatagramSocketImpl.java (close): Catch IOException.

From-SVN: r28195
1999-07-20 20:30:42 +00:00
Tom Tromey 9608c09195 * include/stamp-h.in: New file.
From-SVN: r28171
1999-07-19 18:03:31 +00:00
Tom Tromey d4a8b6a2f3 mprec.h: Protect definition of uint32_t with #ifndef _UINT32_T.
* java/lang/mprec.h: Protect definition of uint32_t with #ifndef
	_UINT32_T.

From-SVN: r28065
1999-07-12 09:40:07 +00:00
Andrew Haley 44a6ce434c i386-signal.h (MAKE_THROW_FRAME): Advance EIP by two bytes to make it point after the instruction where the trap...
1999-07-07  Andrew Haley  <aph@cygnus.com>
        * include/i386-signal.h (MAKE_THROW_FRAME): Advance EIP by two
	bytes to make it point after the instruction where the trap
	occurred.
	(HANDLE_DIVIDE_OVERFLOW): Ditto.

From-SVN: r27994
1999-07-07 09:50:46 +00:00
Tom Tromey fd05b13d19 mauve-libgcj: Explicitly enable formerly disabled java.text tests.
* mauve-libgcj: Explicitly enable formerly disabled java.text
	tests.

From-SVN: r27992
1999-07-07 09:30:46 +00:00
Tom Tromey c7f0f62848 mauve-libgcj: Turn off ClassTest test.
* mauve-libgcj: Turn off ClassTest test.  Enable java.text tests
	again.

From-SVN: r27990
1999-07-07 09:12:30 +00:00
Anthony Green c704c83cbd URL.java (equals): Compare strings using String.equals.
* java/net/URL.java (equals): Compare strings using String.equals.
	* java/net/URL.java (sameFile): Ditto.

From-SVN: r27947
1999-07-05 13:35:21 +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
Bryce McKinlay 659c26fc49 String.java (toString): Check for this == null and throw NullPointerException.
1999-07-01  Bryce McKinlay  <bryce@albatross.co.nz>
        * java/lang/String.java (toString): Check for this == null and throw
        NullPointerException.

From-SVN: r27895
1999-07-01 20:58:04 +01:00
Warren Levy cb1902adbf [multiple changes]
1999-07-01  Warren Levy  <warrenl@cygnus.com>
	* gnu/gcj/convert/BytesToUnicode.java (read): Changed outlength
	to count and revised comments to match.
	* gnu/gcj/convert/Input_EUCJIS.java (read): Same as Input_8859_1.java.
	* gnu/gcj/convert/Input_JavaSrc.java (read): ditto.
	* gnu/gcj/convert/Input_SJIS.java (read): ditto.
	* gnu/gcj/convert/Input_UTF8.java (read): ditto.
	* gnu/gcj/convert/natInput_EUCJIS.cc (read): ditto.
	* gnu/gcj/convert/natInput_SJIS.cc (read): ditto.
1999-07-01  John-Marc Chandonia  <jmc@cmpharm.ucsf.edu>
	* gnu/gcj/convert/Input_8859_1.java (read): Use 3rd parameter
	properly as count rather than outlength.
	* java/io/BufferedOutputStream.java (write(byte[],int,int): Flush
	output on overflow rather than buffer fill.
	* java/io/BufferedReader.java (fill): Don't clear out the buffer
	if markPos is 0 and there is still room in the buffer.

From-SVN: r27892
1999-07-01 17:01:00 +00:00
Andrew Haley 0d072f2298 i386-signal.h: Replace sigaction () with __sigaction ().
1999-07-01  Andrew Haley  <aph@cygnus.com>
	* include/i386-signal.h: Replace sigaction () with __sigaction ().
	This is a workaround for a bug in glibc's pthreads package which
	doesn't deliver any sigcontext information to a signal handler.

From-SVN: r27876
1999-07-01 10:30:58 +00:00
Tom Tromey 2dc130a72e [multiple changes]
1999-06-24  Tom Tromey  <tromey@cygnus.com>
	* java/lang/e_asin.c: Don't use __int32_t or __uint32_t.
	* java/lang/fdlibm.h (HUGE): Conditionally define.
Fri May 28 22:20:03 1999  Anthony Green  <green@cygnus.com>
	* java/lang/fdlibm.h: Don't use __uint32_t.  Include mprec.h.
	* java/lang/e_log.c: Don't use __uint32_t.

From-SVN: r27733
1999-06-24 20:41:47 +00:00
Tom Tromey 0d16618c58 [multiple changes]
Fri May 28 22:20:03 1999  Anthony Green  <green@cygnus.com>
	* java/lang/fdlibm.h: Don't use __uint32_t.  Include mprec.h.
	* java/lang/e_log.c: Don't use __uint32_t.
1999-05-27  Eric Christopher <echristo@cygnus.com>
	* configure: Rebuilt
	* configure.in: Fixed ISO C9X and namespace collision with __uint32_t
	* acconfig.h: Rebuilt
	* include/config.h.in: Rebuilt
	* java/lang/mprec.h, java/lang/e_acos.c, java/lang/e_asin.c,
 	java/lang/e_atan2.c, java/lang/e_exp.c, java/lang/e_fmod.c,
 	e_log.c, java/lang/e_pow.c, java/lang/e_rem_pio2.c,
 	java/lang/e_remainder.c, java/lang/e_sqrt.c, java/lang/fdlibm.h,
 	k_tan.c, java/lang/mprec.h, java/lang/s_atan.c,
 	java/lang/s_ceil.c, java/lang/s_copysign.c, java/lang/s_fabs.c,
 	s_floor.c, java/lang/s_rint.c, java/lang/sf_rint.c: Fixed ISO C9X
 	and namespace collision with __uint32_t

From-SVN: r27729
1999-06-24 20:06:09 +00:00
Tom Tromey 34043bd2e9 InflaterInputStream.java (read): Throw ZipException if inflater throws a DataFormatException.
* java/util/zip/InflaterInputStream.java (read): Throw
	ZipException if inflater throws a DataFormatException.

From-SVN: r27719
1999-06-23 14:57:14 +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
Tom Tromey e8d49b5b5e ieeefp.h (__IEEE_LITTLE_ENDIAN): Define for alpha.
* java/lang/ieeefp.h (__IEEE_LITTLE_ENDIAN): Define for alpha.
	From Jeff Sturm.

From-SVN: r27671
1999-06-21 15:42:12 +00:00
Tom Tromey b48ed5683a Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (toolexeclibdir): Define as libdir when
	appropriate.
	* configure: Rebuilt.
	* configure.in (USE_LIBDIR): New conditional.

From-SVN: r27667
1999-06-21 13:03:47 +00:00
Bryce McKinlay e0cb3930ca natInetAddress.cc (lookup): Preserve caller-supplied hostname in returned InetAddress objects.
* java/net/natInetAddress.cc (lookup): Preserve caller-supplied
        hostname in returned InetAddress objects.
        (getLocalHostname): Fix typo.
        * java/net/InetAddress.java (getByName): Set hostname on return
        object.
        (getLocalHost): Call lookup directly to ensure that a fully-qualified
        name is returned.

From-SVN: r27587
1999-06-18 02:17:28 +01: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
Bryce McKinlay cb81310a55 FilterOutputStream.java (write(byte[])): Rewrite according to JDK 1.2 docs.
* java/io/FilterOutputStream.java (write(byte[])): Rewrite according
        to JDK 1.2 docs.
        (write(byte[],int,int)): ditto.

From-SVN: r27537
1999-06-15 21:05:57 +01:00
Bryce McKinlay 00af55a292 * posix-threads.cc (_Jv_CondWait): Fix currentTimeMillis() overflow.
From-SVN: r27524
1999-06-14 18:20:35 +01:00
Warren Levy 2fdf4c3e97 * mauve-libgcj: Activated java.net Mauve tests.
From-SVN: r27487
1999-06-11 02:34:31 +00:00
Bryce McKinlay 53dfe2970a natInetAddress.cc (aton): Fix typos.
* java/net/natInetAddress.cc (aton): Fix typos.
        (lookup): Use a bigger buffer size for gethostbyname_r on all
        versions of glibc. Updated FIXME comment explaining this.
        Modified while loops to not set herr = ERANGE to work around glibc
        problems. Use user specified hostname in InetAddress result when
        available (consistent with JDK).

From-SVN: r27484
1999-06-11 02:38:08 +01:00
Warren Levy daf469e2ba DecimalFormat.java: Throw IllegalArgumentException throughout rather than ParseException.
* java/text/DecimalFormat.java: Throw IllegalArgumentException
	throughout rather than ParseException.

From-SVN: r27481
1999-06-10 23:53:37 +00:00
Warren Levy a21f23fc67 FileDescriptor.java (FileDescriptor(String, int)): Throw FileNotFoundException instead of IOException.
1999-06-10  Warren Levy  <warrenl@cygnus.com>
	* java/io/FileDescriptor.java (FileDescriptor(String, int)):
	Throw FileNotFoundException instead of IOException.
	(open): ditto.
	* java/io/FileInputStream.java (FileInputStream): Doesn't throw
	IOException.
	* java/text/Collator.java (CANONICAL_DECOMPOSITION): Fixed typo
	in static field name.

From-SVN: r27473
1999-06-10 18:52:00 +00:00
Bryce McKinlay 1e45a14105 Runtime.java (exec): Convert prog name and arguments to string array.
* java/lang/Runtime.java (exec): Convert prog name and arguments
	to string array.
	* java/lang/natPosixProcess.cc (startProcess): Fix typo in
	environment array conversion. Preserve current environment if envp
	not passed. Preserve PATH unless explicitly specified.
	* java/io/DataInputStream.java (readLine): Fix case where '\r' is
	followed by EOF. Set a flag when a line is terminated by '\r' and
	ignore following '\n' if set.

From-SVN: r27458
1999-06-09 18:42:26 +01:00
Warren Levy a259a24846 [multiple changes]
1999-06-02  Warren Levy  <warrenl@cygnus.com>
	* java/net/URL.java (URL(URL,String)): Initialize port to -1.
	Ignore context if spec is an absolute URL.  Fix braindead
	string comparison.
	(hashCode): Use JDK 1.2 style algorithm.
	* java/net/URLStreamHandler.java (parseURL): Reimplement to handle
	context URL properly.
1999-05-30  Anthony Green  <green@cygnus.com>
	* java/net/URLStreamHandler.java (parseURL): Parse relative URLs
	correctly.  Clean up "/../" and "/./" path fragments.

From-SVN: r27334
1999-06-03 22:29:12 +00: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
Tom Tromey a81eb01077 ResourceBundle.java (getBundle): Throw NullPointerException if baseName is null.
* java/util/ResourceBundle.java (getBundle): Throw
	NullPointerException if baseName is null.

From-SVN: r27126
1999-05-24 15:00:02 +00:00
Tom Tromey 93d627acaa ZipInputStream.java (fill): New method.
* java/util/zip/ZipInputStream.java (fill): New method.
	(compressed_len): New instance variable.
	(getNextStream): Set it.
	(read): Reset inflater on EOF.  Only read via `super' if entry is
	deflated.
	(skip): Only skip via `super' if entry is deflated.
	* java/util/zip/Deflater.java (last_input_count): Removed.
	* java/util/zip/natDeflater.cc (deflate): Return 0 if input array
	is length 0.
	(needsInput): Don't use last_input_count.
	(setInput): Don't set last_input_count.
	* java/util/zip/natInflater.cc (getRemaining): Return correct
	result.
	(inflate): Return 0 if input array is length 0.
	(setInput): Don't set last_input_count.
	* java/util/zip/Inflater.java (last_input_count): Removed.

From-SVN: r27105
1999-05-22 18:08:46 +00:00
Tom Tromey 41e0e0cdbb Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (INCLUDES): Added $(ZINCS).
	* configure: Rebuilt.
	* configure.in (ZINCS): New subst.

From-SVN: r27083
1999-05-21 13:09:54 +00:00
Andrew Haley 21635bd688 sparc-signal.h (INIT_FPE, INIT_SEGV): SA_NODEFER added to signal options to allow the same exceptions to be rethrown...
1999-05-21  Andrew Haley  <aph@cygnus.com>
        * include/sparc-signal.h (INIT_FPE, INIT_SEGV): SA_NODEFER added
        to signal options to allow the same exceptions to be rethrown
        later.

From-SVN: r27079
1999-05-21 06:03:30 +00:00
Andrew Haley 554b61bb30 prims.cc (catch_fpe): Call to HANDLE_DIVIDE_OVERFLOW added.
1999-05-20  Andrew Haley  <aph@cygnus.com>
        * libjava/prims.cc (catch_fpe): Call to HANDLE_DIVIDE_OVERFLOW
        added.
        * include/i386-signal.h (HANDLE_DIVIDE_OVERFLOW): New macro.
        (INIT_FPE): Exception string made more informative.
        * include/sparc-signal.h (INIT_FPE): Exception string made more
        informative.
        * testsuite/libjava.lang/Divide_1.java: New file.
        * testsuite/libjava.lang/Divide_1.out: New file.

From-SVN: r27056
1999-05-20 08:26:55 +00:00
Tom Tromey 550c249201 aclocal.m4, configure: Rebuilt.
* aclocal.m4, configure: Rebuilt.
	* acinclude.m4 (version): New variable; pass to AM_INIT_AUTOMAKE.

From-SVN: r27033
1999-05-19 12:55:15 +00:00
Tom Tromey 2d40265fda GZIPOutputStream.java (write(byte[])): New method.
* java/util/zip/GZIPOutputStream.java (write(byte[])): New
	method.

From-SVN: r27031
1999-05-19 12:35:06 +00:00
Tom Tromey 6ada3468d8 natInflater.cc (inflate): Cast `len' to unsigned.
* java/util/zip/natInflater.cc (inflate): Cast `len' to unsigned.
	Include <stdlib.h>.
	* java/util/zip/natDeflater.cc (deflate): Cast `len' to unsigned.
	Include <stdlib.h>.
	(update): Fail in default case.  Always initialize `strat'.

From-SVN: r27028
1999-05-19 11:03:36 +00:00
Tom Tromey 3f969ec092 * mauve-libgcj: Enable java.util.zip.
From-SVN: r27025
1999-05-19 09:26:17 +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
Tom Tromey 0ffac8322f ZipOutputStream.java (level): Initial value is Deflater.DEFAULT_COMPRESSION.
* java/util/zip/ZipOutputStream.java (level): Initial value is
	Deflater.DEFAULT_COMPRESSION.
	(close): New method.
	(closeEntry): Likewise.
	(finish): Likewise.
	(put_version): Likewise.
	(write_entry): Likewise.
	(put2, put4): Now return `int'.
	(comment): Default to empty string.
	(bytes_written): New instance variable.
	(chain): Likewise.
	* java/util/zip/ZipEntry.java (setComment): Limit length of
	comment string.
	(setCrc): Check CRC validity.
	(setExtra): Check argument validity.
	(setMethod): Likewise.
	(setSize): Likewise.
	(ZipEntry): Likewise.
	* include/javaprims.h: Updated namespace declarations.
	* Makefile.in: Rebuilt.
	* Makefile.am (ordinary_java_source_files): Mention new files.
	(nat_source_files): Likewise.
	* java/util/zip/ZipFile.java (readu2): Throw ZipException, not
	EOFException.
	(read4): Likewise.
	(getInputStream): Handle compressed entries.
	* java/util/zip/GZIPOutputStream.java: New file.
	* java/util/zip/GZIPInputStream.java: New file.
	* java/util/zip/DataFormatException.java: New file.
	* java/util/zip/CheckedInputStream.java: New file.
	* java/util/zip/CheckedOutputStream.java: New file.
	* java/util/zip/InflaterInputStream.java: Implemented.
	* java/util/zip/natInflater.cc: New file.
	* java/util/zip/Deflater.java: Implemented.
	* java/util/zip/natDeflater.cc: New file.
	* java/util/zip/DeflaterOutputStream.java: Implemented.
	* java/util/zip/ZipInputStream.java (closeZipEntry): Throw
	ZipException, not IOException.
	* java/util/zip/ZipFile.java (readDirectory): Throw ZipException,
	not IOException.

From-SVN: r26996
1999-05-18 15:33:03 +00:00
Tom Tromey a1b7f572ce natSystem.cc (init_properties): URL now points to sourceware.
* java/lang/natSystem.cc (init_properties): URL now points to
	sourceware.

From-SVN: r26974
1999-05-17 13:24:59 +00:00
Per Bothner 68ca6de40d Calendar.java (set): First call computeFields if needed.
d
	* java/util/Calendar.java (set):  First call computeFields if needed.
	* java/util/natGregorianCalendar.cc (computeTime):  Cast 1000 to jlong.

From-SVN: r26909
1999-05-12 11:01:29 -07:00
Tom Tromey 4b7f154fb2 configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Look for -ldl when using the Boehm collector.
	Look for sched_yield in -lposix4.

From-SVN: r26905
1999-05-12 16:22:58 +00:00
Per Bothner c41dc2ffe9 File.java (mkdirs): Handle a null parent directory.
�
	* java/io/File.java (mkdirs):  Handle a null parent directory.

From-SVN: r26902
1999-05-12 07:41:16 -07:00
Tom Tromey 42962a480a javaprims.h: Updated namespace declarations.
* include/javaprims.h: Updated namespace declarations.
	* classes.pl (scan): Uniquify class list.
	* Makefile.in, configure: Rebuilt.
	* Makefile.am (nat_source_files): Added natConcreteProcess.cc.
	(built_java_source_files): New macro.
	(nat_headers): Added built_java_source_files.
	(javao_files): Likewise.
	(EXTRA_libgcj_la_SOURCES): Likewise.
	(libgcj.zip): Create built class files.
	($(built_java_source_files:.java=.class)): New target.
	(jv_convert_LDADD): Added -L$(here)/.libs.
	* configure.in: Create links for ConcreteProcess.java and
	natConcreteProcess.cc.
	* java/lang/Runtime.java (exec): Create a ConcreteProcess.
	* java/lang/natEcosProcess.cc: New file.
	* java/lang/EcosProcess.java: New file.
	* java/lang/PosixProcess.java: New file.
	* java/lang/natPosixProcess.cc: New file.

From-SVN: r26901
1999-05-12 11:23:44 +00:00
Warren Levy 7d9a55eb5b PlainSocketImpl.java: Corrected copyright & header comments.
* java/net/PlainSocketImpl.java: Corrected copyright & header comments.
	* java/net/SocketImpl.java: Added marker for JDK 1.2 work.
	* java/net/natPlainSocketImpl.cc (bind): Throw BindException.
	(connect): Throw ConnectException.

From-SVN: r26896
1999-05-12 01:51:23 +00:00
Tom Tromey 81d4a0726c Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (jv_convert_DEPENDENCIES): Include libgcj.spec.
	* libgcj.spec.in: Don't use `+'.  Instead, put old lib spec after
	our libraries.

From-SVN: r26889
1999-05-11 13:03:47 +00:00
Tom Tromey fc9527b301 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (jv_convert_LDADD): Removed `-L.'; it is not needed
	and it causes problems with libtool.

From-SVN: r26886
1999-05-11 12:33:49 +00:00
Tom Tromey f994389bf8 Makefile.in, configure: Rebuilt.
* Makefile.in, configure: Rebuilt.
	* Makefile.am (jv_convert_LDFLAGS): Removed -nodefaultlibs.
	(jv_convert_LDADD): Added ZLIBS.  Removed -lm, -lc, -lgcc.
	(jv_convert_DEPENDENCIES): Added ZDEPS.
	* configure.in (GCSPEC): Added `-L' to point to boehm-gc build
	directory.
	(THREADSPEC): Added `-L' to point to qthreads build directory.
	(ZLIBS): New subst.
	(ZDEPS): New subst.
	* configure, Makefile.in: Rebuilt.
	* Makefile.am (toolexeclib_DATA): New macro.
	* configure.in: Create libgcj.spec.  Look for -lsocket and -lnsl.
	Recognize --with-system-zlib.
	(GCSPEC): New subst.
	(THREADSPEC): New subst.
	(SYSTEMSPEC): New subst.
	(ZLIBSPEC): New subst.
	* libgcj.spec.in: New file.

From-SVN: r26885
1999-05-11 12:11:09 +00:00
Tom Tromey 9733e4ee31 InputStreamReader.java (read): If length is 0, return 0.
* java/io/InputStreamReader.java (read): If length is 0, return
	0.  Reset `wpos' and `wcount' when buffer has been filled and
	emptied.
	* java/util/Properties.java (save): Removed `FIXME' comment.
	(load): Invalid characters in \u now treated as terminators.
	Make sure to append character resulting from `\' handling.
	Cast to `char' when appending to key or value.
	(skip_ws): Inverted test for whitespace.

From-SVN: r26862
1999-05-10 12:33:07 +00:00
Tom Tromey f2646f9c9a RandomAccessFile.java (RandomAccessFile): Removed `FIXME' comment.
* java/io/RandomAccessFile.java (RandomAccessFile): Removed
	`FIXME' comment.
	(readLine): Likewise.
	(readFully): Implemented.

From-SVN: r26859
1999-05-10 10:37:16 +00:00
Tom Tromey a619dc1e20 * java/lang/natObject.cc (sync_init): Use _Jv_AllocBytesChecked.
From-SVN: r26858
1999-05-10 09:28:54 +00:00
Tom Tromey d5dde5342a natToolkit.cc: Added copyright header.
* java/awt/natToolkit.cc: Added copyright header.
	* java/util/zip/InflaterInputStream.java: Added copyright header.
	* java/io/FilterWriter.java (FilterWriter): Removed `FIXME'
	comment.
	* java/io/SequenceInputStream.java (SequenceInputStream): Removed
	`FIXME' comment.
	(getNextStream): Likewise.

From-SVN: r26857
1999-05-10 09:23:41 +00:00
Tom Tromey 2b607265f5 ResourceBundle.java (partialGetBundle): Explicitly use locale.toString().
* java/util/ResourceBundle.java (partialGetBundle): Explicitly use
	locale.toString().
	(getBundle): Don't explicitly throw null pointer exception.

From-SVN: r26856
1999-05-10 08:58:54 +00:00
Tom Tromey a31b081d11 RawData.java: Added copyright header.
* gnu/gcj/RawData.java: Added copyright header.
	* include/jni.h (_Jv_va_list): Always define as va_list.

From-SVN: r26855
1999-05-10 08:42:28 +00:00
Anthony Green e3884aeea7 DateFormat.java (computeInstance): Separate time and date styles.
* java/text/DateFormat.java (computeInstance): Separate time
	and date styles.
	(getDateTimeInstance): Ditto.
	(getDateTimeInstance(int,int)): New method.
        * Makefile.in: Rebuilt.
	* Makefile.am (ordinary_java_source_files): Add new classes.
	* java/util/PropertyResourceBundle.java: New file.
	* gnu/gcj/util/EnumerationChain.java: New file.

From-SVN: r26842
1999-05-08 22:21:50 +00:00
Tom Tromey 01b02b11de acconfig.h (GCJVERSION): New undef.
* acconfig.h (GCJVERSION): New undef.
	* java/lang/natSystem.cc (init_properties): Define java.version,
	java.class.version, os.name, os.arch, os.version.
	Include <sys/utsname.h> if required.
	* configure: Rebuilt.
	* configure.in: Compute and define GCJVERSION.
	* java/lang/natSystem.cc (default_file_encoding): Now static.

From-SVN: r26830
1999-05-07 18:44:38 +00:00
Tom Tromey c59c5e9a65 * java/lang/natCharacter.cc (isLowerCase): Use a binary search.
From-SVN: r26829
1999-05-07 17:39:52 +00:00
Tom Tromey a06fcbd464 libtool-version: New file.
* libtool-version: New file.
	* Makefile.in: Rebuilt.
	* Makefile.am (libgcj_la_LDFLAGS): Use -version-info, not
	-release.

From-SVN: r26828
1999-05-07 17:00:51 +00:00
Tom Tromey 109257e923 mauve-libgcj: Don't omit Utf8Encoding or StringTest.
* mauve-libgcj: Don't omit Utf8Encoding or StringTest.
	Comment out FieldPosition, ParsePosition, and SimpleDateFormat
	again (oops).

From-SVN: r26827
1999-05-07 16:41:11 +00:00
Tom Tromey 1040ca3d1f mauve-libgcj: Test more from java.text.
* mauve-libgcj: Test more from java.text.  Don't mention 1.1 tests
	(we pick those up already).

From-SVN: r26826
1999-05-07 16:20:48 +00:00
Per Bothner 775de5478c Update
From-SVN: r26798
1999-05-05 17:27:18 -07:00
Tom Tromey 9096b279c2 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (CLEANFILES): Don't mention $(class_files).
	(clean-local): New target
	* java/lang/natRuntime.cc: Include <ltdl.h> if required.
	(load, loadLibrary): Now native.
	(init): New method.
	* java/lang/Runtime.java (load, loadLibrary): Now native.
	(init): New native method.
	(Runtime): Use init.
	* prims.cc: Include <ltdl.h> if required.
	(JvRunMain): Call LTDL_SET_PRELOADED_SYMBOLS.

From-SVN: r26785
1999-05-05 14:19:24 +00:00
Gilles Zunino 395e3bf94c configure.in: Switch from irix threads to posix threads
1999-05-05  Gilles Zunino  <Gilles.Zunino@hei.fr>
	* configure.in: Switch from irix threads to posix threads
	* configure: Regenerate.

From-SVN: r26781
1999-05-05 11:52:03 +00:00
Tom Tromey d8f8e9ba17 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (jv_convert_LDADD): Added -lgcc.

From-SVN: r26709
1999-04-30 13:12:06 +00:00
Tom Tromey a0e894a8cc StringBuffer.java (ensureCapacity): Don't resize vector when shared.
* java/lang/StringBuffer.java (ensureCapacity): Don't resize
	vector when shared.
	* java/util/Locale.java (Locale(String,String)): Implement in
	terms of 3-argument version; variant now defaults to empty
	string.
	(toString): Assume variant is not null.
	(equals): Assume all strings are not null.
	(Locale): Throw NullPointerException if any argument is null.
	* java/util/ResourceBundle.java (getBundle): Don't try the base
	name; now implicit in partialGetBundle call.
	(trySomeGetBundle): Search for parent bundles and call setParent
	as required.
	(partialGetBundle): Added `langStop' argument.  Use
	`Locale.toString' to compute bundleName.
	(resource_cache): New static field.
	(partialGetBundle): Cache the returned resource bundle.  Now
	synchronized.
	* gnu/gcj/text/LocaleData_en.java (contents): [collatorRule] Added
	missing `<'.
	* mauve-libgcj: Enable Collator and RuleBasedCollator.
	* java/text/natCollator.cc (decomposeCharacter): `base' now
	`const'.
	* Makefile.in: Rebuilt.
	* Makefile.am (ordinary_java_source_files): Added
	CollationElementIterator, CollationKey, Collator,
	RuleBasedCollator.
	(nat_source_files): Added natCollator.cc.
	* java/text/RuleBasedCollator.java (ceiNext): No longer static.
	(compare): Pass `this' to CollationElementIterator constructor.
	(getCollationElementIterator): Likewise.
	(ceiNext): Fix off-by-one error when finding initial substring.
	(next): Correctly mask off bits when computing return value.
	Fixed return values when one string is shorter than the other.
	* java/text/CollationElementIterator.java (collator): New field.
	(CollationElementIterator): Added collator argument.
	(next): Call ceiNext on collator object.

From-SVN: r26707
1999-04-30 09:31:00 +00:00
Tom Tromey 6c26973039 * natCollator.cc: New file.
From-SVN: r26655
1999-04-26 15:42:52 +00:00
Tom Tromey 3cc2608144 GregorianCalendar.java (setDefaultTime): New method.
* java/util/GregorianCalendar.java (setDefaultTime): New method.
	(GregorianCalendar): Use it in all constructors.
	* java/util/Calendar.java (Calendar): Changed argument name to
	`zone' to match code.
	* gnu/gcj/text/LocaleData_en.java: Added collatorRule element.
	* java/text/CollationKey.java: New file.
	* java/text/CollationElementIterator.java: New file.
	* java/text/Collator.java: New file.
	* java/text/RuleBasedCollator.java: New file.

From-SVN: r26654
1999-04-26 15:34:44 +00:00
Tom Tromey d5d9a8b6c3 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (jv_convert_LDFLAGS): Added -nodefaultlibs.
	(jv_convert_LDADD): Explicltly add -lm -lc.

From-SVN: r26653
1999-04-26 15:12:21 +00:00
Tom Tromey a3ffcff3e3 libtoolized libgcj. See ChangeLog for details.
From-SVN: r26652
1999-04-26 14:50:15 +00:00
Warren Levy 12571b1f96 Makefile.am: Added URLDecoder and URLEncoder.
* Makefile.am: Added URLDecoder and URLEncoder.
	* Makefile.in: Rebuilt.
	* java/net/ServerSocket.java (setSocketFactory): Renamed from
	setSocketImplFactory to match spec.
	* java/net/Socket.java (getSoLinger): Changed return type to
	match spec.
	* java/net/URLDecoder.java: New file.
	* java/net/URLEncoder.java: New file.

From-SVN: r26605
1999-04-23 16:36:22 +00:00
Tom Tromey baa288f308 natString.cc (getBytes): Reverted earlier change and applied correct fix from Per Bothner.
* java/lang/natString.cc (getBytes): Reverted earlier change and
	applied correct fix from Per Bothner.

From-SVN: r26579
1999-04-21 13:50:39 +00:00
Tom Tromey 9d9cf1661d String.java: Don't throw UnsupportedEncodingException.
* java/lang/String.java: Don't throw
	UnsupportedEncodingException.

From-SVN: r26577
1999-04-21 12:12:39 +00:00
Tom Tromey 47e2610954 natString.cc (getBytes): Correctly size result buffer.
* java/lang/natString.cc (getBytes): Correctly size result
	buffer.  From Bryce McKinlay <bryce@albatross.co.nz>.

From-SVN: r26575
1999-04-21 11:49:39 +00:00
Andrew Haley 01f78a025e sparc-signal.h: new file.
1999-04-20  Andrew Haley  <aph@cygnus.com>
        * include/sparc-signal.h: new file.
        * configure.in: include/sparc-signal.h added.
        * configure: regenerated.
        * prims.cc (JvRunMain): signal handling code rewritten to be more
        portable.
        (catch_segv): ditto.
        (catch_fpe): ditto.
        * include/i386-signal.h: reorganized.
        * include/default-signal.h: reorganized.

From-SVN: r26560
1999-04-20 06:27:11 +00:00
Tom Tromey 3d79e10b31 natSystem.cc (init_properties): Only declare pwd_entry once.
* java/lang/natSystem.cc (init_properties): Only declare pwd_entry
	once.  From Anthony Green.

From-SVN: r26545
1999-04-19 09:43:18 +00:00
Andrew Haley 80e93e9adf Makefile.in: Processed with new automake.
1999-04-19  Andrew Haley  <aph@cygnus.com>
        * Makefile.in: Processed with new automake.

From-SVN: r26544
1999-04-19 07:57:04 +00:00
Tom Tromey 0cf347a3a7 * include/javaprims.h: Removed security namespace.
From-SVN: r26543
1999-04-19 07:48:02 +00:00
Anthony Green 08a0a89b86 * java/io/PrintStream.java (println): Remove extra println.
From-SVN: r26541
1999-04-18 22:22:44 +00:00
Anthony Green fac6189871 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (ordinary_java_source_files): Add new security files.
	* java/security/NoSuchAlgorithmException.java,
	java/security/MessageDigest.java: New files.
	* include/javaprims.h: Add security namespace.

From-SVN: r26536
1999-04-18 08:24:30 +00:00
Per Bothner bf69fb7efc Note char-conversion-related optimizations.
From-SVN: r26510
1999-04-16 11:41:12 -07:00
Per Bothner 714091c605 Makefile.am: Various changes for new files and conversions.
�
	* Makefile.am:  Various changes for new files and conversions.

From-SVN: r26505
1999-04-16 10:31:26 -07:00
Warren Levy d825fa8795 Makefile.am (ordinary_java_source_files): Added new Connection and Handler classes in gnu.gcj.protocol.file package.
* Makefile.am (ordinary_java_source_files): Added new Connection
	and Handler classes in gnu.gcj.protocol.file package.
	* Makefile.in: Rebuilt.
	* gnu/gcj/protocol/file/Connection.java: New file.
	* gnu/gcj/protocol/file/Handler.java: New file.
	* gnu/gcj/protocol/http/Connection.java (getInputStream): Check
	if doInput allows input.
	(getOutputStream): Check if doOutput allows output.
	* java/net/URLStreamHandler.java (parseURL): Fix indentation.

From-SVN: r26479
1999-04-15 21:33:39 +00:00
Tom Tromey 9ce392afc1 natInetAddress.cc (lookup): On glibc2.0 systems, make buffer larger to work around bug.
* java/net/natInetAddress.cc (lookup): On glibc2.0 systems, make
	buffer larger to work around bug.
	From Bryce McKinlay <bryce@albatross.co.nz>.

From-SVN: r26447
1999-04-14 11:07:51 +00:00
Andrew Haley 2b37afcb36 natDouble.java (doubleToLongBits): ensure that all NaNs are always converted to the same long value.
1999-04-14  Andrew Haley  <aph@cygnus.com>
        * java/lang/natDouble.java (doubleToLongBits): ensure that all
        NaNs are always converted to the same long value.
        * java/lang/natFloat.java (floatToIntBits): ditto, but for float
        converted to int.

From-SVN: r26439
1999-04-14 07:10:22 +00:00
Tom Tromey b81194219b natSystem.cc (arraycopy): Don't always use jbyteArray; instead switch on actual element type.
* java/lang/natSystem.cc (arraycopy): Don't always use jbyteArray;
	instead switch on actual element type.

From-SVN: r26405
1999-04-13 12:16:41 +00:00
Tom Tromey 4ac19b2c16 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (AM_MAKEFLAGS): Added JC1FLAGS.

From-SVN: r26402
1999-04-13 10:54:14 +00:00
Andrew Haley a4e44caa6d i386-signal.h, [...]: New files.
1999-04-13  Andrew Haley  <aph@cygnus.com>
        * include/i386-signal.h, include/default-signal.h: New files.
        * prims.cc (catch_segv): Call MAKE_THROW_FRAME in exception
        handler.
        (catch_fpe): New function.
        * configure.in: Make link to appropriate include/java-signal.h.
        * configure: Rebuilt.
        * Makefile.am: include/java-signal.h added to dependency list.
        * Makefile.in: Rebuilt.

From-SVN: r26400
1999-04-13 09:18:09 +00:00
Urban Widmark 808ce120ae DataInputStream.java (readLine): Corrected handling of empty lines, from null to "".
1999-04-12  Urban Widmark <urban@svenskatest.se>
	* java/io/DataInputStream.java (readLine): Corrected handling of
	empty lines, from null to "".

From-SVN: r26381
1999-04-12 18:27:56 +00:00
Tom Tromey b6d3799173 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (libgcj.zip): Put `gnu' classes into zip file.

From-SVN: r26375
1999-04-12 12:46:01 +00:00
Tom Tromey 69d5914bd0 natSystem.cc (SystemClass): New define.
* java/lang/natSystem.cc (SystemClass): New define.
	(init_properties): Synchronize.

From-SVN: r26372
1999-04-12 12:34:41 +00:00
Geoff Berry 825bd5ae6f natInetAddress.cc (lookup): Fix typo (AF_INET16 -> AF_INET6).
1999-04-08  Geoff Berry  <gcb@gnu.org>
	* natInetAddress.cc (lookup): Fix typo (AF_INET16 -> AF_INET6).
	* natPlainSocketImpl.cc (accept): Add missing else if check
	for AF_INET6.

From-SVN: r26297
1999-04-08 13:22:59 +00:00
Tom Tromey c86e69b2f9 Long.java (parseLong): Corrected overflow detection code.
* java/lang/Long.java (parseLong): Corrected overflow detection
	code.
	* java/lang/Integer.java (parseInt): Corrected overflow detection
	code.

From-SVN: r26295
1999-04-08 11:57:28 +00:00
Tom Tromey e086449d2a PrintStream.java (print): Handle null string argument.
* java/io/PrintStream.java (print): Handle null string argument.
	(println): Likewise.

From-SVN: r26294
1999-04-08 11:41:01 +00:00
Warren Levy 9a566c0926 natString.cc (init(jbyteArray,jint,jint,jstring)): Set count to 0 when InputStreamReader returns -1 for EOF.
* java/lang/natString.cc (init(jbyteArray,jint,jint,jstring)):
	Set count to 0 when InputStreamReader returns -1 for EOF.

From-SVN: r26273
1999-04-07 19:31:01 +00:00
Tom Tromey dc4618f922 mauve-libgcj: Omit java.text.Collator, java.text.RuleBasedCollator.
* mauve-libgcj: Omit java.text.Collator,
	java.text.RuleBasedCollator.

From-SVN: r26265
1999-04-07 14:42:43 +00:00
Tom Tromey ee9dd3721b Initial revision
From-SVN: r26263
1999-04-07 14:42:40 +00:00