2003-08-31 Ingo Proetel <proetel@aicas.com>
* java/util/logging/Logger.java: provide class and method information
* java/util/logging/LogManager.java: create handlers
* java/util/logging/SimpleFormatter.java: print souceClassName and
sourceMethodName
From-SVN: r70960
* win32.cc: fixed tab, indentation and whitespace
inconsistencies
removed jvm.h include
added includes java/lang/UnsupportedOperationException.h,
java/io/IOException.h, java/net/SocketException.h
(WSAEventWrapper): class implementation
(_Jv_WinStrError): implemented both overloads
(_Jv_ThrowIOException): implemented both overloads
(_Jv_ThrowSocketException): implemented both overloads
(_Jv_select): implemented
* include/win32.h: fixed tab, indentation and whitespace
inconsistencies
wrapped <windows.h> include with #define WIN32_LEAN_AND_MEAN
added jvm.h include
(WSAEventWrapper): added class declaration
(_Jv_WinStrError): added both overload declarations
(_Jv_ThrowIOException): added both overload declarations
(_Jv_ThrowSocketException): added both overload declarations
removed ENOTCONN, ECONNRESET and ENOPROTOOPT defines
(_Jv_select): added declaration
(_Jv_socket): removed
(_Jv_connect): removed
(_Jv_close): removed
(_Jv_bind): removed
(_Jv_accept): removed
(_Jv_listen): removed
(_Jv_write): removed
(_Jv_read): removed
* java/io/natFileDescriptorWin32.cc: fixed tab, indentation and
whitespace inconsistencies
replaced <windows.h> #include with <platform.h>
removed jvm.h include
(testCanUseGetHandleInfo): new function which tests whether Win32
GetHandleInformation() call can be used with console buffer handles
(only supported on >=WinNT 5.0)
(winerr): removed (superseded by _Jv_WinStrError in include/win32.h)
(valid): rewrote implementation using GetHandleInformation()
(sync): changed exception throwing to use error string and exception
helper methods declared in include/win32.h
(open): likewise
(write): likewise
(setLength): likewise
(close): likewise
(seek): likewise
(getFilePointer): likewise
(read): likewise
* java/io/natFileWin32.cc: fixed tab, indentation and
whitespace inconsistencies
replaced <windows.h> #include with <platform.h>
removed jvm.h include
(_access): use JV_TEMP_UTF_STRING
(_stat): likewise
(performMkDir): use JV_TEMP_UTF_STRING
(performRenameTo): likewise
(performDelete): likewise
(performCreate): likewise
(performSetReadOnly): likewise
(performSetLastModified): likewise
* java/lang/natWin32Process.cc: fixed tab, indentation and
whitespace inconsistencies
replaced <windows.h> #include with <platform.h>
removed includes gcj/cni.h, jvm.h
(new_string): removed
(startProcess): use JV_TEMP_UTF_STRING,
changed exception throwing to use error string and exception
helper methods declared in include/win32.h
* java/net/natInetAddressWin32.cc: fixed tab, indentation and
whitespace inconsistencies
replaced <windows.h> #include with <platform.h>
removed jvm.h include
removed DISABLE_JAVA_NET conditional code
removed POSIX conditional code not relevant to Win32
(aton): use JV_TEMP_UTF_STRING
removed POSIX conditional code not relevant to Win32
(lookup): likewise
(getLocalHostName): likewise
* java/net/natNetworkInterfaceWin32.cc: fixed tab, indentation and
whitespace inconsistencies
removed unnecessary windows.h, winsock.h and gcj/cni.h includes
removed DISABLE_JAVA_NET conditional code
removed POSIX conditional code not relevant to Win32
(winsock2GetRealNetworkInterfaces): new function to compute network
interfaces via Winsock2 API
(determineGetRealNetworkInterfacesFN): new function for returning
a function pointer to the function used to compute network interfaces.
(getRealNetworkInterfaces): implemented
* java/net/natPlainDatagramSocketImplWin32.cc: fixed tab, indentation and
whitespace inconsistencies
removed gcj/cni.h include
removed DISABLE_JAVA_NET conditional code
removed POSIX conditional code not relevant to Win32
changed net POSIXisms to Win32isms
replaced _Jv socket-related calls with their real Win32 equivalents
changed exception throwing to use error string and exception
helper methods declared in include/win32.h
(peekData): implemented timeout support
(receive): likewise
* java/net/natPlainSocketImplWin32.cc: fixed tab, indentation and
whitespace inconsistencies
removed gcj/cni.h and gcj/javaprims.h includes
removed DISABLE_JAVA_NET conditional code
removed POSIX conditional code not relevant to Win32
changed net POSIXisms to Win32isms
replaced _Jv socket-related calls with their real Win32
equivalents
changed exception throwing to use error string and exception
helper methods declared in include/win32.h
(throwConnectException): helper function for connect()
(connect): implemented timeout support
(accept): likewise
(doRead): new helper function common to both read() method overloads,
includes timeout support
(read): implemented both overloads in terms of doRead()
(available): implemented using ioctlsocket()
From-SVN: r70904
* Makefile.in: Rebuilt.
* Makefile.am (ordinary_java_source_files): Added new files.
* java/lang/Class.h (_Jv_sharedlib_register_hook): Declare as
friend.
* java/net/URLClassLoader.java (findClass): Don't use
findURLResource. Use loader's getClass method.
(URLLoader.getClass): New method.
(addURL): Handle `gcjlib' URLs.
(SoURLLoader): New class.
(SoResource): Likewise.
* gnu/gcj/protocol/gcjlib/Connection.java: New file.
* gnu/gcj/protocol/gcjlib/Handler.java: New file.
* include/jvm.h (struct _Jv_core_chain): Moved from natCore.cc.
(_Jv_RegisterCoreHook): Declare.
(_Jv_FindCore): Declare.
* gnu/gcj/runtime/SharedLibHelper.java: New file.
* gnu/gcj/runtime/natSharedLibLoader.cc (CoreHookFunc): New
typedef.
(core_hook): New function.
(struct SharedLibDummy) [saved_core]: New field.
(init): Set _Jv_RegisterCoreHook. Throw exception on failure.
(register_hook): Set protection domain and class loader on new
class.
(finalize): Free core chain.
* gnu/gcj/Core.java (Core): New constructor.
* gnu/gcj/runtime/SharedLibLoader.java: Rewrote to use
SharedLibHelper.
* gnu/gcj/natCore.cc (_Jv_RegisterResource): Indentation fixlet.
(_Jv_create_core): New function.
(create): Use it.
(default_register_resource): New function.
(_Jv_RegisterCoreHook): New global.
(_Jv_RegisterResource): Use it.
(core_chain_struct): Removed.
(_Jv_FindCore): New function.
(_Jv_FreeCoreChain): New function.
From-SVN: r70892
* Makefile.am: (write_entries_to_file) New parameterized
function for writing entries to a file one line at a time.
(all_java_class_files): Removed definition.
(.java.class) Removed.target.
(libgcj-@gcc_version@.jar): Changed dependency to
$(all_java_source_files); added compilation step which compiles
all changed source files in one pass.
(libgcj.la) Refactored to use write_entries_to_file.
(lib-gnu-awt-xlib.la) Likewise.
(install-data-local) Likewise.
(write-entries-to-file-check) New target which tests write_entries_to_file.
(all-recursive): Changed dependency from $(all_java_class_files)
to libgcj-@gcc_version@.jar
* Makefile.in: Rebuilt.
From-SVN: r70842
2003-08-26 Mark Wielaard <mark@klomp.org>
* java/security/acl/Acl.java: Fix broken p tag.
* java/text/DateFormatSymbols.java: Correctly open and close li tags.
* javax/swing/border/LineBorder.java: Close img tag alt attributes.
* javax/swing/plaf/TreeUI.java: Likewise.
* javax/swing/plaf/basic/BasicTreeUI.java: Likewise.
* java/util/Properties.java: Use the word umlaut, not ä in api
documentation.
* java/util/PropertyResourceBundle.java: Likewise and add closing code
tag.
From-SVN: r70825
* java/lang/reflect/Proxy.java (ProxyData): `pack' now a String.
(ProxyData.getPackage): New method.
(ProxyData.getProxyData): Use package name, not Package.
(ClassFactory.ClassFactory): Updated.
From-SVN: r70809
* Makefile.am: added gnu/awt/xlib/XOffScreenImage.java.
* Makefile.in: re-generated.
* gnu/awt/j2d/IntegerGraphicsState.java
(ScreenCoupledImage): new interface.
(drawImage): detect ScreenCoupledImage instances.
* gnu/awt/xlib/XCanvasPeer.java (createImage) implemented.
* gnu/awt/xlib/XEventLoop.java
(createEvent): re-formatted, and rearranged to avoid null pointer.
* gnu/awt/xlib/XGraphics.java
(drawImage): added XOffScreenImage handling.
* gnu/awt/xlib/XOffScreenImage.java: new file.
* gnu/gcj/xlib/Drawable.java (getDepth): new native method.
* gnu/gcj/xlib/GC.java (copyArea): new native method.
* gnu/gcj/xlib/XAnyEvent.java
(TYPE_KEY_PRESS): new constant.
(TYPE_KEY_RELEASE): new constant.
(TYPE_MOTION_NOTIFY): new constant.
(TYPE_ENTER_NOTIFY): new constant.
(TYPE_LEAVE_NOTIFY): new constant.
(TYPE_FOCUS_IN): new constant.
(TYPE_FOCUS_OUT): new constant.
(TYPE_KEYMAP_NOTIFY): new constant.
(TYPE_GRAPHICS_EXPOSE): new constant.
(TYPE_NO_EXPOSE): new constant.
(TYPE_VISIBILITY_NOTIFY): new constant.
(TYPE_CREATE_NOTIFY): new constant.
(TYPE_DESTROY_NOTIFY): new constant.
(TYPE_MAP_REQUEST): new constant.
(TYPE_CONFIGURE_REQUEST): new constant.
(TYPE_GRAVITY_NOTIFY): new constant.
(TYPE_RESIZE_REQUEST): new constant.
(TYPE_CIRCULATE_NOTIFY): new constant.
(TYPE_CIRCULATE_REQUEST): new constant.
(TYPE_PROPERTY_NOTIFY): new constant.
(TYPE_SELECTION_CLEAR): new constant.
(TYPE_SELECTION_REQUEST): new constant.
(TYPE_SELECTION_NOTIFY): new constant.
(TYPE_COLORMAP_NOTIFY): new constant.
(TYPE_MAPPING_NOTIFY): new constant.
* gnu/gcj/xlib/natDrawable.cc (getDepth): new method.
* gnu/gcj/xlib/natGC.cc (copyArea): new method
* java/awt/Component.java (createImage): changed to use peer method.
From-SVN: r70776
2003-08-22 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkWindowPeer.java: Remove
GTK_WINDOW_DIALOG. Set GTK_WINDOW_POPUP to 1.
From-SVN: r70688
2003-01-31 Andrew Haley <aph@redhat.com>
* except.c (prepare_eh_table_type): Use new encoding for exception
handlers when using -fno-assume-compiled.
2003-08-20 Andrew Haley <aph@redhat.com>
* gnu/gcj/runtime/StackTrace.java (getClass): New method.
* gnu/gcj/runtime/natStackTrace.cc (getClass): New method.
(classAt): Break out class lookup function into getClass().
* exception.cc (PERSONALITY_FUNCTION): Use new encoding for exception
handlers when using -fno-assume-compiled.
From-SVN: r70605
* java/lang/ref/natReference.cc (finalize_referred_to_object):
Set `list->reference' to DELETED_REFERENCE when removing dead
object.
(find_slot): Added an assert.
(DELETED_REFERENCE): New define.
(add_to_hash): Check for DELETED_REFERENCE.
(remove_from_hash): Just return if found slot isn't ours.
From-SVN: r70599
2003-08-19 Andrew Haley <aph@redhat.com>
* prims.cc (unblock_signal): New function.
(SIGNAL_HANDLER): Use it.
(SIGNAL_HANDLER): Likewise.
From-SVN: r70598
PR libgcj/11575
* java/io/natFileDescriptorWin32.cc (open): Set create
flag to OPEN_AWAYS when READ & WRITE regardless of APPEND flag.
Honor EXCL when openning with WRITE flag.
From-SVN: r70565
* include/jvm.h: New class _Jv_TempUTFString (helper class for
getting a temporary C string from a jstring)
New macro JV_TEMP_UTF_STRING, which leverages _Jv_TempUTFString
but uses a stack buffer if the string length is less than 256
bytes.
From-SVN: r70564
PR libgcj/11951:
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Returns
void. Throw VirtualMachineError if ffi fails. Initialize return
value. Added is_jni_call argument; only wrap exception if not a
JNI call. Use descriptive message if operation not supported.
(_Jv_GetTypesFromSignature): Use declaring class' loader to find
array class.
* include/jvm.h (_Jv_CallAnyMethodA): Updated declaration.
* jni.cc (_Jv_JNI_CallAnyMethodV): Updated for new form of
_Jv_CallAnyMethodA.
(_Jv_JNI_CallAnyMethodA): Likewise.
(_Jv_JNI_CallAnyVoidMethodV): Likewise.
(_Jv_JNI_CallAnyVoidMethodA): Likewise.
From-SVN: r70544
* libjava.jacks/jacks.xfail: Updated to account for new passes.
* libjava.compile/abstr.xfail: Now can compile from bytecode.
* libjava.compile/PR5641.xfail: Now can compile from bytecode.
From-SVN: r70387
* java/awt/Container.java
(getPreferredSize): Call preferredSize.
(preferredSize): Moved body of getPreferredSize here.
(getMinimumSize): Call minimumSize.
(minimumSize): Moved body of getMinimumSize here.
From-SVN: r70386
* java/io/PrintStream.java (print): Always flush if auto_flush is
set. Don't check for newline characters.
(write (int)): Implement without using a temporary array.
(write (byte[], int, int): Always flush if auto_flush is set. Don't
check for newline characters.
Fixes PR libgcj/11778.
From-SVN: r70284
boehm-gc:
* configure.in: Set INCLUDES to absolute path.
Save $INCLUDES in boehm-cflags, too.
Set INCLUDES so it's available to config.status.
* configure: Regenerate.
libjava:
* configure.in: Don't initialize GCINCS to boehm-gc/include.
* configure: Regenerate.
libjava/libltdl:
* configure.in: Don't initialize GCINCS to boehm-gc/include.
* Regenerate.
Co-Authored-By: Roger Sayle <roger@eyesopen.com>
From-SVN: r70233
* java/net/natPlainSocketImplPosix.cc (connect): Pass the FD as a
ready-to-write argument to _Jv_Select. Reset the socket back to
non-blocking state after connecting.
(accept): Pass the FD as a ready-to-write argument to _Jv_Select.
Throw SocketTimeoutException not InterruptedIOException.
(read): Throw SocketTimeoutException not InterruptedIOException.
Co-Authored-By: Bryce McKinlay <bryce@mckinlay.net.nz>
From-SVN: r70217
* java/lang/reflect/Method.java: Updated status comment.
Imported javadoc from Classpath and re-ordered methods.
* java/lang/reflect/Constructor.java: Reindented. Updated
status comment. Imported javadoc from Classpath and re-ordered
methods.
From-SVN: r70184
2003-08-05 Matthias Klose <doko@debian.org>
* aclocal.m4: check for libart-config binary
under the name libart2-config as well.
* configure: regenerated.
From-SVN: r70169
2003-08-04 David P Grove <groved@us.ibm.com>
* java/text/DecimalFormat.java (format): avoid ArithmeticException
when groupingSize is 0.
(parse): Likewise.
From-SVN: r70156
2003-08-04 Matthias Klose <doko@debian.org>
* libart.m4: check for libart-config binary
under the name libart2-config as well.
* configure, aclocal.m4: regenerated.
From-SVN: r70150
* java/net/URL.java
(URL): Added paragraph about the
gnu.java.net.nocache_protocol_handlers property.
(ph_cache): Renamed from handlers to match classpath's implementation.
Reordered it with factory and serialVersionUID member variables.
(cache_handlers): New member variable.
(static): New static initializer to initialize cache_handlers from
gnu.java.net.nocache_protocol_handlers property.
(URL): Use ph_cache instead of handlers, reformatted some code to
match classpath's implementation.
From-SVN: r70098
2003-08-01 Stephen Crawley <crawley@dstc.edu.au>
* java/net/SocketImpl.java (toString): Display the remote address
of an unconnected server socket as "0.0.0.0/0.0.0.0".
From-SVN: r70069
2003-08-01 Jerry Quinn <jlquinn@optonline.net>
Mark Wielaard <mark@klomp.org>
* java/math/BigDecimal (divide): Correctly handle
ROUND_HALF_EVEN when amount is greater than 0.5.
Simplify and optimize code.
Co-Authored-By: Mark Wielaard <mark@klomp.org>
From-SVN: r70049
Fix for PR libgcj/11737:
* java/io/ObjectOutputStream.java (getMethod): Make method
accessible.
(getField): Likewise.
(writeObject): Use getMethod.
Import PrivilegedAction and AccessController.
(callWriteMethod): Don't check whether m is null. Catch
NoSuchMethodException.
From-SVN: r70035
* java/lang/natString.cc (init(gnu.gcj.runtime.StringBuffer)):
New method.
Include gnu/gcj/runtime/StringBuffer.h.
* java/lang/String.java (init(gnu.gcj.runtime.StringBuffer)): New
native method.
(String(gnu.gcj.runtime.StringBuffer)): Use it.
From-SVN: r69890
2003-07-27 Thomas Fitzsimmons <fitzsim@redhat.com>
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c:
Create vbox and layout for GtkPlug.
From-SVN: r69861
Michael Koch <konqueror@gmx.de>
* gnu/java/awt/EmbeddedWindow.java
(EmbeddedWindow): Extends Frame instead of Window.
(window_id): New member variable to store the native window handle.
(create): Removed.
(EmbeddedWindow): New constructor.
(addNotify): New method.
(getHandler): Likewise.
(setWindowPeer): New native method.
* gnu/java/awt/EmbeddedWindowSupport.java
(EmbeddedWindowSupport): Fixed documentation.
(createEmbeddedWindow): Return EmbeddedWindowPeer instead of
WindowPeer, give it an EmbeddedWindow instance instead of the raw
window data.
* gnu/java/awt/natEmbeddedWindow.cc
(create): Removed.
(setWindowPeer): New method.
* gnu/java/awt/peer/EmbeddedWindowPeer.java,
gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java,
jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c:
New files
* gnu/java/awt/peer/gtk/GtkToolkit.java
(GtkToolkit): Implements EmbeddedWindowSupport.
(createEmbeddedWindow): New method.
* java/awt/Window.java
(Window): Removed.
* Makefile.am
(java_source_files): Added EmbeddedWindowPeer.java.
(gtk_awt_peer_sources): Added GtkEmbeddedWindowPeer.java.
(gtk_c_source_files): Added gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c.
* Makefile.in: Regenerated.
Co-Authored-By: Michael Koch <konqueror@gmx.de>
From-SVN: r69859
2003-07-26 Ranjit Mathew <rmathew@hotmail.com>
* java/lang/Win32Process.java (ConcreteProcess): Surround
a command line element with quotes if it contains an
embedded space or tab.
* java/lang/natWin32Process.cc (startProcess): Do not
surround command line elements with quotes here.
From-SVN: r69844
2003-07-26 Ranjit Mathew <rmathew@hotmail.com>
* configure.host: Use -fcheck-references and
-fuse-divide-subroutine for MinGW until we fix
win32_exception_handler( ) in win32.cc w.r.t. Win32
Structured Exception Handling (SEH).
From-SVN: r69843
2003-07-26 Ranjit Mathew <rmathew@hotmail.com>
* win32.cc (_Jv_platform_initProperties): Use generic names
like "x86" for the "os.arch" property to be consistent with
what Sun's JDK produces. Use the wProcessorArchitecture
member of the Win32 SYSTEM_INFO structure, filled in a call
to GetSystemInfo( ), instead of dwProcessorType.
From-SVN: r69837
2003-07-26 Mohan Embar <gnustuff@thisiscool.com>
Ranjit Mathew <rmathew@hotmail.com>
* Makefile.am: Use cross-compiling gcjh from the path for
a crossed-native build.
* Makefile.in: Rebuilt.
* configure.in: Include libltdl in non-newlib builds.
Moved determination of gcj used to build libraries to
its own section. Fixed cross-compilation issues for
non-newlib builds.
* configure: Rebuilt.
Co-Authored-By: Ranjit Mathew <rmathew@hotmail.com>
From-SVN: r69836
2003-07-25 Mark Wielaard <mark@klomp.org>
* Makefile.am (awt_java_source_files): java/awt/GridBagLayoutInfo.java
added.
* Makefile.in: Likewise.
2003-07-25 Jeroen Frijters <jeroen@frijters.net>
* java/awt/Component.java
(getPreferredSize): Call preferredSize.
(preferredSize): Moved body of getPreferredSize here.
(getMinimumSize): Call minimumSize.
(minimumSize): Moved body of getMinimumSize here.
(prepareImage): Fall back on Toolkit.prepareImage if there is no peer
(checkImage(Image,ImageObserver)): Don't call getWidth/getHeight, but
pass -1
* java/awt/Container.java
(validate): Don't validate if there is no peer.
(update): Clear background before calling paint.
* java/awt/GridBagLayout.java
Completed the implementation and fixed several bugs.
* java/awt/MediaTracker.java
(MediaEntry.imageUpdate): Fixed typo. & instead of | was used to
combine flags.
* java/awt/Window.java
(Window): Don't call setVisible(false). Windows are invisible by
default and calling virtual methods from constructor causes
compatibility problems (e.g. subclasses may assume that the peer
already exists).
2003-07-25 Michael Koch <konqueror@gmx.de>
* java/awt/GridBagLayout.java:
Totally reworked and partly implemented.
* java/awt/GridBagLayoutInfo.java:
New file.
From-SVN: r69785
2003-07-24 H. V�is�nen <hvaisane@joyx.joensuu.fi>
* java/text/SimpleDateFormat.java (format) [YEAR_FIELD]: Zero pad
unless field size is 2.
From-SVN: r69744
2003-07-20 Steve Pribyl <steve@netfuel.com.>
* gnu/gcj/runtime/natSharedLibLoader.cc (init): `libname' now a
String. Put dlerror() message into exception.
Include UnsatisfiedLinkError.
* gnu/gcj/runtime/SharedLibLoader.java (init): `libname' now a
String. Now native.
From-SVN: r69622