Commit Graph

916 Commits

Author SHA1 Message Date
Jeff Sturm
71038fd576 IdentityHashMap.java (get): Fix off-by-one error.
* java/util/IdentityHashMap.java (get): Fix off-by-one error.
	(put): Likewise.

From-SVN: r45077
2001-08-21 14:24:48 +00:00
Tom Tromey
4c8d8761b0 * java/awt/GridBagConstraints.java: Removed comment.
From-SVN: r45061
2001-08-20 19:53:14 +00:00
Tom Tromey
a4f291fc90 jni.cc (nathash, [...]): New globals.
* jni.cc (nathash, nathash_count, nathash_size): New globals.
	(DELETED_ENTRY): New define.
	(hash): New function.
	(nathash_find_slot): Likewise.
	(natrehash): Likewise.
	(nathash_add): Likewise.
	(_Jv_JNI_RegisterNatives): No longer interpreter-specific.  Use
	nathash_add.
	(nathash_find): New function.
	(_Jv_LookupJNIMethod): Use it.  Synchronize body.
	(call): Synchronize around assignment.

From-SVN: r45060
2001-08-20 19:52:02 +00:00
Jeff Sturm
8ff6222751 UnicodeToBytes.java (write): Write work buffer starting from zero offset.
* gnu/gcj/convert/UnicodeToBytes.java (write): Write work buffer
	starting from zero offset.

From-SVN: r44997
2001-08-18 03:56:01 +00:00
Hans Boehm
eed5666980 boehm.cc: Include gc_local_alloc.h if appropriate.
2001-08-17  Hans-J. Boehm <Hans_Boehm@hp.com>

	* boehm.cc: Include gc_local_alloc.h if appropriate.
	(GC_GENERIC_MALLOC): Don't define.
	(MAYBE_MARK): Redefine for GC 6.0.
	(_Jv_MarkObj): Mark class differently.
	(_Jv_AllocArray): Use GC_generic_malloc.

From-SVN: r44993
2001-08-18 01:01:51 +00:00
Mark J Roberts
62ee966e9c BigInteger.java (randBytes): New method.
2001-08-17  Mark J Roberts  <mjr@anarcast.net>

	* java/math/BigInteger.java (randBytes): New method.
	(BigInteger(int,Random)): Use randBytes.

From-SVN: r44984
2001-08-17 22:21:02 +00:00
Tom Tromey
d1356866eb * gnu/gcj/convert/IOConverter.java: Add `646' alias.
From-SVN: r44965
2001-08-17 18:09:24 +00:00
Hans Boehm
c8e6d3a499 * BigInteger.java: fix right shifts by nonzero multiples of 32.
From-SVN: r44964
2001-08-17 16:33:49 +00:00
Tom Tromey
ac8d99218a jni.cc: Include IdentityHashMap.h, not Hashtable.h.
* jni.cc: Include IdentityHashMap.h, not Hashtable.h.
	(local_ref_table, global_ref_table): Now IdentityHashMap.
	(_Jv_JNI_Init): Updated for new types.
	(mark_for_gc): Likewise.
	(unmark_for_gc): Likewise.
	* gcj/javaprims.h: Rebuilt class list.
	* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added new file.
	* java/util/IdentityHashMap.java: New file.

From-SVN: r44929
2001-08-15 20:46:48 +00:00
Tom Tromey
369e1d74c6 natIconv.cc (read): Handle EINVAL and E2BIG correctly.
* gnu/gcj/convert/natIconv.cc (read): Handle EINVAL and E2BIG
	correctly.

From-SVN: r44928
2001-08-15 20:24:00 +00:00
Tom Tromey
586b870d4f SampleModel.java (getPixel): Set correct array element.
* java/awt/image/SampleModel.java (getPixel): Set correct array
	element.  From Chris Meyer.

From-SVN: r44871
2001-08-13 21:38:07 +00:00
Loren J. Rittle
6e15d3a83a * gnu/gcj/convert/natIconv.cc (done): Use HAVE_ICONV.
From-SVN: r44772
2001-08-10 17:39:34 +00:00
Loren J. Rittle
cc3835e651 * java/lang/natObject.cc (is_mp): Protect use of _SC_NPROCESSORS_ONLN.
From-SVN: r44771
2001-08-10 17:37:41 +00:00
Tom Tromey
012ca3e055 InputStreamReader.java (refill): Only call refill on BufferedInputStream when appropriate constraints are met.
* java/io/InputStreamReader.java (refill): Only call refill on
	BufferedInputStream when appropriate constraints are met.

From-SVN: r44675
2001-08-06 22:01:32 +00:00
Tom Tromey
f3997ccf90 StringWriter.java: Merged with Classpath.
* java/io/StringWriter.java: Merged with Classpath.
	* java/io/InputStream.java: Merged with Classpath.
	* java/io/OutputStream.java: Merged with Classpath.
	* java/io/PushbackInputStream.java: Merged with Classpath.
	* java/io/CharArrayReader.java: Merged with Classpath.
	* java/io/CharArrayWriter.java: Merged with Classpath.

From-SVN: r44652
2001-08-05 22:41:30 +00:00
Tom Tromey
870f3799af prims.cc (JNI_OnLoad): Don't declare.
* prims.cc (JNI_OnLoad): Don't declare.
	(_JNI_OnLoad): Don't define.
	(_Jv_CreateJavaVM): Don't handle JNI_OnLoad.

From-SVN: r44590
2001-08-03 01:25:17 +00:00
Tom Tromey
8d6a437584 RandomAccessFile.java (seek): Let seek go past end of file.
* java/io/RandomAccessFile.java (seek): Let seek go past end of
	file.
	(skipBytes): Don't fail if seeking past end of file.
	* java/io/FileInputStream.java (skip): Don't fail if seeking past
	end of file.
	* java/io/natFileDescriptorWin32.cc (seek): Handle `eof_trunc'
	argument.
	* java/io/natFileDescriptorEcos.cc (seek): Handle `eof_trunc'
	argument.
	* java/io/natFileDescriptorPosix.cc (seek): Handle `eof_trunc'
	argument.
	* java/io/FileDescriptor.java (seek): Added `eof_trunc' argument.

From-SVN: r44586
2001-08-02 23:46:39 +00:00
Martin Kahlert
6ff02a9579 jni.cc (JNI_CreateJavaVM): Call _Jv_JNI_Init in order to initialize global_ref_table/local_ref_table.
2001-08-02  Martin Kahlert  <martin.kahlert@infineon.com>

	* jni.cc (JNI_CreateJavaVM): Call _Jv_JNI_Init in order
	to initialize global_ref_table/local_ref_table.

From-SVN: r44583
2001-08-02 22:12:40 +00:00
Tom Tromey
1518ec6053 configure: Rebuilt.
* configure: Rebuilt.
	* configure.in (THREADSPEC): Don't set THREADLIBS on Cygwin.  From
	David Billinghurst.

From-SVN: r44576
2001-08-02 17:08:37 +00:00
Rainer Orth
60a78ccfac re PR libgcj/3694 (natPlainDatagramSocketImpl.cc doesn't compile in ALPHA OSF1)
* include/posix.h (_POSIX_PII_SOCKET): Define.
	* configure.in (HAVE_SOCKLEN_T): Define.
	* java/net/natPlainSocketImpl.cc [!HAVE_SOCKLEN_T]: Move socklen_t
	definition up.
	(_JV_accept): New function, avoids Tru64 UNIX accept macro.
	(java::net::PlainSocketImpl::accept): Use it.
	Fixes PRs libgcj/3694, libgcj/3696.

	* configure.in (HAVE_STRUCT_IPV6_MREQ): New test.
	* acconfig.h (HAVE_STRUCT_IPV6_MREQ): Provide template.
	* configure, include/config.h.in: Regenerate.
	* java/net/natPlainDatagramSocketImpl.cc (union McastReq): Use it.
	(mcastGrp): Likewise.
	(java::net::PlainDatagramSocketImpl::setOption): Guard against
	missing IPV6_MULTICAST_IF.
	Fixes PR libgcj/3694.

From-SVN: r44546
2001-08-01 17:53:00 +00:00
Jeff Sturm
9042f830ca * libgcj.spec.in: Pass -fkeep-inline-functions to jc1.
From-SVN: r44539
2001-08-01 12:33:38 +00:00
Christian Iseli
0498eaeaab Makefile.in: Rebuilt.
2001-07-30  Christian Iseli  <chris@ludwig-alpha.unil.ch>

	* Makefile.in: Rebuilt.
	* Makefile.am (GCJLINK): Added --tag=GCJ.
	(LIBLINK): Likewise.

From-SVN: r44520
2001-07-31 21:46:12 +00:00
Tom Tromey
e8b3bcfd3f * java/util/Date.java: Re-merged with Classpath.
From-SVN: r44497
2001-07-31 03:01:47 +00:00
Jeff Sturm
2ff78183f8 natPlainDatagramSocketImpl.cc: Undefine bind if defined.
* java/net/natPlainDatagramSocketImpl.cc: Undefine bind if defined.
(_Jv_bind): New static function.
(bind): Use _Jv_bind.
* java/net/natPlainSocketImpl.cc: Undefine bind, connect if defined.
(_Jv_bind, _Jv_connect): New static functions.
(bind): Use _Jv_bind.
(connect): Use _Jv_connect.

From-SVN: r44494
2001-07-31 01:59:44 +00:00
Tom Tromey
3d5aea8366 natIconv.cc (done): New methods.
2001-07-30  Tom Tromey  <tromey@redhat.com>
	    Corey Minyard  <minyard@acm.org>

	* gnu/gcj/convert/natIconv.cc (done): New methods.
	* gnu/gcj/convert/Output_iconv.java (done): New method.
	* gnu/gcj/convert/Input_iconv.java (done): New method.
	* gnu/gcj/convert/UnicodeToBytes.java (defaultEncodingClass):
	Removed.
	(getDefaultEncodingClass): Removed.
	(getDefaultEncoder): Use getEncoder.
	(done): New method.
	(defaultEncoding, CACHE_SIZE, encoderCache, currCachePos): New
	static fields.
	* gnu/gcj/convert/BytesToUnicode.java (defaultDecodingClass):
	Removed.
	(defaultEncoding, CACHE_SIZE, decoderCache, currCachePos): New
	static fields.
	(getDefaultDecodingClass): Removed.
	(getDefaultDecoder): Use getDecoder.
	(getDecoder): Look up decoder in cache.
	(done): New method.
	* java/lang/natString.cc (init): Call `done' on converter.
	(getBytes): Likewise.

Co-Authored-By: Corey Minyard <minyard@acm.org>

From-SVN: r44484
2001-07-30 20:24:18 +00:00
Tom Tromey
d76cbbc844 * java/lang/Integer.java: Merged with Classpath.
From-SVN: r44478
2001-07-30 17:58:32 +00:00
Bryce McKinlay
6941ff9559 GregorianCalendar.java (GregorianCalendar): Call setTimeInMillis() to set the default/current time.
* java/util/GregorianCalendar.java (GregorianCalendar): Call
	setTimeInMillis() to set the default/current time.

From-SVN: r44467
2001-07-30 01:41:31 +01:00
Mark Wielaard
7729617cf8 * HACKING: add description on updating namespace
From-SVN: r44454
2001-07-29 10:05:08 +00:00
Bryce McKinlay
fa397ddafb Calendar.java (set): Never recompute fields here.
* java/util/Calendar.java (set): Never recompute fields here. They
	will already be set if someone set time explicitly, and it can cause
	problems to do so. Don't invalidate AM_PM setting if HOUR is set.
	* java/util/GregorianCalendar.java (computeTime): Don't ignore an
	HOUR setting if AM_PM is set. Don't try to ensure the HOUR value is
	sane.
	* java/text/SimpleDateFormat.java (defaultCentury): New field.
	(readObject): Call set2DigitYearStart if appropriate so that
	defaultCentury is calculated.
	(SimpleDateFormat): Don't bother clearing calendar here. Call
	computeCenturyStart().
	(set2DigitYearStart): Calculate and set defaultCentury.
	(format): Don't clone the calendar. Use "calendar" not "theCalendar"
	everywhere.
	(parse): Likewise. If the pattern is "y" or "yy" and it found exactly
	2 numeric digits, use the 80-20 heuristic to parse the value into a
	default century based on defaultCenturyStart.
	(computeCenturyStart): Rewritten. Call set2DigitYearStart().

From-SVN: r44395
2001-07-26 12:21:45 +01:00
Tom Tromey
a9e83c1b1b Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (libgcj.jar): Correctly fail when bytecode
	compilation fails.

From-SVN: r44359
2001-07-25 16:40:04 +00:00
Rainer Orth
edd60b15d1 prims.cc (_JNI_OnLoad): New function.
* prims.cc (_JNI_OnLoad): New function.
	(JNI_OnLoad): Use it.
	(_Jv_CreateJavaVM): Check for _JNI_OnLoad, not NULL.

From-SVN: r44316
2001-07-24 20:08:58 +00:00
Rainer Orth
6e6958dce4 Makefile.am (AM_MAKEFLAGS): Pass RUNTESTFLAGS.
* Makefile.am (AM_MAKEFLAGS): Pass RUNTESTFLAGS.
	Makefile.in: Regenerate.

From-SVN: r44314
2001-07-24 19:51:34 +00:00
Tom Tromey
82545bf72f VMClassLoader.java (getPrimitiveClass): Return correct type.
* java/lang/VMClassLoader.java (getPrimitiveClass): Return correct
	type.

From-SVN: r44296
2001-07-24 14:31:42 +00:00
Tom Tromey
e109d16f8c javaprims.h: Rebuilt class list.
* gcj/javaprims.h: Rebuilt class list.
	* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added VMClassLoader.
	* java/lang/VMClassLoader.java: New file.
	* java/lang/Boolean.java: Merged with Classpath.
	* java/lang/Byte.java: Merged with Classpath.
	* java/lang/Integer.java: Merged with Classpath.
	* java/lang/Long.java: Merged with Classpath.
	* java/lang/Number.java: Merged with Classpath.
	* java/lang/Short.java: Merged with Classpath.

From-SVN: r44274
2001-07-23 20:01:29 +00:00
Jeff Sturm
092a1f5ab3 configure.host: Enable hash synchronization for alpha*-*.
* configure.host: Enable hash synchronization for alpha*-*.
* include/posix-threads.h (_Jv_ThreadSelf): Added inline function for alpha.
* java/lang/natObject.cc (compare_and_swap, release_set,
compare_and_swap_release): Added inline functions for alpha.

From-SVN: r44251
2001-07-23 03:51:17 +00:00
Rainer Orth
06c271c3cf natPlainDatagramSocketImpl.cc (mcastGrp): Use new RFC 2533 socket options IPV6_JOIN_GROUP...
* java/net/natPlainDatagramSocketImpl.cc (mcastGrp): Use new RFC
	2533 socket options IPV6_JOIN_GROUP, IPV6_LEAVE_GROUP, falling
	back to old RFC 2133 variants if missing.

From-SVN: r44130
2001-07-18 20:39:52 +00:00
Tom Tromey
e5c83273cf natFileWin32.cc (_access): Renamed.
* java/io/natFileWin32.cc (_access): Renamed.
	(_stat): Likewise.
	* java/io/natFile.cc (_access): Renamed.
	(_stat): Likewise.
	* java/io/File.java (access, stat): Add leading `_' to name.
	Updated all callers.

From-SVN: r44124
2001-07-18 18:35:12 +00:00
Tom Tromey
860a15368d For PR java/2812:
* libgcj.spec.in (*lib): Added LIBICONV.
	* configure: Rebuilt.
	* configure.in: Call AM_ICONV.  Don't check for iconv function.
	Add parameters to JV_HASH_SYNCHRONIZATION define.
	* acinclude.m4 (AM_ICONV): New macro, from Bruno Haible.

From-SVN: r44116
2001-07-18 17:06:24 +00:00
Alexandre Petit-Bianco
ba75520fff i386-signal.h (HANDLE_DIVIDE_OVERFLOW): Removed unused local `_ebp.'
2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>

	* include/i386-signal.h (HANDLE_DIVIDE_OVERFLOW): Removed unused
	local `_ebp.'

(http://gcc.gnu.org/ml/java-patches/2001-q3/msg00070.html )

From-SVN: r44093
2001-07-17 16:59:07 -07:00
Bryce McKinlay
f79ced717f LinkedList.java (clone): Clear the copy list with clear(), not by setting its size field.
* java/util/LinkedList.java (clone): Clear the copy list with clear(),
	not by setting its size field.

From-SVN: r44057
2001-07-17 02:56:38 +01:00
Tom Tromey
a9a399fe24 re PR libgcj/3426 (java.io.InputStreamReader, infinite loop)
Fix for PR libgcj/3426:
	* gnu/gcj/convert/natIconv.cc: Include CharConversionException.h,
	errno.h.
	(read): Throw exception if character conversion fails.
	* java/io/BufferedInputStream.java (refill): Now package-private.
	* java/io/InputStreamReader.java (ready): Simplified.
	(refill): New method.
	(read): Use it.

Co-Authored-By: David Brownell <david-b@pacbell.net>

From-SVN: r43975
2001-07-13 05:41:28 +00:00
Tom Tromey
a3e5ae6dd8 Report from Henner Zeller:
* java/io/FileOutputStream.java (FileOutputStream): Throw
	FileNotFoundException, not IOException.

From-SVN: r43966
2001-07-12 15:37:43 +00:00
Anthony Green
9556f88777 Add some org packages.
From-SVN: r43922
2001-07-11 03:59:16 +00:00
Alexandre Petit-Bianco
aac560ac26 Makefile.am: Added `java/lang/ThreadLocal.java'.
libjava:

2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>

        * Makefile.am: Added `java/lang/ThreadLocal.java'.
        * Makefile.in: Regenerate.
        * java/lang/ThreadLocal.java: Initial import.

libjava/testsuite:

2001-07-10  Alexandre Petit-Bianco  <apbianco@readhat.com>

        * libjava.lang/TLtest.java: New file.
        * libjava.lang/TLtest.out: New file.

(http://gcc.gnu.org/ml/java-patches/2001-q3/msg00042.html )

From-SVN: r43915
2001-07-10 17:47:37 -07:00
Jeff Sturm
3b1e7311a8 Makefile.am (libgcj.jar): Don't recursively make built_java_source_files.
* Makefile.am (libgcj.jar): Don't recursively make
built_java_source_files.  Avoid long command lines.
Don't change to $(srcdir) to invoke javac.
(libgcj.la, libgcjx.la); Avoid long command lines.
($(nat_headers),$(x_nat_headers)): Depend on libgcj.jar.
* Makefile.in: Rebuilt.

From-SVN: r43836
2001-07-07 14:49:43 +00:00
Andrew Haley
b8ef6023aa i386-signal.h: Don't do anything with unsigned divide overflow except throw an exception.
2001-07-06  Andrew Haley  <aph@cambridge.redhat.com>

        * include/i386-signal.h: Don't do anything with unsigned divide
        overflow except throw an exception.

From-SVN: r43813
2001-07-06 16:33:10 +00:00
Tom Tromey
0bedbbdf1b For PR java/3562:
* java/lang/Class.h (Class(void)): Now private.  Removed
	implementation.  From dmorsberger@sensysdl.com.

From-SVN: r43781
2001-07-05 15:57:09 +00:00
Tom Tromey
fe3dac3d3c re PR bootstrap/3281 (Installation failure (mkinstalldirs))
Fix for PR bootstrap/3281:
	* aclocal.m4, configure: Rebuilt.
	* acinclude.m4 (LIBGCJ_CONFIGURE): Don't set libgcj_flagbasedir.
	Correctly compute libgcj_basedir.
	(mkinstalldirs): Define and subst.

From-SVN: r43739
2001-07-03 22:31:43 +00:00
Jeremy Nimmer
e2a6abb6d5 For PR libgcj/3523:
2001-07-01  Jeremy Nimmer  <jwnimmer@alum.mit.edu>

	For PR libgcj/3523:
	* java/io/LineNumberReader.java (reset): Pass correct arguments to
	countLines.

From-SVN: r43683
2001-07-02 05:16:24 +00:00
Tom Tromey
6dc04dec65 IOConverter.java: Manually maintained alias now lowercase.
* gnu/gcj/convert/IOConverter.java: Manually maintained alias now
	lowercase.

From-SVN: r43620
2001-06-27 21:56:08 +00:00
Tom Tromey
c0aa72210a encodings.pl: Generate lower-case names.
* scripts/encodings.pl: Generate lower-case names.  Updated URL
	for `character-sets' file.
	* gnu/gcj/convert/IOConverter.java (canonicalize): Convert name to
	lower case.
	Rebuilt list of aliases.

From-SVN: r43566
2001-06-26 04:36:47 +00:00
Tom Tromey
62d73fa83b natFileDescriptorPosix.cc (open): Change error message formatting.
* java/io/natFileDescriptorPosix.cc (open): Change error message
	formatting.  From David Brownell.

From-SVN: r43564
2001-06-26 03:27:57 +00:00
Tom Tromey
470042c712 java-interp.h (_Jv_InterpClass): Use JV_MARKOBJ_DECL.
* include/java-interp.h (_Jv_InterpClass): Use JV_MARKOBJ_DECL.
	From Corey Minyard.

From-SVN: r43484
2001-06-21 15:17:21 +00:00
Mark J. Roberts
a0d4ddde2c BigInteger.java (byteArrayToIntArray): Don't include extraneous/malformed sign word.
2001-06-19  Mark J. Roberts  <mjr@statesmean.com>

	* java/math/BigInteger.java (byteArrayToIntArray): Don't include
	extraneous/malformed sign word.

From-SVN: r43455
2001-06-19 11:42:03 +00:00
Tom Tromey
a5c30a8cff * jni.cc (_Jv_JNI_NewLocalRef): Search other frames.
From-SVN: r43415
2001-06-15 23:44:45 +00:00
Tom Tromey
6728a61d1f natRuntime.cc (_Jv_FindSymbolInExecutable): Return NULL if no library on the list has the symbol.
* java/lang/natRuntime.cc (_Jv_FindSymbolInExecutable): Return
	NULL if no library on the list has the symbol.
	(init): Call add_library on the program itself.
	* prims.cc (JvRunMain): Initialize Runtime before searching for
	`main'.
	(_Jv_RunMain): Likewise.

From-SVN: r43413
2001-06-15 23:22:02 +00:00
Tom Tromey
39986dd5ee jni.cc (ClassClass): Removed; updated all users.
* jni.cc (ClassClass): Removed; updated all users.
	(ObjectClass): Likewise.
	(ThrowableClass): Likewise.
	(MethodClass): Likewise.
	(ThreadGroupClass): Likewise.
	(local_ref_table): Renamed from `ref_table'.
	(global_ref_table): New global.
	(_Jv_JNI_Init): Initialize both ref tables.
	(mark_for_gc): Added `ref_table' parameter.
	(unmark_for_gc): Likewise.  Also, fail if we unreferenced too many
	times.
	(_Jv_JNI_NewGlobalRef): Updated for new mark function.
	(_Jv_JNI_DeleteGlobalRef): Likewise.
	(_Jv_JNI_DeleteLocalRef): Likewise.
	(_Jv_JNI_NewLocalRef): Likewise.
	(_Jv_JNI_PopLocalFrame): Likewise.
	(_Jv_JNI_GetStringChars): Likewise.
	(_Jv_JNI_ReleaseStringChars): Likewise.
	(_Jv_JNI_GetPrimitiveArrayElements): Likewise.
	(_Jv_JNI_ReleasePrimitiveArrayElements): Likewise.

From-SVN: r43409
2001-06-15 22:09:10 +00:00
Tom Tromey
fc07ebe2a7 re PR libgcj/3144 (java.lang.Date.compareTo() not supported)
Fix for PR libgcj/3144:
	* java/util/Date.java: Merged with Classpath.

From-SVN: r43374
2001-06-14 15:41:57 +00:00
Tom Tromey
2ee7cd3e81 aclocal.m4, configure: Rebuilt.
* aclocal.m4, configure: Rebuilt.
	* acinclude.m4: Find configure.host in srcdir.

From-SVN: r43325
2001-06-13 16:48:29 +00:00
Alexandre Petit-Bianco
9b8c19b4f5 exception.cc (cstdlib): Replaces stdlib.h.
2001-06-10  Alexandre Petit-Bianco  <apbianco@redhat.com>

        * exception.cc (cstdlib): Replaces stdlib.h.
        (_Jv_Throw): Use std::abort().
        (PERSONALITY_FUNCTION): Likewise.

(http://gcc.gnu.org/ml/gcc-patches/2001-06/msg00620.html )

From-SVN: r43153
2001-06-10 13:59:37 -07:00
Alexandre Oliva
9dd7e9cf22 acinclude.m4 (AC_EXEEXT): Work around in case it expands to nothing, as in autoconf 2.50.
* acinclude.m4 (AC_EXEEXT): Work around in case it expands to
nothing, as in autoconf 2.50.
* aclocal.m4, configure: Rebuilt.

From-SVN: r43108
2001-06-09 21:29:16 +00:00
Alexandre Oliva
4e0abb1d51 acinclude.m4 (AC_EXEEXT): Work around in case it expands to nothing, as in autoconf 2.50.
* acinclude.m4 (AC_EXEEXT): Work around in case it expands to
nothing, as in autoconf 2.50.
* configure: Rebuilt.

From-SVN: r43104
2001-06-09 20:31:23 +00:00
Tom Tromey
f1eba84741 configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Compute new aux dir using `pwd'.

From-SVN: r43064
2001-06-08 23:40:17 +00:00
Tom Tromey
4c399c87ef re PR libgcj/3059 (System doesn't set java.home property)
Fix for PR libgcj/3059:
	* java/lang/natSystem.cc (init_properties): Define `java.home'.
	* Makefile.in: Rebuilt.
	* Makefile.am (AM_CXXFLAGS): Define PREFIX.

From-SVN: r43040
2001-06-08 19:09:04 +00:00
Tom Tromey
7f7ba9bf90 For PR bootstrap/3075:
* configure, aclocal.m4, Makefile.am: Rebuilt.
	* configure.in: Pass `--with-auxdir' to subdir configure.  Don't
	call AC_CONFIG_AUX_DIR or AC_CANONICAL_SYSTEM.  Look for unwind.h
	relative to libgcj_basedir.
	* acinclude.m4 ((LIBGCJ_CONFIGURE): Call AC_CONFIG_AUX_DIR and
	AC_CANONICAL_SYSTEM here.
	* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Use srcdir, not
	libgcj_basedir.
	($(extra_headers)): New target.

From-SVN: r43034
2001-06-08 18:02:03 +00:00
Martin Kahlert
c90efa7a1c natClass.cc (_Jv_IsAssignableFrom): Ensure that ancestors table index is within allowed bounds.
2001-06-05  Martin Kahlert  <martin.kahlert@infineon.com>
	    Bryce McKinlay  <bryce@waitaki.otago.ac.nz>

	* java/lang/natClass.cc (_Jv_IsAssignableFrom): Ensure that ancestors
	table index is within allowed bounds. Ensure that we dont try to access
	class itable at a negative offset. Avoid an ancestor table lookup if
	source is a primitive type class.
	(isInstance): Remove redundant isPrimitive() check.

Co-Authored-By: Bryce McKinlay <bryce@waitaki.otago.ac.nz>

From-SVN: r42898
2001-06-05 10:46:36 +01:00
Tom Tromey
0f2257011a PublicKey.java: Extend Key.
* java/security/PublicKey.java: Extend Key.
	* java/security/PrivateKey.java: Extend Key.

From-SVN: r42886
2001-06-04 22:55:49 +00:00
Anthony Green
20f914dc05 !defined(USE_LTDL) fix
From-SVN: r42813
2001-06-02 19:40:53 +00:00
Anthony Green
9f0fbbabfb Remove libgcjdata hack. Fix jv-scan usage in dejagnu.
From-SVN: r42812
2001-06-02 19:13:52 +00:00
Anthony Green
c8fb98139d USE_LIBFFI change
From-SVN: r42791
2001-06-02 08:49:31 +00:00
Jeff Sturm
e2f3946854 natFile.cc (get_entry): Removed functions.
* natFile.cc (get_entry): Removed functions.
(performList): Call readdir or readdir_r if HAVE_READDIR_R defined.
Allocate enough storage for d_name if using readdir_r.

From-SVN: r42767
2001-06-01 04:04:10 +00:00
Tom Tromey
66c8aed252 natFileDescriptorPosix.cc (open): Allocate buffer to correct size.
* java/io/natFileDescriptorPosix.cc (open): Allocate buffer to
	correct size.
	(write): Loop until write completes.  From Corey Minyard.

From-SVN: r42749
2001-05-31 17:33:05 +00:00
Laurent Guerby
916f3579cc Rectangle2D.java: fix doc typo.
2001-05-29  Laurent Guerby  <guerby@acm.org>

	* java/awt/geom/Rectangle2D.java: fix doc typo.

From-SVN: r42746
2001-05-31 16:48:15 +00:00
Tom Tromey
5980a00aeb DriverManager.java (getDrivers): Handle case where driver's class loader is null.
* java/sql/DriverManager.java (getDrivers): Handle case where
	driver's class loader is null.  From Corey Minyard.

From-SVN: r42745
2001-05-31 16:18:55 +00:00
Tom Tromey
70cb702a96 * include/jvm.h (_Jv_ThrowNoMemory): Mark as noreturn.
From-SVN: r42694
2001-05-29 22:18:41 +00:00
Tom Tromey
eb019738e2 configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Only add multilib support code if we just rebuilt
	top-level Makefile.

From-SVN: r42693
2001-05-29 21:31:23 +00:00
Andrew Haley
c9bffcd53e i386-signal.h (MAKE_THROW_FRAME): Don't fix up frame pointer...
2001-05-29  Andrew Haley  <aph@redhat.com>

        * include/i386-signal.h (MAKE_THROW_FRAME): Don't fix up frame
        pointer: the dwarf unwinder in libgcc will do everything that's
        needed.
        (HANDLE_DIVIDE_OVERFLOW): Tidy.  Don't mess with stack frames any
        more than we absolutely need to.
        * configure.host (EXCEPTIONSPEC): Remove libgcj_sjlj on Alpha.
        * configure.in (SIGNAL_HANDLER): Use include/dwarf2-signal.h on
        Alpha.
        (SIGNAL_HANDLER): Test "$enable_sjlj_exceptions", not
        "$libgcj_sjlj".
        * configure: Rebuilt.
        * include/dwarf2-signal.h (MAKE_THROW_FRAME): Adjust PC
        for Alpha.
        (SIGNAL_HANDLER): Use siginfo style handler.
        (INIT_SEGV): Likewise.
        (INIT_FPE): Likewise.
        * include/ppc-signal.h: Delete whole file.

From-SVN: r42691
2001-05-29 17:50:50 +00:00
Tom Tromey
cb894e07ec natString.cc (init): Throw ArrayIndexOutOfBoundsException.
* java/lang/natString.cc (init): Throw
	ArrayIndexOutOfBoundsException.
	(getChars): Likewise.
	(getBytes): Likewise.
	(valueOf): Likewise.

From-SVN: r42531
2001-05-24 18:06:03 +00:00
Tom Tromey
cf6b8de459 configure.in: Only allow hash synchronization when POSIX threads are enabled.
* configure.in: Only allow hash synchronization when POSIX threads
	are enabled.
	* java/lang/natObject.cc (alloc_heavy): Properly find `init' field
	of sync info object.

From-SVN: r42530
2001-05-24 18:03:47 +00:00
Tom Tromey
085a261966 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (AM_CXXFLAGS): Remove -fvtable-thunks.

From-SVN: r42521
2001-05-24 05:43:46 +00:00
Tom Tromey
4c6a2b018f Revert patch of 2001-05-21:
* Makefile.am (libgcj_la_DEPENDENCIES): Removed nat_files.
	(libgcj_la_LIBADD): Likewise.
	(libgcjx_la_DEPENDENCIES): Removed x_nat_files.
	(libgcjx_la_LIBADD): Likewise.

From-SVN: r42520
2001-05-24 05:41:53 +00:00
Tom Tromey
3610e0d548 [multiple changes]
2001-05-23  Tom Tromey  <tromey@redhat.com>

	* posix-threads.cc (_Jv_self_cache): Renamed from self_cache.
	* gcj/Makefile.in: Rebuilt.
	* gcj/Makefile.am (gcj_HEADERS): Added libgcj-config.h.
	* gcj/javaprims.h: Include gcj/libgcj-config.h.
	* gcj/libgcj-config.h.in: New file.
	* libgcj.spec.in (*jc1): Added @HASH_SYNC_SPEC@.
	* configure: Rebuilt.
	* configure.in: Enable hash synchronization by default on some
	platforms.
	(HASH_SYNC_SPEC): New subst.
	(AC_CONFIG_HEADER): Added gcj/libgcj-config.h.
	Correctly use `test -z' instead of `test -n' in a couple places.
	(JV_HASH_SYNCHRONIZATION): Use AC_DEFINE; don't add to
	LIBGCJ_CXXFLAGS.
	* configure.host (enable_java_net_default): Initialize.
	(enable_hash_synchronization_default): New variable.

2001-05-23  Hans Boehm <Hans_Boehm@hp.com>

	* boehm.cc (_Jv_MarkObj): Don't mark sync_info when hash
	synchronization in use.
	(_Jv_MarkArray): Likewise.
	(_Jv_AllocBytes): Don't check return result.
	(handle_out_of_memory): New function.
	(_Jv_InitGC): Set GC_oom_fn.
	(trace_one_vtable): New global.
	(_Jv_AllocTraceOne): New function.
	* configure.in: Added --enable-hash-synchronization.
	* defineclass.cc, prims.cc, resolve.cc, java/lang/natString.cc,
	java/net/natInetAddress.cc: Remove _Jv_AllocBytesChecked.
	* nogc.cc (_Jv_AllocObj): Throw out-of-memory.
	(_Jv_AllocArray): Likewise.
	(_Jv_AllocBytes): Likewise.
	(_Jv_AllocPtrFreeObject): New function.
	(_Jv_AllocTraceOne): Likewise.
	* posix-threads.cc (_Jv_ThreadRegister): Handle slow
	pthread_self().
	(self_cache): New global.
	(_Jv_ThreadSelf_out_of_line): New function.
	* prims.cc (_Jv_AllocBytesChecked): Removed.
	(_Jv_ThrowNoMemory): New function.
	(_Jv_AllocObject): Don't check for null return from allocator.
	(_Jv_NewObjectArray): Likewise.
	(_Jv_AllocPtrFreeObject): New function.
	(_Jv_NewPrimArray): Allocate pointer-free object if possible.
	* include/javaprims.h (_Jv_AllocPtrFreeObject): Declare.
	(_Jv_MonitorEnter, _Jv_MonitorExit): Don't return value.
	* include/boehm-gc.h (_Jv_AllocObj): Define.
	(_Jv_AllocPtrFreeObj): Define.
	* include/jvm.h (_Jv_AllocPtrFreeObj): Declare.
	(_Jv_ThrowNoMemory): Declare.
	(_Jv_AllocTraceOne): Declare.
	(_Jv_AllocBytesChecked): Removed.
	* include/posix-threads.h (_Jv_MutexInit, _Jv_MutexLock,
	_Jv_MutexUnlock): Handle LOCK_DEBUG.
	(_Jv_ThreadSelf): Handle case where system pthread_self() is
	slow.
	* java/lang/Class.h (Class): Declare _Jv_AllocPtrFreeObj as
	friend.
	* java/lang/Object.h (sync_info): Conditional upon presence of
	hash synchronization.
	* java/lang/natObject.cc: Much new code to handle thin locks and
	hash synchronization.
	* java/lang/natString.cc (_Jv_AllocString): Allocate pointer-free
	object if possible.

From-SVN: r42519
2001-05-24 05:40:37 +00:00
Joseph Myers
719f0fde70 jv-scan.c (version): Update copyright year.
gcc/java:
	* jv-scan.c (version): Update copyright year.

libjava:
	* gij.cc (version): Update copyright year.

From-SVN: r42505
2001-05-23 19:10:30 +01:00
Anthony Green
13094d1293 Fix cross builds.
From-SVN: r42497
2001-05-23 17:13:27 +00:00
Per Bothner
c93d7fae7b Implement invocation interface; don't create new thread for main.
From-SVN: r42428
2001-05-21 23:47:48 -07:00
Per Bothner
57d02dd3e6 Makefile.am (libgcj_la_DEPENDENCIES): Add $(nat_files).
* Makefile.am (libgcj_la_DEPENDENCIES):  Add $(nat_files).
	(libgcj_la_LIBADD):  Likewise.
	(libgcjx_la_DEPENDENCIES, libgcjx_la_LIBADD):  Add $(x_nat_files).

From-SVN: r42424
2001-05-21 23:40:06 -07:00
Per Bothner
ef0a7b49a9 javaprims.h (_Jv_FormatInt): New declaration.
* gcj/javaprims.h (_Jv_FormatInt):  New declaration.
	* java/lang/natString.cc (_JvFormatInt):  New primitive, with logic
	taken from old Integer.toString code.
	(Integer::valueOf):  Use _Jv_FormatInt.
	* java/lang/Integer.java (toString):  Just use call String.valueOf.
	* java/lang/Long.java (toString):  Fix typo in comment.
	* java/lang/String.java (valueOf(int)):  Make native.
	* java/lang/StringBuffer.java (append(int)):  Make native.
	* java/lang/natStringBuffer.cc:  New file, for append(jint).
	* Makefile.am (ant_source_files):  Add java/lang/natStringBuffer.cc.

From-SVN: r42419
2001-05-21 21:38:37 -07:00
Tom Tromey
8ffd89ad1b * gnu/gcj/runtime/VMClassLoader.java (VMClassLoader): Now public.
From-SVN: r42405
2001-05-21 19:27:10 +00:00
Andrew Haley
01936f3a7d dwarf2-signal.h: New file.
2001-05-18  Andrew Haley  <aph@cambridge.redhat.com>

        * include/dwarf2-signal.h: New file.
        * configure.in (SYSDEP_SOURCES): Add dwarf2-signal.h for PPC.
        * configure.host (EXCEPTIONSPEC): Don't use sjlj on PPC.
        * configure: Rebuilt.

From-SVN: r42400
2001-05-21 16:59:42 +00:00
Bryce McKinlay
1f4eb17d51 configure.in: Update boehm-gc include dir for new GC version.
* configure.in: Update boehm-gc include dir for new GC version.
	* configure: Rebuilt.
	* exception.cc: Only include <gc.h>. Remove TRUE/FALSE hacks and
	extern "C" wrapper.
	* boehm.cc: Update includes for new GC version. MAKE_PROC is now
	GC_MAKE_PROC. mark_proc is now GC_mark_proc.
	* posix-threads.cc: Only include <gc.h>. Don't need to wrap with
	extern "C".

From-SVN: r42380
2001-05-21 09:37:04 +01:00
Alexandre Petit-Bianco
ec54a908e5 posix-threads.h (_Jv_CondInit): 0' used in place of NULL.'
2001-05-18  Alexandre Petit-Bianco  <apbianco@redhat.com>

        * include/posix-threads.h (_Jv_CondInit): `0' used in place of `NULL.'
        (_Jv_MutexInit): Likewise.

(http://gcc.gnu.org/ml/java-patches/2001-q2/msg00245.html )

From-SVN: r42303
2001-05-18 22:43:00 -07:00
Tom Tromey
63f36be6e7 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added Polygon.java.

From-SVN: r42276
2001-05-18 19:22:05 +00:00
Bryce McKinlay
ca1906ff9a [multiple changes]
2001-05-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>

	* include/jvm.h: Move "#pragma GCC java_exceptions" to ...
	* gcj/javaprims.h: ... here.
	* gnu/gcj/io/shs.cc: Add "#pragma GCC java_exceptions".

2001-05-17  Martin Kahlert  <martin.kahlert@infineon.com>

	* java/lang/natClass.cc (_Jv_FindIIndex): Fix an off by one error
	with length of ioffset table.
	(_Jv_IsAssignableFrom): Likewise.

From-SVN: r42248
2001-05-18 07:29:11 +01:00
Per Bothner
b2040e7b55 * Makefile.am (ZIP): The "fastjar" binary is now plain "jar".
From-SVN: r42207
2001-05-17 10:04:08 -07:00
Tom Tromey
26ec4f47ba SimpleDateFormat.java (parse): Handle non-dst time zones.
* java/text/SimpleDateFormat.java (parse): Handle non-dst time
	zones.

From-SVN: r42156
2001-05-16 15:34:46 +00:00
Tom Tromey
6f4226f843 GregorianCalendar.java (computeTime): Only call getTimeZone() once.
* java/util/GregorianCalendar.java (computeTime): Only call
	getTimeZone() once.

From-SVN: r42121
2001-05-15 21:44:24 +00:00
Tom Tromey
127699902e SimpleDateFormat.java (parse): Clear DST_OFFSET and ZONE_OFFSET just before computing the time.
* java/text/SimpleDateFormat.java (parse): Clear DST_OFFSET and
	ZONE_OFFSET just before computing the time.

From-SVN: r42076
2001-05-14 17:40:29 +00:00
Zack Weinberg
1f730ff7b6 except.c (choose_personality_routine): Export.
gcc/cp:
	* except.c (choose_personality_routine): Export.  Add
	explanatory comment.  Take an enum languages, not a boolean.
	(initialize_handler_parm): Adjust to match.
	* cp-tree.h: Prototype choose_personality_routine.
	* lex.c (handle_pragma_java_exceptions): New function.
	(init_cp_pragma): Register #pragma GCC java_exceptions.

gcc:
	* extend.texi: Document #pragma GCC java_exceptions.

libjava:
	* Makefile.am (libgcj_la_OBJECTS): Remove libsupc++convenience.la.
	* Makefile.in: Regenerate (by hand).
	* include/jvm.h: Add #pragma GCC java_exceptions at top of file.
	* doc/cni.sgml: Document #pragma GCC java_exceptions.

From-SVN: r42027
2001-05-13 01:28:18 +00:00
Richard Henderson
5a0bf1eed1 configure.in (ia64-*): Don't set SYSDEP_SOURCES.
* configure.in (ia64-*): Don't set SYSDEP_SOURCES.
        * java/lang/natThrowable.cc: Don't use __ia64_backtrace.

From-SVN: r41984
2001-05-11 23:25:03 -07:00
Richard Henderson
5f2fa73083 exception.cc: Include unwind-pe.h.
* exception.cc: Include unwind-pe.h.  Remove all pointer
        encoding logic.

From-SVN: r41983
2001-05-11 23:17:31 -07:00