Mark Wielaard
92aaa24628
Add license clarification.
...
From-SVN: r49104
2002-01-22 22:40:42 +00:00
Tom Tromey
3bd483f2a1
Start of AWT merge with Classpath:
...
* Makefile.in: Rebuilt.
* Makefile.am (awt_java_source_files): Reference files in
gnu/java/awt, not gnu/gcj/awt.
* java/awt/image/BufferedImage.java: Updated copyright.
* java/awt/image/ComponentColorModel.java: Updated copyright.
* java/awt/image/ComponentSampleModel.java: Updated copyright.
* java/awt/image/DataBuffer.java: Updated copyright.
* java/awt/image/DataBufferByte.java: Updated copyright.
* java/awt/image/DataBufferInt.java: Updated copyright.
* java/awt/image/DataBufferUShort.java: Updated copyright.
* java/awt/image/IndexColorModel.java: Updated copyright.
* java/awt/image/PackedColorModel.java: Updated copyright.
* java/awt/image/Raster.java: Updated copyright.
* java/awt/image/RasterOp.java: Updated copyright.
* java/awt/image/SampleModel.java: Updated copyright.
* java/awt/image/SinglePixelPackedSampleModel.java: Updated copyright.
* java/awt/image/WritableRaster.java: Updated copyright.
* java/awt/color/ColorSpace.java: Updated copyright.
* java/awt/color/ICC_ColorSpace.java: Updated copyright
* java/awt/color/ICC_Profile.java: Updated copyright.
* java/awt/event/HierarchyBoundsAdapter.java: Updated copyright.
* java/awt/event/HierarchyBoundsListener.java: Updated copyright.
* java/awt/event/HierarchyEvent.java: Updated copyright.
* java/awt/event/HierarchyListener.java: Updated copyright.
* java/awt/geom/AffineTransform.java: Updated copyright.
* java/awt/geom/Dimension2D.java: Updated copyright.
* java/awt/geom/Ellipse2D.java: Updated copyright.
* java/awt/geom/IllegalPathStateException.java: Updated copyright.
* java/awt/geom/Line2D.java: Updated copyright.
* java/awt/geom/NoninvertibleTransformException.java: Updated
copyright.
* java/awt/geom/PathIterator.java: Updated copyright.
* java/awt/geom/Point2D.java: Updated copyright.
* java/awt/geom/Rectangle2D.java: Updated copyright.
* java/awt/geom/RectangularShape.java: Updated copyright.
* java/awt/geom/RoundRectangle2D.java: Updated copyright.
* java/awt/Toolkit.java: Updated import for file moves.
* java/awt/Rectangle.java: Updated copyright; added javadoc from
Classpath.
(hashCode): New method from Classpath.
* java/awt/Graphics2D.java: Updated copyright.
* java/awt/Transparency.java: Updated copyright.
* java/awt/Paint.java: Updated copyright.
* java/awt/Graphics.java: New version from Classpath.
* java/awt/EventDispatchThread.java: Updated copyright.
* java/awt/CardLayout.java (layoutContainer): Don't skip invisible
children.
(gotoComponent): Wrap around on next/previous.
* gnu/gcj/awt/BitMaskExtent.java: Removed.
* gnu/gcj/awt/Buffers.java: Removed.
* gnu/gcj/awt/ComponentDataBlitOp.java: Removed.
* gnu/gcj/awt/GLightweightPeer.java: Removed.
* gnu/java/awt/BitMaskExtent.java: Added.
* gnu/java/awt/Buffers.java: Added.
* gnu/java/awt/ComponentDataBlitOp.java: Added.
* gnu/java/awt/GLightweightPeer.java: Added.
* java/awt/geom/Line2D.java (clone): Ignore
CloneNotSupportedException.
* gnu/gcj/awt/GLightweightPeer.java (getColorModel): New method.
* java/awt/Frame.java: Merged with Classpath.
* java/awt/RenderingHints.java: Copyright update.
* java/awt/Paint.java: Copyright update.
* java/awt/image/DirectColorModel.java: Merged with Classpath.
* java/awt/image/ColorModel.java: Merged with Classpath.
* java/awt/Window.java (show): New Implementation from Classpath.
(isShowing): Use super.isShowing().
* java/awt/EventQueue.java: Merged with Classpath.
* java/awt/AWTEventMulticaster.java (save): Throw
RuntimeException.
(saveInternal): Likewise.
* java/awt/AWTEvent.java: Now implements Serializable.
* java/awt/Event.java: Copyright update.
* java/awt/peer/ComponentPeer.java: Merged with Classpath.
* java/awt/image/BufferedImage.java: Copyright update.
* java/awt/GraphicsConfiguration.java: Copyright update.
* java/awt/Component.java: (addNotify): Don't call
addNotifyContainerChildren().
(addNotifyContainerChildren): Removed.
(setPeer): New method from Classpath.
(setTreeLock): Likewise.
(setVisible): Rewrote.
(show): Use it.
(hide): Likewise.
(validate): Set `valid'.
(checkImage(Image,ImageObserver)): Implementation from Classpath.
(createImage(ImageProducer)): Likewise.
(prepareImage): Likewise.
* java/awt/Container.java (addImpl): Handle case where constraint
is not a String. Post event via system event queue.
(remove): Post event via system event queue.
(validateTree): Only validate child if it is invalid.
(getAlignmentX): Call super method as default.
(getAlignmentY): Likewise.
(addContainerListener): Now synchronized.
(removeContainerListener): Likewise.
(addNotifyContainerChildren): Now private.
* java/awt/ComponentOrientation.java: Updated copyright. Added
@author.
* java/awt/FlowLayout.java (serialVersionUID): New field.
(setAlignment): Better exception message.
(layoutContainer): Don't compute component's preferred size unless
we're going to use it.
* java/awt/BorderLayout.java (AFTER_LAST_LINE, AFTER_LINE_ENDS,
BEFORE_FIRST_LINE, BEFORE_LINE_BEGINS): New constants.
(firstLine, lastLine, firstItem, lastItem): New fields.
(addLayoutComponent): Handle case where constraints is null.
Also, handle relative locations.
(removeLayoutComponent): Handle relative locations.
(MIN, MAX, PREF): New constants.
(calcCompSize): New method.
(calcSize): New method.
(minimumLayoutSize): Use it.
(preferredLayoutSize): Likewise.
(maximumLayoutSize): Likewise.
(toString): Include more information.
(setBounds): New method.
(layoutContainer): Use libgcj implementation; extended to handle
relative locations.
From-SVN: r48896
2002-01-16 04:21:35 +00:00
Tom Tromey
346a81f0a5
Convert.java (version): Use java.vm.name property.
...
* gnu/gcj/convert/Convert.java (version): Use java.vm.name
property.
(help, version): Use println(), not println("").
From-SVN: r48739
2002-01-10 17:56:26 +00:00
Tom Tromey
54a8a50f80
For PR libgcj/5303:
...
* gnu/gcj/convert/Convert.java (error): Program is called
`jv-convert'. Print GNU-style message. Exit with status 1, not
-1.
(main): Handle --help and --version.
(help): New method.
(version): Likewise.
From-SVN: r48703
2002-01-10 00:39:16 +00:00
Tom Tromey
495513eea6
Makefile.in: Rebuilt.
...
* Makefile.in: Rebuilt.
* Makefile.am (ordinary_java_source_files): Removed old file;
added new file.
* gnu/java/math/MPN.java: New file.
* gnu/gcj/math/MPN.java: Removed.
* java/math/BigInteger.java: Merged with Classpath.
From-SVN: r48080
2001-12-16 22:25:14 +00:00
Tom Tromey
a46ce590a8
* gnu/gcj/runtime/StringBuffer.java
...
(ensureCapacity_unsynchronized): Ensure we always get at least
`minimumCapacity' characters in new buffer.
From-SVN: r47940
2001-12-12 16:50:01 +00:00
Tom Tromey
50cc5dd29b
String.java (String): New constructor.
...
* java/lang/String.java (String): New constructor.
* gnu/gcj/runtime/natStringBuffer.cc: New file.
* gnu/gcj/runtime/StringBuffer.java: New file.
* Makefile.in: Rebuilt.
* Makefile.am (ordinary_java_source_files): Added
gnu/gcj/runtime/StringBuffer.java.
(nat_source_files): Added gnu/gcj/runtime/natStringBuffer.cc.
From-SVN: r47883
2001-12-11 18:01:40 +00:00
Per Bothner
6cc49add9c
* gnu/gcj/xlib/XImage.java (toString): Add missing initialization.
...
From-SVN: r47834
2001-12-09 23:59:48 -08:00
Tom Tromey
819138ac7b
Makefile.in: Rebuilt.
...
* Makefile.in: Rebuilt.
* Makefile.am (ordinary_java_source_files): Added JNIWeakRef.java.
* jni.cc: Include JNIWeakRef.h.
(unwrap): New function.
(_Jv_JNI_DefineClass): Use it.
(_Jv_JNI_GetSuperclass): Likewise.
(_Jv_JNI_IsAssignableFrom): Likewise.
(_Jv_JNI_Throw): Likewise.
(_Jv_JNI_ThrowNew): Likewise.
(_Jv_JNI_IsSameObject): Likewise.
(_Jv_JNI_AllocObject): Likewise.
(_Jv_JNI_GetObjectClass): Likewise.
(_Jv_JNI_IsInstanceOf): Likewise.
(_Jv_JNI_GetAnyMethodID): Likewise.
(array_from_valist): Likewise.
(_Jv_JNI_CallAnyMethodV): Likewise.
(_Jv_JNI_CallAnyMethodA): Likewise.
(_Jv_JNI_CallAnyVoidMethodV): Likewise.
(_Jv_JNI_CallAnyVoidMethodA): Likewise.
(_Jv_JNI_CallStaticMethodV): Likewise.
(_Jv_JNI_CallStaticMethod): Likewise.
(_Jv_JNI_CallStaticMethodA): Likewise.
(_Jv_JNI_NewObjectV): Likewise.
(_Jv_JNI_NewObject): Likewise.
(_Jv_JNI_NewObjectA): Likewise.
(_Jv_JNI_GetField): Likewise.
(_Jv_JNI_SetField): Likewise.
(_Jv_JNI_GetAnyFieldID): Likewise.
(_Jv_JNI_SetStaticField): Likewise.
(_Jv_JNI_GetStringLength): Likewise.
(_Jv_JNI_GetStringChars): Likewise.
(_Jv_JNI_ReleaseStringChars): Likewise.
(_Jv_JNI_GetStringUTFLength): Likewise
(_Jv_JNI_GetStringUTFChars): Likewise.
(_Jv_JNI_GetStringRegion): Likewise.
(_Jv_JNI_GetStringUTFRegion): Likewise.
(_Jv_JNI_GetStringCritical): Likewise.
(_Jv_JNI_GetArrayLength): Likewise.
(_Jv_JNI_NewObjectArray): Likewise.
(_Jv_JNI_GetObjectArrayElement): Likewise.
(_Jv_JNI_SetObjectArrayElement): Likewise.
(_Jv_JNI_GetPrimitiveArrayElements): Likewise.
(_Jv_JNI_ReleasePrimitiveArrayElements): Likewise.
(_Jv_JNI_GetPrimitiveArrayRegion): Likewise.
(_Jv_JNI_SetPrimitiveArrayRegion): Likewise.
(_Jv_JNI_MonitorEnter): Likewise.
(_Jv_JNI_MonitorExit): Likewise.
(_Jv_JNI_ToReflectedField): Likewise.
(_Jv_JNI_FromReflectedField): Likewise.
(_Jv_JNI_ToReflectedMethod): Likewise.
(_Jv_JNI_FromReflectedMethod): Likewise.
(_Jv_JNI_NewGlobalRef): Likewise.
(_Jv_JNI_DeleteGlobalRef): Likewise.
(_Jv_JNI_DeleteLocalRef): Likewise.
(_Jv_JNI_NewLocalRef): Likewise.
(_Jv_JNI_NewWeakGlobalRef): New function.
(_Jv_JNI_DeleteWeakGlobalRef): Likewise.
(_Jv_JNIFunctions): Updated for new methods.
(NOT_IMPL): Removed.
* gnu/gcj/runtime/JNIWeakRef.java: New file.
From-SVN: r46990
2001-11-13 17:43:41 +00:00
Joseph Myers
18e1f2bd67
HACKING, [...]: Fix spelling errors.
...
* HACKING, gnu/gcj/xlib/Pixmap.java, gnu/gcj/xlib/XException.java,
gnu/java/rmi/rmic/RMIC.java, java/awt/Window.java,
java/awt/AWTEvent.java, java/io/ByteArrayOutputStream.java,
java/io/CharConversionException.java,
java/io/PipedInputStream.java, java/io/PipedReader.java,
java/io/PrintWriter.java, java/io/WriteAbortedException.java,
java/io/natFileWin32.cc, java/lang/Class.h,
java/lang/natClassLoader.cc, java/lang/natObject.cc,
java/lang/Package.java, java/net/BindException.java,
java/net/ConnectException.java, java/net/ProtocolException.java,
java/net/SocketException.java,
java/net/UnknownServiceException.java,
java/security/cert/X509Certificate.java,
java/security/interfaces/DSAKey.java,
java/security/SecureRandom.java, java/security/SignedObject.java,
java/sql/DatabaseMetaData.java,
java/text/DecimalFormatSymbols.java,
java/util/jar/Attributes.java, java/util/jar/JarEntry.java,
java/util/jar/JarInputStream.java,
java/util/jar/JarOutputStream.java, java/util/Calendar.java,
java/util/Collections.java, java/util/GregorianCalendar.java,
java/util/HashMap.java, java/util/List.java,
java/util/Properties.java, java/util/Timer.java,
java/util/Vector.java, java/util/WeakHashMap.java,
javax/naming/NamingException.java,
testsuite/libjava.lang/Thread_Wait.java,
org/xml/sax/helpers/DefaultHandler.java,
org/xml/sax/HandlerBase.java, org/xml/sax/SAXParseException.java,
ChangeLog, acinclude.m4, aclocal.m4, posix-threads.cc: Fix
spelling errors.
* configure: Regenerate.
From-SVN: r46665
2001-10-31 00:48:17 +00:00
Anthony Green
ee3ef86255
fix include problem
...
From-SVN: r46459
2001-10-24 07:00:19 +00:00
Bryce McKinlay
33d4b70f02
JIS0208_to_Unicode.cc: Declare java_exceptions pragma.
...
* gnu/gcj/convert/JIS0208_to_Unicode.cc: Declare java_exceptions
pragma.
* gnu/gcj/convert/JIS0212_to_Unicode.cc: Likewise.
* gnu/gcj/convert/Unicode_to_JIS.cc: Likewise.
* gnu/gcj/convert/gen-from-JIS.c: Put java_exceptions pragma in
output file.
From-SVN: r46400
2001-10-22 06:38:25 +01:00
Tom Tromey
eeedeb5a17
natFinalizerThread.cc: New file.
...
* gnu/gcj/runtime/natFinalizerThread.cc: New file.
* java/lang/natRuntime.cc: Include FinalizerThread.h.
(runFinalization): Call finalizerReady.
* nogc.cc (_Jv_GCInitializeFinalizers): New function.
* prims.cc: Include VirtualMachineError.h, FinalizerThread.h.
(_Jv_CreateJavaVM): Start the finalizer thread.
* no-threads.cc: Include InternalError.h.
(_Jv_ThreadStart): Throw InternalError.
(_Jv_ThreadInitData): Don't throw error if this is not the first
thread.
* Makefile.in: Rebuilt.
* Makefile.am (ordinary_java_source_files): Added
FinalizerThread.java.
(nat_source_files): Added natFinalizerThread.cc.
* include/jvm.h (_Jv_GCInitializeFinalizers): Declare.
* boehm.cc (_Jv_GCInitializeFinalizers): New function.
* gnu/gcj/runtime/FirstThread.java (run): Start finalizer thread.
* gnu/gcj/runtime/FinalizerThread.java: New file.
From-SVN: r46163
2001-10-10 22:25:43 +00:00
Bryce McKinlay
218e1e912d
re PR libgcj/4383 (file: protocol not supported in URLConnection?)
...
PR libgcj/4383
* gnu/gcj/protocol/file/Connection.java (connect): Throw
FileNotFoundException if appropriate.
* gnu/gcj/protocol/file/Handler.java (openConnection): Throw an
IOException if we got a file: url with a hostname. Comment out protocol
switch to ftp for now.
* java/net/URL.java (URL): Include protocol name in exception
message
when handler can't be found.
From-SVN: r45898
2001-09-30 08:52:16 +01:00
Per Bothner
8107bcf9f3
SharedLibLoader.java: New class.
...
* gnu/gcj/runtime/SharedLibLoader.java: New class.
* gnu/gcj/runtime/natSharedLibLoader.cc: Native methods.
* Makefile.am: Update accordingly.
* configure.in: Add AC_CHECK_LIB for dlopen.
* include/config.h.in: Add HAVE_DLOPEN.
From-SVN: r45885
2001-09-29 12:16:27 -07:00
Anthony Green
bb7fd9624b
Fix null pointer bug.
...
From-SVN: r45692
2001-09-19 18:28:59 +00:00
Anthony Green
214bcb99a1
Add support for iso8859_1.
...
From-SVN: r45649
2001-09-17 02:28:53 +00:00
Anthony Green
a11e2c2279
jvm.h: Declare _Jv_RegisterResource.
...
* include/jvm.h: Declare _Jv_RegisterResource.
* gnu/gcj/Core.java, gnu/gcj/natCore.cc,
gnu/gcj/protocol/core/Connection.java,
gnu/gcj/protocol/core/Handler.java,
gnu/gcj/protocol/core/CoreInputStream.java,
gnu/gcj/protocol/core/natCoreInputStream.cc: New files.
* java/net/URL.java (setURLStreamHandler): Use
gnu.gcj.protocol.core.Handler for the core protocol.
* gnu/gcj/runtime/VMClassLoader.java (init): Add "core:/" to the
end of java.class.path.
* Makefile.am (ordinary_java_source_files): Add new java files.
(nat_source_files): Add new native code files.
* Makefile.in: Rebuilt.
From-SVN: r45450
2001-09-06 22:32:54 +00:00
Tom Tromey
a1f4e5ed0a
SimpleDateFormat.java: Re-merged with Classpath.
...
* java/text/SimpleDateFormat.java: Re-merged with Classpath.
* gnu/gcj/text/LocaleData.java, gnu/gcj/text/LocaleData_en.java,
gnu/gcj/text/LocaleData_en_US.java: Removed.
* java/text/DateFormatSymbols.java (clone): Use Classpath
implementation.
(equals): Simplified.
(DateFormatSymbols): Look in gnu.java.locale for information.
(DateFormatSymbols(DateFormatSymbols)): Removed.
(safeGetResource): Removed.
(DateFormatSymbols): Throws MissingResourceException.
(ampmsDefault, erasDefault, localPatternCharsDefault,
monthsDefault, shortMonthsDefault, shortWeekdaysDefault,
weekdaysDefault, zoneStringsDefault): Removed.
* java/text/Collator.java (getAvailableLocales): Use modified
Classpath implementation.
(getInstance): Look in gnu.java.locale for information.
(clone): Rewrote.
* java/text/MessageFormat.java: Reindented.
(clone): Rewrote.
* java/text/FieldPosition.java: Merged with Classpath.
* java/text/ParsePosition.java: Merged with Classpath.
* java/text/Format.java: Merged with Classpath.
* java/text/StringCharacterIterator.java
(StringCharacterIterator(StringCharacterIterator,int,int)): New
constructor from Classpath.
* java/text/Annotation.java,
java/text/AttributedCharacterIterator.java,
java/text/AttributedString.java,
java/text/AttributedStringIterator.java: New from Classpath.
* java/text/CharacterIterator.java: Copied from Classpath.
* java/text/ChoiceFormat.java: Reindented.
(clone): Removed.
* gnu/java/text/BaseBreakIterator.java,
gnu/java/text/CharacterBreakIterator.java,
gnu/java/text/LineBreakIterator.java,
gnu/java/text/LocaleData_en.java,
gnu/java/text/LocaleData_en_US.java,
gnu/java/text/SentenceBreakIterator.java,
gnu/java/text/WordBreakIterator.java: Renamed from gnu/gcj/text/*.
* gnu/gcj/text/BaseBreakIterator.java (last): Advance past final
character.
* java/text/BreakIterator.java (getAvailableLocales): Use
Classpath implementation.
(getInstance): Look in gnu.java.locale for information.
(getCharacterInstance, getLineInstance, getSentenceInstance,
getWordInstance): Look in gnu.java.text for implementations.
* java/text/DecimalFormatSymbols.java: Reindented
(clone): Use Classpath implementation.
(DecimalFormatSymbols(DecimalFormatSymbols)): Removed.
(DecimalFormatSymbols(Locale)): Look in gnu.java.locale for
information.
* java/text/DateFormat.java: Merged with Classpath.
(getAvailableLocales): Use Classpath implementation.
(format(Object,StringBuffer,FieldPosition)): Minor cleanup.
(computeInstance): Look in gnu.java.locale for information.
* java/text/NumberFormat.java: Reindented.
(computeInstance): Look in gnu.java.locale for information.
(getAvailableLocales): Use implementation from Classpath.
(setMaximumIntegerDigits): Likewise.
(setMinimumIntegerDigits): Likewise.
(setMaximumFractionDigits): Likewise.
(clone): Removed.
* java/text/DecimalFormat.java: Reindented.
* gnu/java/locale/LocaleInformation_en.java: Copied from Classpath.
* gnu/java/locale/LocaleInformation_en_US.java: Copied from Classpath.
* Makefile.in: Rebuilt.
* Makefile.am (ordinary_java_source_files): Added all new files.
(ordinary_java_source_files): Renamed or removed gnu/gcj/text/*.
* java/security/spec/AlgorithmParameterSpec.java,
java/security/spec/KeySpec.java: Re-merged with Classpath.
From-SVN: r45390
2001-09-05 00:00:55 +00:00
Tom Tromey
9d6466593e
re PR libgcj/4213 (SimpleDateFormat constructor SEGV's.)
...
Fix for PR libgcj/4213:
* Makefile.am (ordinary_java_source_files): Added new file.
* gnu/gcj/text/LocaleData.java: New file.
From-SVN: r45381
2001-09-04 17:18:20 +00:00
Tom Tromey
7a95ae6b51
Makefile.in: Rebuilt.
...
* Makefile.in: Rebuilt.
* Makefile.am (ordinary_java_source_files): Removed
EnumerationChain, added DoubleEnumeration.
(nat_source_files): Added natResourceBundle.cc.
* java/util/natResourceBundle.cc: New file.
* gnu/java/util/DoubleEnumeration.java: New file.
* gnu/gcj/util/EnumerationChain.java: Removed.
* java/beans/VetoableChangeSupport.java: Merged with Classpath.
* java/util/ResourceBundle.java: Merged with Classpath.
* java/util/StringTokenizer.java: Merged with Classpath.
* java/util/Locale.java: Merged with Classpath.
* java/util/Random.java: Merged with Classpath.
* java/util/PropertyResourceBundle.java: Merged with Classpath.
* java/util/ListResourceBundle.java: Merged with Classpath.
* java/util/ConcurrentModificationException.java: Re-merged with
Classpath.
* java/util/EmptyStackException.java: Likewise.
* java/util/MissingResourceException.java: Likewise.
* java/util/NoSuchElementException.java: Likewise.
* java/util/TooManyListenersException.java: Likewise.
From-SVN: r45335
2001-08-31 21:31:20 +00:00
Bryce McKinlay
2dc55bc99f
Makefile.am: New friends for java/lang/Thread.h.
...
* Makefile.am: New friends for java/lang/Thread.h.
* prims.cc (runFirst): Removed.
(JvRunMain): Merged into _Jv_RunMain. Now just calls that.
(_Jv_RunMain): Now takes either a klass or class name parameter.
Create a gnu.gcj.runtime.FirstThread and attach the native thread
to that, then run it using _Jv_ThreadRun. Remove special handling of
jar files, instead pass is_jar parameter through to FirstThread.
* gcj/javaprims.h: Add prototypes for _Jv_ThreadRun and new variant
of _Jv_AttachCurrentThread.
* gnu/gcj/runtime/FirstThread.java (FirstThread): Now extends Thread.
(run): New method. Take care of looking up main class manifest
attribute and calling forName if neccessary. Then call call_main.
(call_main): New native method.
* gnu/gcj/runtime/natFirstThread.cc (call_main): New function, code
relocated from prims.cc. Look up and call main method.
* java/lang/Thread.java (run_): Removed.
* java/lang/natThread.cc (run_): Renamed to...
(_Jv_ThreadRun): this. JVMPI notification code moved to ...
(_Jv_NotifyThreadStart): here. New function.
(countStackFrames, destroy, resume, suspend, stop): Throw
UnsupportedOperationExceptions rather than JvFail'ing.
(_Jv_AttachCurrentThread): New variant takes a Thread argument.
Existing version wraps new variant.
From-SVN: r45182
2001-08-26 12:30:09 +01: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
Tom Tromey
d1356866eb
* gnu/gcj/convert/IOConverter.java: Add `646' alias.
...
From-SVN: r44965
2001-08-17 18:09:24 +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
Loren J. Rittle
6e15d3a83a
* gnu/gcj/convert/natIconv.cc (done): Use HAVE_ICONV.
...
From-SVN: r44772
2001-08-10 17:39:34 +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
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
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
Per Bothner
c93d7fae7b
Implement invocation interface; don't create new thread for main.
...
From-SVN: r42428
2001-05-21 23:47:48 -07:00
Tom Tromey
8ffd89ad1b
* gnu/gcj/runtime/VMClassLoader.java (VMClassLoader): Now public.
...
From-SVN: r42405
2001-05-21 19:27:10 +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
Bryce McKinlay
28f7d9d05a
decl.c (init_decl_processing): Add new class "protectionDomain" field.
...
gcc/java:
2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* decl.c (init_decl_processing): Add new class "protectionDomain"
field.
* class.c (make_class_data): Set initial value for "protectionDomain".
libjava:
2001-04-25 Bryce McKinlay <bryce@albatross.co.nz>
java.security merge and ClassLoader compliance fixes.
* java/lang/Class.h (Class): Include ProtectionDomain.h.
New protectionDomain field.
(forName): Add initialize parameter. Fixes declaration to comply with
JDK spec.
* java/lang/natClass.cc (forName): Correct declaration of the three-arg
variant. Honour "initialize" flag.
(getProtectionDomain0): New method.
* java/lang/Class.java: Fix forName() declaration.
(getPackage): New method based on Classpath implementation.
(getProtectionDomain0): New native method decl.
(getProtectionDomain): New method.
* java/lang/ClassLoader.java (getParent): Now final.
(definedPackages): New field.
(getPackage): New.
(defineClass): New variant with protectionDomain argument.
(definePackage): New.
(getPackages): New.
(findSystemClass): Now final.
(getSystemResourceAsStream): Remove redundant "final" modifier.
(getSystemResource): Remove redundant "final" modifier.
(getResources): Now final.
(protectionDomainPermission): New static field.
(unknownProtectionDomain): Ditto.
(defaultProtectionDomain): Ditto.
(getSystemClassLoader): Now non-native.
* java/util/ResourceBundle.java (tryGetSomeBundle): Use the correct
arguments for Class.forName().
* java/lang/Package.java: New file.
* gnu/gcj/runtime/VMClassLoader.java (getVMClassLoader): Removed.
(instance): Static initialize singleton.
(findClass): Override this, not findSystemClass.
* java/lang/natClassLoader.cc (defineClass0): Set class's
protectionDomain field as specified.
(getSystemClassLoader): Removed.
(findClass): Renamed from findSystemClass. Call the interpreter via
URLClassLoader.findClass if loading class via dlopen fails.
* java/security/*.java: java.security import/merge with Classpath.
* java/security/acl/*.java: Likewise.
* java/security/interfaces/*.java: Likewise.
* java/security/spec/*.java: Likewise.
* java/net/NetPermission.java: Likewise.
* java/net/SocketPermission.java: Likewise.
* gnu/java/security/provider/DefaultPolicy.java: Likewise.
* Makefile.am: Add new classes.
* Makefile.in: Rebuilt.
* gcj/javaprims.h: CNI namespace rebuild.
From-SVN: r41543
2001-04-25 16:45:15 +01:00
Richard Henderson
b3208f56cb
exception.cc (java_eh_info): Make value type jthrowable.
...
* exception.cc (java_eh_info): Make value type jthrowable.
(_Jv_type_matcher): Remove now unneeded cast.
(_Jv_Throw): Make argument type jthrowable. Munge name
for SJLJ_EXCEPTIONS here ...
* gcj/cni.h: ... not here.
(JvThrow): Remove.
* gcj/javaprims.h (_Jv_Throw, _Jv_Sjlj_Throw): Update declarations.
* defineclass.cc, interpret.cc, jni.cc, posix-threads.cc,
prims.cc, resolve.cc, gnu/gcj/runtime/natFirstThread.cc,
gnu/gcj/xlib/natDrawable.cc, gnu/gcj/xlib/natFont.cc,
gnu/gcj/xlib/natWMSizeHints.cc, gnu/gcj/xlib/natWindowAttributes.cc,
gnu/gcj/xlib/natXImage.cc, java/io/natFile.cc,
java/io/natFileDescriptorEcos.cc, java/io/natFileDescriptorPosix.cc,
java/io/natFileDescriptorWin32.cc, java/io/natFileWin32.cc,
java/lang/natClass.cc, java/lang/natClassLoader.cc,
java/lang/natDouble.cc, java/lang/natObject.cc,
java/lang/natPosixProcess.cc, java/lang/natRuntime.cc,
java/lang/natString.cc, java/lang/natSystem.cc,
java/lang/natThread.cc, java/lang/reflect/natArray.cc,
java/lang/reflect/natConstructor.cc, java/lang/reflect/natField.cc,
java/lang/reflect/natMethod.cc, java/util/zip/natDeflater.cc,
java/util/zip/natInflater.cc:
Use throw, not JvThrow or _Jv_Throw.
From-SVN: r40838
2001-03-25 23:05:32 -08:00
Mark Wielaard
082a12bce7
natClass.cc (_Jv_CheckCast): add class names to exception
...
* java/lang/natClass.cc (_Jv_CheckCast): add class names to exception
* gnu/gcj/runtime/FirstThread.java (main): replace / with . in jarMainClassName
From-SVN: r40604
2001-03-18 23:07:57 +00:00
Per Bothner
c04278f74f
Changes merged from Kawa's gnu.math.
...
* java/math/BigInteger.java
* gnu/gcj/math/MPN.java (rshift0): New method handles zero shift count.
(rshift(int[],int[],int,int): Removed - not needed.
(gcd): Use rshift0 rather than rshift.
* java/math/BigInteger.java (setShiftRight): Likewise.
(divide): Simplify by using rshift0.
(divide): Zero-extend results if high-order bit set.
From-SVN: r40177
2001-03-01 22:55:33 -08:00
Warren Levy
3824a48600
re PR libgcj/1411 (natTimeZone.cc should be removed)
...
Fix for PR libgcj/1411:
* Makefile.am: Removed java/util/natTimeZone.cc.
* Makefile.in: Rebuilt.
* gnu/gcj/text/LocaleData_en_US.java (zoneStringsDefault): Added
missing localized timezone names.
* java/lang/System.java (getDefaultTimeZoneId): New private method.
* java/lang/natSystem.cc (getSystemTimeZone): New private method.
(init_properties): Set user.timezone property.
* java/text/DateFormatSymbols.java (zoneStringsDefault): Added
default timezone names; removed non-standard ones. Use standard
ID names per JCL.
* java/util/Date.java (toGMTString): Removed zoneGMT variable.
(UTC): Ditto.
* java/util/TimeZone.java: Add standard ID names per JCL; removed
non-standard ones.
(getDefaultTimeZoneId): Removed.
(zoneGMT): Removed.
(getDefaultTimeZoneId): Removed.
* java/util/natTimeZone.cc: Removed.
From-SVN: r38816
2001-01-09 07:07:51 +00:00
Tom Tromey
d65b78c9a4
FirstThread.java (Kcert, [...]): New static final fields.
...
* gnu/gcj/runtime/FirstThread.java (Kcert, Kfile, Khttp, Kjar):
New static final fields.
From-SVN: r38200
2000-12-12 00:32:02 +00:00
Warren Levy
a22add7268
Makefile.am: Added natTimeZone.cc.
...
* Makefile.am: Added natTimeZone.cc.
* Makefile.in: Rebuilt.
* gnu/gcj/text/LocaleData_en.java: Added DateFormat entries.
* java/text/DateFormatSymbols.java (ampms): Made package private.
(eras): Made package private.
(months): Made package private.
(shortMonths): Made package private.
(shortWeekdays): Made package private.
(weekdays): Made package private.
(formatPrefixes): New private field.
(localPatternCharsDefault): Made private.
(dateFormats): New package private field.
(timeFormats): New package private field.
(formatsForKey): New private method.
(DateFormatSymbols(Locale)): Set dateFormats and timeFormats.
(DateFormatSymbols(DateFormatSymbols)): Ditto.
* java/text/SimpleDateFormat.java: Merged with Classpath.
* java/util/TimeZone.java: Merged with Classpath.
* java/util/natTimeZone.cc: New file.
From-SVN: r37808
2000-11-28 03:09:22 +00:00
Tom Tromey
f92351d76e
encodings.pl: Added `ASCII' alias.
...
* scripts/encodings.pl: Added `ASCII' alias.
* Makefile.in: Rebuilt.
* Makefile.am (convert_source_files): Added new files.
* gnu/gcj/convert/Input_ASCII.java: New file.
* gnu/gcj/convert/Output_ASCII.java: New file.
* gnu/gcj/convert/Output_8859_1.java (write): Use `?' to represent
out-of-range characters.
* gnu/gcj/convert/natIconv.cc (iconv_init): New method.
(read): Swap bytes if required. Treat `count' as character count,
not byte count.
(write): Likewise. Also, handle case where iconv fails on a given
character.
(init): Put encoding into exception.
* gnu/gcj/convert/IOConverter.java (iconv_byte_swap): New global.
(static): Call iconv_init. Rebuilt alias list.
(iconv_init): New private method.
From-SVN: r37190
2000-11-01 17:00:02 +00:00
Rolf W. Rasmussen
2622c79d2d
Makefile.am: Added rules for libgcjx library.
...
* Makefile.am: Added rules for libgcjx library.
* Makefile.in: Rebuilt.
* configure.in: Added check for X.
* configure: Rebuilt.
* gnu/awt/LightweightRedirector.java: New file.
* gnu/awt/j2d/AbstractGraphicsState.java: New file.
* gnu/awt/j2d/DirectRasterGraphics.java: New file.
* gnu/awt/j2d/Graphics2DImpl.java: New file.
* gnu/awt/j2d/IntegerGraphicsState.java: New file.
* gnu/awt/j2d/MappedRaster.java: New file.
* gnu/awt/xlib/XCanvasPeer.java: New file.
* gnu/awt/xlib/XEventLoop.java: New file.
* gnu/awt/xlib/XEventQueue.java: New file.
* gnu/awt/xlib/XFontMetrics.java: New file.
* gnu/awt/xlib/XFramePeer.java: New file.
* gnu/awt/xlib/XGraphics.java: New file.
* gnu/awt/xlib/XGraphicsConfiguration.java: New file.
* gnu/awt/xlib/XPanelPeer.java: New file.
* gnu/awt/xlib/XToolkit.java: New file.
* gnu/gcj/xlib/Clip.java: New file.
* gnu/gcj/xlib/Colormap.java: New file.
* gnu/gcj/xlib/Display.java: New file.
* gnu/gcj/xlib/Drawable.java: New file.
* gnu/gcj/xlib/Font.java: New file.
* gnu/gcj/xlib/GC.java: New file.
* gnu/gcj/xlib/Pixmap.java: New file.
* gnu/gcj/xlib/Screen.java: New file.
* gnu/gcj/xlib/Visual.java: New file.
* gnu/gcj/xlib/WMSizeHints.java: New file.
* gnu/gcj/xlib/Window.java: New file.
* gnu/gcj/xlib/WindowAttributes.java: New file.
* gnu/gcj/xlib/XAnyEvent.java: New file.
* gnu/gcj/xlib/XButtonEvent.java: New file.
* gnu/gcj/xlib/XColor.java: New file.
* gnu/gcj/xlib/XConfigureEvent.java: New file.
* gnu/gcj/xlib/XConnectException.java: New file.
* gnu/gcj/xlib/XEvent.java: New file.
* gnu/gcj/xlib/XException.java: New file.
* gnu/gcj/xlib/XExposeEvent.java: New file.
* gnu/gcj/xlib/XID.java: New file.
* gnu/gcj/xlib/XImage.java: New file.
* gnu/gcj/xlib/XUnmapEvent.java: New file.
* gnu/gcj/xlib/natClip.cc: New file.
* gnu/gcj/xlib/natColormap.cc: New file.
* gnu/gcj/xlib/natDisplay.cc: New file.
* gnu/gcj/xlib/natDrawable.cc: New file.
* gnu/gcj/xlib/natFont.cc: New file.
* gnu/gcj/xlib/natGC.cc: New file.
* gnu/gcj/xlib/natPixmap.cc: New file.
* gnu/gcj/xlib/natScreen.cc: New file.
* gnu/gcj/xlib/natVisual.cc: New file.
* gnu/gcj/xlib/natWMSizeHints.cc: New file.
* gnu/gcj/xlib/natWindow.cc: New file.
* gnu/gcj/xlib/natWindowAttributes.cc: New file.
* gnu/gcj/xlib/natXAnyEvent.cc: New file.
* gnu/gcj/xlib/natXButtonEvent.cc: New file.
* gnu/gcj/xlib/natXColor.cc: New file.
* gnu/gcj/xlib/natXConfigureEvent.cc: New file.
* gnu/gcj/xlib/natXException.cc: New file.
* gnu/gcj/xlib/natXExposeEvent.cc: New file.
* gnu/gcj/xlib/natXImage.cc: New file.
* gnu/gcj/xlib/natXUnmapEvent.cc: New file.
* java/awt/EventDispatchThread.java: Start thead on creation.
From-SVN: r37005
2000-10-22 17:46:09 +00:00
Warren Levy
01ce962b94
LocaleData_en.java (monetarySeparator): Added.
...
* gnu/gcj/text/LocaleData_en.java (monetarySeparator): Added.
* java/sql/Date.java (serialVersionUID): New field.
* java/sql/Time.java (serialVersionUID): New field.
* java/sql/Timestamp.java (serialVersionUID): New field.
* java/text/ChoiceFormat.java (serialVersionUID): New field.
* java/text/DateFormat.java (getDateTimeInstance (int)): Removed.
* java/text/DateFormatSymbols.java (serialVersionUID): New field.
* java/text/DecimalFormat.java (serialVersionOnStream): New field.
(readObject): New serialization method.
* java/text/DecimalFormatSymbols.java (monetarySeparator): New field.
(serialVersionOnStream): New field.
(readObject): New serialization method.
(getMonetaryDecimalSeparator): New method.
(setMonetaryDecimalSeparator): New method.
* java/text/NumberFormat.java (maxFractionDigits): New field.
(maxIntegerDigits): New field.
(minFractionDigits): New field.
(minIntegerDigits): New field.
(serialVersionOnStream): New field.
(serialVersionUID): New field.
(readObject): New serialization method.
(writeObject): New serialization method.
* java/text/SimpleDateFormat.java (defaultCenturyStart): Initialized.
(serialVersionOnStream): New field.
(serialVersionUID): New field.
(readObject): New serialization method.
Serialization mods.
From-SVN: r36831
2000-10-10 23:09:08 +00:00
Tom Tromey
cfa82f4d03
* gnu/gcj/convert/natIconv.cc (init): Terminate buffer.
...
From-SVN: r36733
2000-10-05 21:32:09 +00:00
Tom Tromey
fe5e3b9714
BytesToUnicode.java (getDefaultDecoder): Let default decoder use iconv.
...
* gnu/gcj/convert/BytesToUnicode.java (getDefaultDecoder): Let
default decoder use iconv.
* gnu/gcj/convert/UnicodeToBytes.java (getDefaultEncoder):
Let default encoder use iconv.
* configure: Rebuilt.
* configure.in: Check for nl_langinfo and <langinfo.h>.
* java/lang/natSystem.cc (file_encoding): New function.
(DEFAULT_FILE_ENCODING): Define to file_encoding() if possible.
From-SVN: r36306
2000-09-11 00:35:51 +00:00
Bryce McKinlay
820112852a
natIconv.cc (read): Remove unused local.
...
2000-09-05 Bryce McKinlay <bryce@albatross.co.nz>
* gnu/gcj/convert/natIconv.cc (read): Remove unused local.
(write): Ditto.
* gnu/gcj/runtime/FileDeleter.java (deleteOnExitNow): Check for null
stack. Synchronize.
* java/lang/fdlibm.h: #undef __P if previously defined.
* java/lang/natSystem.cc (currentTimeMillis): Remove unused local.
* java/net/natPlainDatagramSocketImpl.cc (send): Remove unreachable
block.
(mcastGrp): Ditto.
From-SVN: r36158
2000-09-05 12:05:59 +01:00
Anthony Green
890a31f478
File.java (deleteOnExit): New method.
...
* java/io/File.java (deleteOnExit): New method.
* gnu/gcj/runtime/FileDeleter.java: New class.
* java/lang/natRuntime.cc (exit): Call
FileDeleter.deleteOnExitNow()
* Makefile.am: Add FileDeleter.java.
* Makefile.in: Rebuilt.
From-SVN: r36141
2000-09-04 16:55:48 +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
Anthony Green
6aaeb97551
Makefile.in: Rebuilt.
...
2000-08-26 Anthony Green <green@redhat.com>
* Makefile.in: Rebuilt.
* Makefile.am (java/lang/ClassLoader.h): Make _Jv_RunMain a
friend.
* prims.cc: Include ClassLoader.h.
(_Jv_RunMain): When executing jar files, classpath must be the jar
file only. Lose our reference to the system ClassLoader in order
to get a new one with the correct classpath.
* java/lang/natSystem.cc (init_properties): When executing a jar
file, only use the jar file for java.class.path.
* gnu/gcj/runtime/VMClassLoader.java: Use the canonical file name
for bytecode archives.
* gnu/gcj/runtime/FirstThread.java: Handle case where manifest
exists, but not Main-Class.
From-SVN: r35999
2000-08-26 19:25:13 +00:00
Alexandre Petit-Bianco
6d958acf09
NativeThread.java (NativeThread): Removed assignment to alive_flag', call
init'.
...
2000-08-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* gnu/gcj/jni/NativeThread.java (NativeThread): Removed assignment
to `alive_flag', call `init'.
(init): New native method.
* gnu/gcj/jni/natNativeThread.cc (init): New native method
implementation.
(http://sources.redhat.com/ml/java-patches/2000-q3/msg00142.html )
From-SVN: r35931
2000-08-23 19:16:57 -07:00