Commit Graph

62 Commits

Author SHA1 Message Date
Tom Tromey 43f8e39002 * java/util/Properties.java: Merged with Classpath version.
From-SVN: r36775
2000-10-07 18:13:11 +00:00
Warren Levy bf3478059d Makefile.am: Removed java/io/Replaceable.java and java/io/Resolvable.java.
* Makefile.am: Removed java/io/Replaceable.java and
	java/io/Resolvable.java.
	* Makefile.in: Rebuilt.
	* gcj/javaprims.h: Removed Replaceable and Resolvable from java.io
	namespace.
	* java/io/ObjectInputStream.java (processResolution): Fixed typo
	in method name.
	(processResolution): Handle readResolve method via reflection with
	removal of Resolvable interface.
	* java/io/ObjectOutputStream.java (writeObject): Handle writeReplace
	method via reflection with removal of Replaceable interface.
	* java/io/Replaceable.java: Removed.
	* java/io/Resolvable.java: Removed.
	* java/security/Key.java (serialVersionUID): New field.
	* java/security/Provider.java (serialVersionUID): New field.
	* java/security/interfaces/DSAPrivateKey.java (serialVersionUID):
	New field.
	* java/security/interfaces/DSAPublicKey.java (serialVersionUID):
        New field.
	* java/sql/DataTruncation.java (serialVersionUID): New field.
	* java/sql/SQLException.java (serialVersionUID): New field.
	* java/sql/SQLWarning.java (serialVersionUID): New field.
	* java/util/Date.java (serialVersionUID): New field.
	(millis): Made transient.
	(readObject): New method.
	(writeObject): New method.

Serialization mods.
Note:  The interfaces java.io.Replaceable and java.io.Resolvable were only
temporary additions to JDK 1.2 beta versions and were not included
in the JDK 1.2 final.  The Serialization spec instructs how to deal
with their methods (via reflection).

From-SVN: r36736
2000-10-05 23:57:16 +00:00
Warren Levy bc6ccd3316 PropertyChangeEvent.java (serialVersionUID): Added.
* java/beans/PropertyChangeEvent.java (serialVersionUID): Added.
	* java/beans/PropertyVetoException.java (serialVersionUID): Added.
	* java/io/File.java (writeObject): Added.
	(readObject): Added.
	(serialVersionUID): Added.
	* java/io/ObjectOutputStream.java (writeObject): Initialized
	fieldsAlreadyWritten before recursion rather than after.
	* java/io/ObjectStreamClass.java (serialVersionUID): Added.
	* java/io/OptionalDataException.java (serialVersionUID): Added.
	(OptionalDataException): Made package private.
	* java/io/SyncFailedException.java (SyncFailedException): Removed
	default constructor to match spec.
	* java/lang/Boolean.java (serialVersionUID): Added.
	* java/lang/Byte.java (serialVersionUID): Added.
	* java/lang/Character.java (serialVersionUID): Added.
	* java/lang/Double.java (serialVersionUID): Added.
	* java/lang/Float.java (serialVersionUID): Added.
	* java/lang/Integer.java (serialVersionUID): Added.
	* java/lang/Long.java (serialVersionUID): Added.
	* java/lang/Number.java (serialVersionUID): Added.
	* java/lang/Short.java (serialVersionUID): Added.
	* java/lang/String.java (serialVersionUID): Added.
	* java/lang/ThreadDeath.java (ThreadDeath): Removed constructor
	to match spec.
	* java/lang/reflect/InvocationTargetException.java
	(serialVersionUID): Added.
	* java/net/URL.java (handler): Made transient.
	(hashCode): Added field for serialization, per spec. and use
	cached value if available.
	(serialVersionUID): Added.
	(URL): Initialize hashCode.
	(set): Adjust hashCode.
	(readObject): New Method to initialize the protocol handler when
	deserializing.
	(writeObject): New method.
	* java/text/BreakIterator.java: Removed 'implements Serializable'.
	* java/text/Collator.java: Removed 'implements Serializable'.
	* java/util/GregorianCalendar.java (serialVersionUID): Added.
	* java/util/Properties.java (serialVersionUID): Added.
	* java/util/Random.java (serialVersionUID): Added.
	(seed): Made private.
	(nextNextGaussian): Made private.
	(haveNextNextGaussian): Made private.
	* java/util/Stack.java (serialVersionUID): Added.
	* java/util/TimeZone.java (serialVersionUID): Added.
	* java/util/Vector.java (serialVersionUID): Added.

Serialization mods.

From-SVN: r36272
2000-09-08 19:37:09 +00:00
Tom Tromey 23e9541117 ZipFile.java (ZipFile): Delete file when opened in DELETE mode.
* java/util/zip/ZipFile.java (ZipFile): Delete file when opened in
	DELETE mode.

From-SVN: r36144
2000-09-04 21:20:27 +00:00
Tom Tromey 2ed885df76 BitMaskExtent.java, [...]: Removed Latin-1 copyright symbols.
* gnu/gcj/awt/BitMaskExtent.java, gnu/gcj/awt/Buffers.java,
	gnu/gcj/awt/ComponentDataBlitOp.java,
	gnu/gcj/awt/GLightweightPeer.java, java/awt/Graphics2D.java,
	java/awt/RenderingHints.java, java/awt/color/ColorSpace.java,
	java/awt/color/ICC_ColorSpace.java,
	java/awt/color/ICC_Profile.java,
	java/awt/image/BufferedImage.java, java/awt/image/ColorModel.java,
	java/awt/image/ComponentColorModel.java,
	java/awt/image/ComponentSampleModel.java,
	java/awt/image/DataBuffer.java,
	java/awt/image/DataBufferByte.java,
	java/awt/image/DataBufferInt.java,
	java/awt/image/DataBufferUShort.java,
	java/awt/image/DirectColorModel.java,
	java/awt/image/IndexColorModel.java,
	java/awt/image/PackedColorModel.java, java/awt/image/Raster.java,
	java/awt/image/RasterOp.java, java/awt/image/SampleModel.java,
	java/awt/image/SinglePixelPackedSampleModel.java,
	java/awt/image/WritableRaster.java, java/util/zip/ZipFile.java:
	Removed Latin-1 copyright symbols.
	* java/util/zip/ZipFile.java: Indentation fixes.

From-SVN: r36027
2000-08-29 03:23:57 +00:00
Mark Wielaard 9ac96ca1f4 ZipFile.java: Implement OPEN_DELETE mode...
* java/util/zip/ZipFile.java: Implement OPEN_DELETE mode, new constructor,
    close can delete the file, finalize calls close.
    * java/util/jar/JarFile.java: Constructor that takes mode now calls super.

From-SVN: r36007
2000-08-27 22:26:27 +00:00
Anthony Green 6f09c30717 ArrayList.java, [...]: Imported from GNU Classpath.
2000-08-27  Anthony Green  <green@redhat.com>

	* java/util/ArrayList.java, java/util/Timer.java,
	java/util/LinkedList.java, java/util/TimerTask.java,
	java/util/HashMap.java, java/util/AbstractMap.java,
	java/util/SortedMap.java, java/util/AbstractSequentialList.java,
	java/util/SortedSet.java: Imported from GNU Classpath.
	* Makefile.in: Rebuilt.
	* Makefile.am: Added new files.

From-SVN: r36006
2000-08-27 22:06:44 +00:00
Mark Wielaard 309bf2960a InflaterInputStream.java (read(byte[],int,int)): return -1 when fill() has no more data for the Inflater.
* java/util/zip/InflaterInputStream.java (read(byte[],int,int)):
	return -1 when fill() has no more data for the Inflater.

From-SVN: r35963
2000-08-24 22:48:12 +00:00
Tom Tromey 6c531b0556 ResourceBundle.java (trySomeGetBundle): Removed debugging prints.
* java/util/ResourceBundle.java (trySomeGetBundle): Removed
	debugging prints.

From-SVN: r35859
2000-08-21 21:25:55 +00:00
Anthony Green 1a558147d1 natSystem.cc (init_properties): Change sourceware reference to sources.redhat.com.
Sun Aug 20 21:02:48 2000  Anthony Green  <green@redhat.com>

	* java/lang/natSystem.cc (init_properties): Change sourceware
	reference to sources.redhat.com.

	* include/java-props.h: Add _Jv_Jar_Class_Path.
	* prims.cc: Ditto.  Set it from	`gij -jar file' option.

	* java/lang/natSystem.cc (init_properties): Set java.class.path
	from
	{gij -jar file}:{CLASSPATH variable}:{-Djava.class.path= or .}

	* java/util/PropertyPermission.java: Import from GNU Classpath.
	* Makefile.in: Rebuilt.
	* Makefile.am: Add java/util/PropertyPermission.java.
	* java/lang/System.java: Add setProperty method.

	* gij.cc (main): Add -jar option to execute jar files.
	(help): Describe -jar option.
	* prims.cc (_Jv_RunMain): Add support for jar execution mode.
	* gnu/gcj/tools/Gij.java: New file.
	* include/jvm.h: Add is_jar argument to _Jv_RunMain.
	* gnu/gcj/runtime/FirstThread.java (main): New method.

	* java/util/jar/Attributes.java: Correct comment spelling.

From-SVN: r35829
2000-08-21 06:05:20 +00:00
Mark Wielaard 8559f9bb2f Adler32.java: Make private variables really private
2000-08-20  Mark Wielaard  <mark@klomp.org>

    * java/util/zip/Adler32.java: Make private variables really private
    * java/util/zip/CRC32.java: Make private variables really private
    * java/util/zip/CheckedInputStream.java: skip() could skip to much bytes
    * java/util/zip/InflaterInputStream.java: skip() could skip to much bytes
    * java/util/zip/ZipEntry.java: setCompressedSize() didn't check input
    * java/util/zip/ZipFile.java: size() new 1.2 method
    * java/util/zip/ZipInputStream.java: Use createZipEntry not new ZipEntry.
    since 1.2 available() always returns just 1 or 0 when closed

From-SVN: r35826
2000-08-20 21:51:19 +00:00
Anthony Green 53e687fabb JarFile.java: Don't call java.util.zip.ZipFile.getEntry twice.
* java/util/jar/JarFile.java: Don't call
        java.util.zip.ZipFile.getEntry twice.  From Mark Wielaard
        <mark@klomp.org>.

From-SVN: r35824
2000-08-20 19:40:25 +00:00
Anthony Green f2e541ce26 URLClassLoader.java: Find the JarEntry via the JarFile.
Sun Aug 20 09:51:48 2000  Anthony Green  <green@redhat.com>

        * java/net/URLClassLoader.java: Find the JarEntry via the JarFile.

        * java/net/JarURLConnection.java: getEntry doesn't take any
        arguments.  Return null if element is null.

        * java/util/zip/ZipFile.java (getInputStream): Read the compressed
        size from the archive, not the inflated size.

        * java/util/jar/JarFile.java (getEntry): Don't recurse.  Call
        java.util.zip.ZipFile.getEntry.

        * gij.cc (help): Change sourceware reference to
        sources.redhat.com.

From-SVN: r35821
2000-08-20 17:49:12 +00:00
Tom Tromey ea70900954 ZipInputStream.java (createZipEntry): Implemented.
* java/util/zip/ZipInputStream.java (createZipEntry):
	Implemented.

From-SVN: r35810
2000-08-19 19:54:36 +00:00
Anthony Green a729a4e9ab Attributes.java, [...]: Imported from Classpath.
Sat Aug 19 11:00:53 2000  Anthony Green  <green@redhat.com>

	* java/util/jar/Attributes.java, java/util/jar/JarEntry.java,
	java/util/jar/JarException.java, java/util/jar/JarFile.java,
	java/util/jar/JarInputStream.java,
	java/util/jar/JarOutputStream.java, java/util/jar/Manifest.java,
	java/util/Set.java, java/util/Map.java, java/util/Bucket.java,
	java/util/AbstractSet.java, java/util/BasicMapEntry.java,
	java/security/cert/CRL.java, java/security/cert/CRLException.java,
	java/security/cert/Certificate.java,
	java/security/cert/CertificateEncodingException.java,
	java/security/cert/CertificateException.java,
	java/security/cert/CertificateExpiredException.java,
	java/security/cert/CertificateFactory.java,
	java/security/cert/CertificateFactorySpi.java,
	java/security/cert/CertificateNotYetValidException.java,
	java/security/cert/CertificateParsingException.java,
	java/security/cert/X509CRL.java,
	java/security/cert/X509CRLEntry.java,
	java/security/cert/X509Certificate.java,
	java/security/cert/X509Extension.java: Imported from Classpath.
	* java/util/Hashtable.java: Imported from Classpath.

	* java/util/zip/ZipInputStream.java: Create stub for
	createZipEntry.

	* gcj/javaprims.h: Updated class list.

	* Makefile.in, gcj/Makefile.in: Rebuilt.
	* Makefile.am (ordinary_java_source_files): Add these new classes.

From-SVN: r35809
2000-08-19 18:19:42 +00:00
Tom Tromey 75723df4d3 * java/util/Vector.java (remove(Object)): Implemented.
From-SVN: r35148
2000-07-20 19:27:57 +00:00
Bryce McKinlay c7a136d3ef Big AWT patch.
From-SVN: r34976
2000-07-12 04:32:07 +01: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
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 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
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
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
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 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
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
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 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
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 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 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 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 7c734b1758 * All files: Updated copyright to reflect Cygnus purchase.
From-SVN: r31504
2000-01-19 18:39:27 +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
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 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 27e934d8ba configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Build include/Makefile.
	* Makefile.in: Rebuilt.
	* Makefile.am (SUBDIRS): Added gcj and include.
	(install-data-local): New target.
	(extra_headers): New macro.
	* include/Makefile.in: New file.
	* include/Makefile.am: New file.

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

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

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

From-SVN: r29278
1999-09-10 22:03:10 +00:00
Alexandre Oliva b78639f6f2 Added missing whitespace in function calls within adaptors
Pointed out by Tom

From-SVN: r28803
1999-08-22 16:19:31 +00:00
Alexandre Oliva fb82082db3 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: r28790
1999-08-21 11:56:24 +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
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
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
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 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 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 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
Per Bothner 8bb61fb953 Calendar.java (set): First call computeFields if needed.
x
	* java/util/Calendar.java (set):  First call computeFields if needed.
	* java/util/natGregorianCalendar.cc (computeTime):  Cast 1000 to jlong.

From-SVN: r26910
1999-05-12 11:01:31 -07:00