Commit Graph

424 Commits

Author SHA1 Message Date
Mohan Embar a0be84dd8c re PR libgcj/14751 ([win32] thread creation leaks system handle resources)
PR libgcj/14751
	* win32-threads.cc (_Jv_ThreadInitData): Zero out thread
	handle in newly-allocated _Jv_Thread_t.
	(_Jv_ThreadDestroyData): Close thread handle.
	(_Jv_ThreadStart): Remove obsolete comment.
	Store handle of newly-created thread in _Jv_Thread_t.
	* include/win32-threads.h: #define WIN32_LEAN_AND_MEAN
	before including <windows.h>
	#define _Jv_HaveCondDestroy

From-SVN: r87362
2004-09-11 19:13:51 +00:00
David Daney 321c496bc7 mips-signal.h: Update copyright.
2004-09-03  David Daney  <ddaney@avtrex.com>

	* include/mips-signal.h: Update copyright.

From-SVN: r87047
2004-09-03 19:08:47 +00:00
David Daney 04efec8127 configure.host: Use -fno-use-divide-subroutine for mips*-*-linux*.
2004-09-03  David Daney  <ddaney@avtrex.com>

	* configure.host: Use -fno-use-divide-subroutine for mips*-*-linux*.
	* include/mips-signal.h: Added HANDLE_FPE support.

From-SVN: r87039
2004-09-03 17:58:52 +00:00
Hans Boehm ed3479983d configure.ac: Handle --enable-gc-debug.
* configure.ac: Handle --enable-gc-debug.
	* configure: Regenerate.
	* include/config.h.in (LIBGCJ_GC_DEBUG): Add.
	* boehm.cc: Include gc_mark.h, javaxfc.h, but no GC private files.
	Rearrange include file order.
	(GC_DEBUG): Set if LIBGCJ_GC_DEBUG is set.
	(GC_finalize_all, GC_debug_generic_malloc): Don't declare.
	(disable_gc_mutex): Delete along with all references.
	(_Jv_MarkObj, _Jv_MarkArray): Use public types,
	adjust for debug header size.
	(_Jv_AllocObj, _Jv_allocPtrFreeObj): Define out of line for
	debug case.
	(_Jv_AllocArray): Declare min_heap_addr only if needed.
	(gcj_describe_type_fn): New.
	(_Jv_InitGC): Use GC_new_free_list, GC_new_proc, and GC_new_kind.
	Register gcj_describe_type_fn.
	* include/boehm-gc.h:
	(_Jv_AllocObj, _Jv_allocPtrFreeObj):
	Don't define, but declare, for debug case.
	* java/lang/natObject.cc:
	(GC_DEBUG): Define if LIBGCJ_GC_DEBUG is set.

From-SVN: r86686
2004-08-28 00:45:56 +00:00
Michael Koch 80d8905ca6 configure.in: Renamed to configure.ac.
2004-08-20  Michael Koch  <konqueror@gmx.de>

	* configure.in: Renamed to configure.ac.
	* configure.ac: New file.
	* configure, Makefile.in, gcj/Makefile.in, include/Makefile.in
	include/config.h.in, testsuite/Makefile.in: Regenerated.

From-SVN: r86326
2004-08-20 15:14:18 +00:00
Michael Koch e3f92d3b7d configure.in, [...]: Ported to automake 1.9.
2004-08-19  Thomas Fitzsimmons  <fitzsim@redhat.com>
	    Michael Koch  <konqueror@gmx.de>

	* configure.in,
	Makefile.am: Ported to automake 1.9.
	* Makefile.in:
	aclocal.m4
	configure
	gcj/Makefile.in
	include/Makefile.in
	testsuite/Makefile.in
	include/config.h.in:
	Regenerated.
	* gcc/doc/install.texi: Update entry about automake for libjava.

From-SVN: r86258
2004-08-19 18:12:25 +00:00
Michael Koch be170ef2ae 2004-08-16 Michael Koch <konqueror@gmx.de>
* Makefile.am
	(math_c_files): Renamed from c_files.
	(math_c_source_files): Renamed from c_source_files.
	* Makefile.in,
	gcj/Makefile.in,
	include/Makefile.in,
	testsuite/Makefile.in: Regenerated.

From-SVN: r86080
2004-08-16 21:19:04 +00:00
Bryce McKinlay 4109fe8594 configure.in (GCINCS): Don't use "boehm-cflags".
libjava:
2004-08-13  Bryce McKinlay  <mckinlay@redhat.com>

	* configure.in (GCINCS): Don't use "boehm-cflags". Instead, -I
	boehm-gc's include dirs.
	* configure: Rebuilt.
	* include/boehm-gc.h: Include gc_config.h.

boehm-gc:
2004-08-13  Bryce McKinlay  <mckinlay@redhat.com>

	* configure.ac (gc_cflags): Add -Iinclude.
	(AC_CONFIG_HEADERS): New. Configure gc_config.h header.
	Don't write DEFS to boehm-cflags file.
	* configure: Rebuilt.
	* gcj_mlc.c: Check #ifdef GC_GCJ_SUPPORT after including headers.
	* specific.c: Check #ifdef GC_LINUX_THREADS after including headers.
	* include/gc_config_macros.h: Remove backward-compatibility
	redefinitions of GC_ names.
	* include/gc.h: Include <gc_config.h>.

2004-08-13  Bryce McKinlay  <mckinlay@redhat.com>

	Import Boehm GC version 6.3.

From-SVN: r85972
2004-08-14 00:05:36 +01:00
David Daney c58f29001d re PR libgcj/11801 (Problems with Process.waitFor() and exitValue())
2004-08-12  David Daney  <ddaney@avtrex.com>

	PR libgcj/11801
	* java/lang/PosixProcess.java: Rewrote.
	* java/lang/natPosixProcess.cc: Rewrote.
	* java/lang/Runtime.java (execInternal): Declare throws IOException.
	* gcj/javaprims.h (ConcreteProcess$ProcessManager): Declare.
	* posix-threads.cc (block_sigchld) New function.
	(_Jv_ThreadRegister) Use it.
	(_Jv_ThreadStart) Use it.
	* configure.in (PLATFORM_INNER_NAT_HDRS): New AC_SUBST() used in...
	* Makefile.am: ... to specify extra native headers.
	* configure: Regenerated.
	* include/config.h: Regenerated.
	* Makefile.in: Regenerated.
	* gcj/Makefile.in: Regenerated.
	* include/Makefile.in: Regenerated.
	* testsuite/Makefile.in: Regenerated.

From-SVN: r85880
2004-08-12 16:20:11 +00:00
Per Bothner b4d49f49bf javaprims.h (_Jv_Utf8Const): Change struct to a class, with private fields and access methods.
* gcj/javaprims.h (_Jv_Utf8Const): Change struct to a class,
	with private fields and access methods.
	(_Jv_NewStringUTF, _Jv_hashUtf8String): New function declarations.
	* gcj/cni.h (_Jv_NewStringUTF): Move to javaprims.h.
	* prims.cc (_Jv_Utf8COnst::init): New method implementation.
	( _Jv_makeUtf8Const): Rewrite using new constructors.
	(hashUtf8String): Rename to +_Jv_hashUtf8String and make non-static.
	* defineclass.cc: Use new _Utf8Const access/convenience methods.
	* jni.cc: Likewise.
	* resolve.cc: Likewise.
	* gcj/field.h: Likewise.
	* include/jvm.h: Likewise.
	* java/lang/Class.h: Likewise.
	* java/lang/natClass.cc: Likwise.
	* java/lang/natClassLoader.cc: Likewise
	* java/lang/reflect/natMethod.cc: Likewise
	* verify.cc: Likewise.
	(_Jv_BytecodeVerifier::make_utf8_const):  Optimize.
	(~_Jv_BytecodeVerifier):  Don't need second _Jv_Free call.

From-SVN: r85854
2004-08-11 23:53:42 -07:00
Nathanael Nerode ed69811298 acinclude.m4: Include no-executables.m4.
* acinclude.m4: Include no-executables.m4.
	* aclocal.m4: Rebuild.
	* configure.in: Convert to the autoconf 2.59 version of
	of the no-executables hack, and also of the nonstandard CXX
	hack and the multilibbed CC and CXX hack.  Change prerequisite
	to autoconf 2.59.
	* configure: Rebuild with autoconf 2.59.  (Woo-hoo!)
	* Makefile.in, gcj/Makefile.in, include/Makefile.in,
	testsuite/Makefile.in: Regenerate.

From-SVN: r85495
2004-08-03 19:40:56 +00:00
Danny Smith 5b5662eea7 configure.in [...] (SYSTEMSPEC): Remove -lwsock32.
* configure.in [host *mingw*] (SYSTEMSPEC): Remove -lwsock32.
	* configure. Regenerate.
	* include/win32.h: Explicitly include winsock2.h
	* win32.cc (_Jv_platform_initialize): Require version 2.2 of
	Winsock api.

From-SVN: r85401
2004-08-01 04:29:31 +00:00
Bryce McKinlay ffe4e0376f prims.cc (_Jv_InitPrimClass): Don't create an array class.
2004-07-23  Bryce McKinlay  <mckinlay@redhat.com>

	* prims.cc (_Jv_InitPrimClass): Don't create an array class.
	(_Jv_CreateJavaVM): Don't pass array vtable parameter to
	_Jv_InitPrimClass.
	(DECLARE_PRIM_TYPE): Don't declare array vtables.
	* include/jvm.h (struct _Jv_ArrayVTable): Removed.
	* java/lang/Class.h (_Jv_InitPrimClass): Update friend declaration.

From-SVN: r85109
2004-07-24 02:17:29 +01:00
Thomas Fitzsimmons ef05818b76 Makefile.am: Rename jar binary to fastjar.
2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* Makefile.am: Rename jar binary to fastjar.
	* Makefile.in: Regenerate.
	* fastjar.texi: Rename references to jar binary with fastjar.

2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* Make-lang.in: Replace rmic and rmiregistry references with
	grmic and grmiregistry.
	* gcj.texi: Likewise.

2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* Makefile.am: Replace jar, rmic and rmiregistry references with
	gjar, grmic and grmiregistry.
	* configure.in: Likewise.
	* Makefile.in: Regenerate.
	* configure: Likewise.
	* gcj/Makefile.in: Likewise.
	* include/Makefile.in: Likewise.
	* testsuite/Makefile.in: Likewise.

From-SVN: r85101
2004-07-23 23:34:17 +00:00
Nathanael Nerode 4c86f32571 Makefile.am: Set ZIP and GCJH directly using autoconf.
* Makefile.am: Set ZIP and GCJH directly using autoconf.
	* Makefile.in, include/Makefile.in, testsuite/Makefile.in,
	gcj/Makefile.in: Regenerate.
	* configure.in: Set ZIP and GCJH.  Remove redundant condition
	in AM_CONDITIONAL(NATIVE,...)
	* configure: Regenerate.

From-SVN: r84832
2004-07-16 21:04:58 +00:00
Nathanael Nerode ed2e3d3395 configure.in: Use target_noncanonical rather than target_alias for forward-compatibility with...
* configure.in: Use target_noncanonical rather than
	target_alias for forward-compatibility with autoconf 2.59.
	* configure: Regenerate.
	* Makefile.am, gcj/Makefile.am, include/Makefile.am,
	testsuite/Makefile.am: Substitute target_noncanonical.
	* Makefile.in, gcj/Makefile.in, include/Makefile.in,
	testsuite/Makefile.in: Regenerate.

From-SVN: r84802
2004-07-16 05:36:35 +00:00
Nathanael Nerode b2281cb3f2 aclocal.m4: Rebuilt with aclocal gcj-1.4.
* aclocal.m4: Rebuilt with aclocal gcj-1.4.
	* configure: Rebuilt with autoconf 2.13.
	* Makefile.in, gcj/Makefile.in, include/Makefile.in,
	testsuite/Makefile.in: Rebuilt with automake gcj-1.4.

From-SVN: r84743
2004-07-15 04:05:09 +00:00
Jerry Quinn 12e8e7ea6d EventHandler.java: New file.
2004-07-14  Jerry Quinn  <jlquinn@optonline.net>

	* java/beans/EventHandler.java: New file.
	* Makefile.am (awt_java_source_files): Add EventHandler.java.
	* Makefile.in, gcj/Makefile.in, include/Makefile.in,
	testsuite/Makefile.in: Regenerate.

From-SVN: r84714
2004-07-14 22:58:30 +00:00
Ulrich Weigand 220a826e6d s390.md ("udivsi3"): Ensure trap is generated for division by zero.
gcc/ChangeLog:

	* config/s390/s390.md ("udivsi3"): Ensure trap is generated
	for division by zero.
	("umodsi3"): Likewise.

libjava/ChangeLog:

	* configure.host (DIVIDESPEC) [s390*-*-*]: Set to
	-fno-use-divide-subroutine.
	* include/s390-signal.h: Include <ucontext.h> and <limits.h>.
	(HANDLE_FPE): Define.
	(SIGNAL_HANDLER): Change third argument to ucontext_t *.
	(struct old_s390_kernel_sigaction): Likewise for k_sa_handler.
	(HANDLE_DIVIDE_OVERFLOW): Define.

From-SVN: r84683
2004-07-14 13:09:09 +00:00
Bryce McKinlay 6187fd28ad re PR libgcj/7587 (direct threaded interpreter not thread-safe)
2004-07-13  Bryce McKinlay  <mckinlay@redhat.com>

	PR libgcj/7587
	* interpret.cc (compile_mutex): New.
	(_Jv_InitInterpreter): New. Initialize compile_mutex.
	(run): Lock compile_mutex before calling compile() if compilation is
	required.
	* prims.cc (_Jv_CreateJavaVM): Call _Jv_InitInterpreter().
	* include/java-interp.h (_Jv_InitInterpreter): Declare.

From-SVN: r84644
2004-07-13 22:03:03 +01:00
Bryce McKinlay 7a1c3d48ab re PR libgcj/15713 (compile interpret.cc with -fno-strict-aliasing)
2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>

	PR libgcj/15713
	* include/jvm.h (_Jv_value): New union type.
	* gcj/field.h (_Jv_Field): Add new _addr union field variants
	* interperet.cc (run): Use _Jv_value union type and *_addr _Jv_Field
	union members.

From-SVN: r84596
2004-07-13 02:04:47 +01:00
Ulrich Weigand bbb362e693 linux.h (MD_FALLBACK_FRAME_STATE_FOR): For SIGSEGV and SIGBUS signal frames...
ChangeLog:

	* config/s390/linux.h (MD_FALLBACK_FRAME_STATE_FOR): For SIGSEGV and
	SIGBUS signal frames, the PSW address points *to* the faulting
	instruction, not after it.

libjava/ChangeLog:

	* include/s390-signal.c (SIGNAL_HANDLER): Use SIGINFO-style prototype.
	(struct old_s390_kernel_sigaction): Likewise for k_sa_handler.
	(MAKE_THROW_FRAME): Do not modify PSW address.
	(INIT_SEGV): Install SIGINFO-style signal handler.
	(INIT_FPE): Likewise.

From-SVN: r84506
2004-07-11 11:49:25 +00:00
Michael Koch 1f33f6b4c7 unicode-muncher.pl: Updated to version 2.1 from GNU classpath.
2004-07-09  Michael Koch  <konqueror@gmx.de>

	* scripts/unicode-muncher.pl: Updated to version 2.1
	from GNU classpath. Added some clarifications on where to find the
	needed files from www.unicode.org.
	* gnu/gcj/convert/UnicodeCharacterDatabase-3.0.0.html,
	gnu/gcj/convert/UnicodeData-3.0.0.txt:
	Removed, these can directly be downloaded from www.unicode.org if
	needed.
	* gnu/java/lang/CharData.java: Regenerated.
	* include/java-chartables.h: Regenerated.
	* Makefile.am (ordinary_java_source_files):
	Removed gnu/java/lang/CharData.java.
	* Makefile.in: Regenerated.

From-SVN: r84399
2004-07-09 21:00:12 +00:00
Randolph Chung 8c5ac2c403 pa32-linux.h (MD_FALLBACK_FRAME_STATE_FOR): Define.
* gcc/config/pa/pa32-linux.h (MD_FALLBACK_FRAME_STATE_FOR): Define.
	* libjava/configure.in (SIGNAL_HANDLER): Use pa-signal.h for hppa.
	* libjava/configure: Regenerate.
	* libjava/configure.host: Set can_unwind_signal for hppa*-linux.
	* libjava/pa-signal.h: New file.

From-SVN: r84344
2004-07-09 03:39:35 +00:00
Per Bothner 0bd241538e jvm.h (namespace jcj): Declare verbose_class_flag
* include/jvm.h (namespace jcj):  Declare verbose_class_flag
	* java/lang/natClass.cc (gcj::verbose_class_flag):  New variable.
	(initializeClass):  If verbose_class_flag, print message.
	* gij.cc (main):  Handle -verbose:class flag.

From-SVN: r84242
2004-07-07 16:44:12 -07:00
Geoffrey Keating f8a57be818 Index: gcc/ChangeLog
2004-06-28  Geoffrey Keating  <geoffk@apple.com>
	    Andreas Tobler  <a.tobler@schweiz.ch>

	PR 15813
	* dwarf2out.c (reg_save): Output DW_CFA_same_value when a
	register is saved in itself.
	(initial_return_save): If the return address is a register,
	it's already there, don't bother to mention it in the CFI.
	(struct queued_reg_save): Add field saved_reg.
	(struct reg_saved_in_data): New.
	(regs_saved_in_regs): New.
	(num_regs_saved_in_regs): New.
	(queue_reg_save): Add extra parameter to specify register saved
	in register.  Remove duplicate entries from queue.  Add comment
	for function.
	(flush_queued_reg_saves): Handle registers saved in registers.
	Update regs_saved_in_regs.  Add comment for function.
	(clobbers_queued_reg_save): Add comment for function.  Allow
	for regs_saved_in_regs.
	(reg_saved_in): New.
	(dwarf2out_frame_debug_expr): Handle saving registers in other
	registers.
	(dwarf2out_frame_debug): Reset regs_saved_in_regs.
	* unwind-dw2.c (execute_cfa_program): Correct handling of
	DW_CFA_same_value.  Add FIXME comment about incorrect implementation
	of DW_CFA_restore_extended.
	* config/rs6000/rs6000.c (rs6000_emit_prologue): Let
	dwarf2out_frame_debug_expr see instructions that save registers
	in other registers or save those other registers in memory.

	* unwind-dw2.c (DWARF_FRAME_REGISTERS): Move to unwind-dw2.h.
	(_Unwind_FrameState): Likewise.
	* unwind-dw2.h: New.
	* Makefile.in (LIB2ADDEHDEP): Add unwind-dw2.h.
	* config/rs6000/darwin-fallback.c: New file.
	* config/rs6000/darwin.h (MD_FALLBACK_FRAME_STATE_FOR): Define.
	* config/rs6000/t-darwin (LIB2FUNCS_EXTRA): Add darwin-fallback.o.

Index: gcc/testsuite/ChangeLog
2004-06-26  Geoffrey Keating  <geoffk@apple.com>
	    Andreas Tobler  <a.tobler@schweiz.ch>

	* gcc.dg/cleanup-10.c: Run on all Linux platforms and powerpc-darwin.
	Use SA_RESETHAND rather than SA_ONESHOT.  Trap SIGBUS as well
	as SIGSEGV.
	* gcc.dg/cleanup-11.c: Likewise.
	* gcc.dg/cleanup-8.c: Likewise.
	* gcc.dg/cleanup-9.c: Likewise.
	* gcc.dg/cleanup-5.c: Run on all platforms.

Index: libjava/ChangeLog
2004-06-26  Geoffrey Keating  <geoffk@apple.com>
	    Andreas Tobler  <a.tobler@schweiz.ch>

	* configure.host (powerpc-*-darwin*): New case, define
	can_unwind_signal.
	* configure.in (*-*-darwin*): New case, point to darwin-signal.h.
	* configure: Regenerate.
	* include/darwin-signal.h: New.

Co-Authored-By: Andreas Tobler <a.tobler@schweiz.ch>

From-SVN: r83953
2004-07-01 04:09:07 +00:00
Steven Augart a01a235c76 jni.h (_Jv_func): Removed.
2004-05-14  Steven Augart  <augart@watson.ibm.com>

	* include/jni.h (_Jv_func): Removed.
	(struct JNINativeInterface): Use `void *' for reserved slots.
	(struct JNIInvokeInterface): Likewise.

From-SVN: r81851
2004-05-14 16:35:07 +00:00
Bryce McKinlay f531010820 class.c (make_class_data): Add new field aux_info.
2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>

	* class.c (make_class_data): Add new field aux_info.
	* decl.c (java_init_decl_processing): Push type and decl for
	`aux_info'.

2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>

	* gcj/cni.h (JvAllocObject): Remove these obsolete,
	undocumented CNI calls.
	* include/java-interp.h (_Jv_InterpClass): No longer
	extends java.lang.Class.
	* java/lang/Class.h (Class): Add new field `aux_info'.
	* boehm.cc (_Jv_MarkObj): Update java.lang.Class marking.
	* defineclass.cc: Remove Class<->_Jv_InterpClass casts.
	Use Class->aux_info instead.
	* jni.cc (_Jv_JNI_AllocObject): Use _Jv_AllocObject.
	* resolve.cc: Remove Class<->_Jv_InterpClass casts.
	Use Class->aux_info instead.
	* java/io/natObjectInputStream.cc (allocateObject): Use
	_Jv_AllocObject.
	* java/lang/natClass.cc (newInstance): Likewise.
	* java/lang/natClassLoader.cc (_Jv_NewClass): Likewise.
	* java/lang/natObject.cc (clone): Likewise.
	* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Likewise.
	* java/lang/natVMClassLoader.cc (defineClass): Don't use
	JvAllocObject. Allocate klass->aux_info here for interpreted
	class.

From-SVN: r80875
2004-04-20 02:38:46 +01:00
Bryce McKinlay d7afe286b3 [multiple changes]
2004-04-14  Andrew Haley  <aph@redhat.com>
            Bryce McKinlay  <mckinlay@redhat.com>

	* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Use
	_Jv_LookupInterfaceMethodIdx for calls to interfaces.
	* include/jvm.h (_Jv_CallAnyMethodA): Add new 	face' arg.

	* testsuite/libjava.lang/InvokeInterface.java: New file.
	* testsuite/libjava.lang/InvokeInterface.out: New file.

2004-04-14  Bryce McKinlay  <mckinlay@redhat.com>

	* class.c (get_interface_method_index): New function. Return
	dispatch index for interface method.
	(make_method_value): For interface methods, set index field to
	iface dispatch index, not DECL_VINDEX.
	* expr.c (build_invokeinterface): Use get_interface_method_index.

From-SVN: r80684
2004-04-14 18:45:20 +01:00
Graydon Hoare 86881a7b54 [multiple changes]
2004-03-12  Graydon Hoare  <graydon@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java: Clipping fixes.
	* javax/swing/JComponent.java (paint): Use persistent double buffer.
	* javax/swing/JList.java (ListListener): Revalidate on changes.
	* javax/swing/JScrollPane.java: Reimplement.
	* javax/swing/JViewport.java: Reimplement.
	* javax/swing/ScrollPaneLayout.java: Reimplement.
	* javax/swing/ViewportLayout.java: Tidy up.
	* javax/swing/plaf/basic/BasicButtonListener.java: Remove printlns.
	* javax/swing/plaf/basic/BasicScrollPaneUI.java: Reimplement.
	* javax/swing/plaf/basic/BasicSliderUI.java: Handle missing labels.
	* javax/swing/plaf/basic/BasicViewportUI.java: Implement in terms of
	backing store only.

2004-03-11  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
	(window_wm_protocols_filter): New function.
	(window_focus_in_cb): Remove function.
	(window_focus_out_cb): Likewise.
	(window_focus_or_active_state_change_cb): New function.
	(create): Add filter that removes WM_TAKE_FOCUS client messages.
	(connectSignals): Don't attach handlers to focus-in-event or
	focus-out-event signals.  Handle notify signal.

2004-03-11  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkCheckboxPeer.java
	(gtkSetLabel): New native method declaration.
	(setLabel): Use gtkSetLabel.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_gtkSetLabel): New method.

2004-03-10  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics.java (setColor): Default to
	black when color argument is null.

2004-03-10  Kim Ho  <kho@redhat.com>

	* java/awt/Container.java: Remove check
	for drag events.

2004-03-10  Kim Ho  <kho@redhat.com>

	* java/awt/Container.java: (visitChild):
	Remove candidate clip. Use the component
	clip to intersect.
	* gnu/java/awt/peer/gtk/GtkComponentPeer.java:
	(handleEvent): Use the PaintEvent's clip.

2004-03-10  Kim Ho  <kho@redhat.com>

	* gnu/java/awt/peer/gtk/GtkComponentPeer.java:
	(handleEvent): Don't set the clip for the
	Graphics object.

2004-03-09  Graydon Hoare  <graydon@redhat.com>

	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c:
	Fix double <-> fixed macros, reset font transform.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c:
	Likewise.

2004-03-09�� Kim Ho  <kho@redhat.com>

	* java/awt/Container.java: (visitChild): Move
	the x and y coordinate of the component rectangle
	to correct position.
	(handleEvent): Forward drag events to the pressed
	component.
	* javax/swing/plaf/basic/BasicScrollBarUI.java:
	Fix comments.
	(ArrowButtonListener::mousePressed): Stop the
	existing timer.
	(mouseDragged): Implement.
	(TrackListener::mousePressed): Only react if
	the press doesn't occur on the thumb, otherwise
	just set the offset.
	(TrackListener::mouseReleased): Unset the isAdjusting
	value.
	(createIncreaseIcon): Switch icon.
	(createDecreaseIcon): Switch icon.
	(calculatePreferredSize): Use width.
	(getThumbBounds): Use the top as the lower value.
	(layoutVScrollBar): Switch the button locations.
	(paintIncreaseHighlight): Paint correct side of thumb.
	(paintDecreaseHighlight): ditto.
	(valueForYPosition): Use top as the lower value.
	* javax/swing/plaf/basic/BasicSliderUI.java:
	Fix comments.
	(mouseDragged): Implement.
	(mousePressed): Only react when the thumb isn't
	pressed, otherwise just set offset.
	(mouseReleased): Handle a release of the thumb.
	(scrollDueToClickInTrack): Stop the timer first.
	* javax/swing/JProgressBar.java:
	(setString): Fix change condition.
	* javax/swing/JSeparator.java:
	Remove println's.

2004-03-08  David Jee  <djee@redhat.com>

	* java/awt/image/AffineTransformOp.java:
	(filter): Use Graphics2D interface instead of directly using the
	GdkGraphics2D peer.

2004-03-05  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkButtonPeer.java
	(handleEvent): Action events are generated upon MOUSE_RELEASED.
	* java/awt/Container.java
	(acquireComponentForMouseEvent): Fixed.
	(handleEvent): Fixed.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
	(state_to_awt_mods_with_button_states): New method.
	(pre_event_handler): Fixed mouse event generation.

2004-03-05  Olga Rodimina  <rodimina@redhat.com>

	gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(GdkGraphics2D (BufferedImage)): Initialize
	pixmap associated with specified BufferedImage.
	(setPaint): Changed implementation of Texture
	Paint to use AffineTransformOp.
	* java/awt/image/AffineTransformOp.java
	(createCompatibleDestRaster): Throw RasterFormatException
	if resulting width or height of raster is 0.

2004-03-04  Olga Rodimina  <rodimina@redhat.com>

	* java/awt/image/AffineTransformOp.java:
	Removed unnecessary field interpolationType.
	Formatted some of the lines to be consistent with
	the GNU style.
	(AffineTransformOp): Create new RenderingHints
	containing specified interpolation type.
	(createCompatibleDestImage): Implemented.
	(createCompatibleDestRaster): Implemented.
	(filter): Implemented.
	(getBounds2D(BufferedImage)): Implemented.
	(getBounds2D(Raster)): Implemented.
	(getInterpolationType): Get interpolation value from
	rendering hints.

2004-03-04  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkContainerPeer.java
	(setFont): Check if child peers are null.

2004-03-04  Graydon Hoare  <graydon@redhat.com>

	* testsuite/lib/libjava.exp (libjava_find_lib): Don't include
	.libs in -L option.
	(libjava_arguments): Add new libraries to argument list.

2004-03-04  Tom Tromey  <tromey@redhat.com>

	* Makefile.in: Rebuilt.
	* Makefile.am (toolexeclib_LTLIBRARIES): Added lib-java-awt.la,
	lib-javax-swing.la, lib-java-applet.la, lib-java-beans.la.
	(misc_java_source_files): New macro.
	(swing_java_source_files): Likewise.
	(awt_java_source_files): Pruned.
	(applet_java_source_files): New macro.
	(beans_java_source_files): Likewise.
	(lib_java_applet_la_SOURCES): Likewise.
	(lib_java_awt_la_SOURCES): Likewise.
	(lib_javax_swing_la_SOURCES): Likewise.
	(lib_java_beans_la_SOURCES): Likewise.
	(all_java_object_files): Likewise.
	(%.lo: %.java): Use all_java_object_files.
	(all_java_source_files): Added new _SOURCES.
	(ordinary_java_source_files): Removed awt_java_source_files.

2004-03-02  Olga Rodimina  <rodimina@redhat.com>

	* Makefile.am: Added java/awt/image/AffineTransformOp.java
	* Makefile.in: Re-generated.
	* java/awt/image/AffineTransformOp.java: New Class.

2004-03-01  Olga Rodimina  <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(setPaint): Interpret correctly TexturePaint's
	anchor rectangle.
	(drawImage): Fixed scale factors of the affine
	transform.

2004-02-27  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics.java
	(GdkGraphics(Component)): Inherit font from component.
	(drawString): Use font style.
	* gnu/java/awt/peer/gtk/GtkCheckboxPeer.java
	(gtkSetFont): New native method declaration.
	(setFont): New method.
	* gnu/java/awt/peer/gtk/GtkComponentPeer.java
	(gtkSetFont): New native method declaration.
	(setFont): Call new native method gtkSetFont.
	* gnu/java/awt/peer/gtk/GtkContainerPeer.java
	(setFont): For all child components who do not their fonts set,
        set their peers' fonts with this container's font.
	* gnu/java/awt/peer/gtk/GtkLabelPeer.java:
	Move all native method declarations to the top for readability.
	(gtkSetFont): New native method declaration.
	(setFont): New method.
	* java/awt/Component.java
	(setFont): Invalidate after setting the font.
	* java/awt/Container.java
	(invalidateTree): New method.
	(setFont): Invalidate the container tree after setting the font.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c
	(Java_gnu_java_awt_peer_gtk_GdkGraphics_drawString): Use font style.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_gtkSetFont): New method.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkSetFont): New method.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkLabelPeer_gtkSetFont): New method.

2004-02-27  Olga Rodimina <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(updateBufferedImage): New helper function.
	Updates BufferedImage in memory if it was changed.
	(draw): changed to update BufferedImage in memory after
	this drawing operation
	(fill): Ditto.
	(draw3DRect): Ditto.
	(fill3DRect): Ditto.
	(clearRect): Ditto.
	(drawRaster): Ditto.
	(drawImage) : Ditto. Update only in case of GtkOffScreenImage with
	no affine transformation.
	(drawGlyphVector): Ditto.

2004-02-26  Olga Rodimina <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(isBufferedImageGraphics): New Helper function.
	Returns true if this graphics2d can be used to draw
	into buffered image and false otherwise.
	(updateImagePixels): New Helper function.
	Updates pixels in the BufferedImage.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c
	(getImagePixels): New function. Returns pixels
	of the buffered image associated with
	this Graphics2D.

2004-02-26  David Jee  <djee@redhat.com>

	* java/awt/BorderLayout.java
	(layoutContainer): Fix width and height calculations to ensure
	that they're non-negative.
	* java/awt/Component.java
	(setBackground): If c is null, inherit from closest ancestor whose
	background color is set.

2004-02-26�� Kim Ho�� <kho@redhat.com>

	* Makefile.am: Add new files.
	* Makefile.in: Re-generate.
	* javax/swing/JProgressBar.java:
	(JProgressBar(int, int int)): Throw
	IllegalArgumentException if orientation is
	invalid.
	(JProgressBar(BoundedRangeModel)): Create
	ChangeListener and register it. UpdateUI.
	(getChangeListeners): Implement.
	(setModel): Reset ChangeListener.
	* javax/swing/JScrollBar.java: Implement.
	* javax/swing/JSeparator.java: Implement.
	* javax/swing/JSlider.java:
	(JSlider(int, int, int, int)): Throw
	IllegalArgumentException if orientation
	is invalid.
	(getChangeListeners): Fix method name.
	* javax/swing/SwingUtilities.java:
	(layoutCompoundLabel): If there is no text,
	set the text rectangle dimensions to 0.
	* javax/swing/plaf/basic/BasicButtonUI.java:
	(paint): If there is no text, don't paint it.
	* javax/swing/plaf/basic/BasicScrollBarUI.java:
	Implement.
	* javax/swing/plaf/basic/BasicSeparatorUI.java:
	Implement.
	* javax/swing/plaf/basic/BasicSliderUI.java:
	(propertyChange): If the model changes, change
	the listeners accordingly.

2004-02-25  Graydon Hoare  <graydon@redhat.com>

	* javax/swing/AbstractButton.java: Add "final" qualifiers.
	* javax/swing/JList.java: Reimplement.
	* javax/swing/DefaultListSelectionModel.java: Reimplement.
	* javax/swing/plaf/basic/BasicListUI.java: Reimplement.
	* javax/swing/plaf/basic/BasicLookAndFeel.java: Add "purple" values.
	* javax/swing/ListModel.java: Javadoc.
	* javax/swing/ListSelectionModel.java: Add missing methods.
	* javax/swing/AbstractListModel.java: Javadoc and corrections.
	* javax/swing/DefaultListModel.java: Javadoc and corrections.
	* javax/swing/ListModel.java: Javadoc and corrections.
	* javax/swing/DefaultListCellRenderer.java: Minor tidying.

2004-02-25  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkFontPeer.java
	(GtkFontPeer): Change default size to 12.
	* gnu/java/awt/peer/gtk/GtkToolkit.java
	(getFontPeer): Change default size to 12.
	(getClasspathFontPeer): Likewise. Set default name to "Default".
	* java/awt/Font.java
	(Font(Map)): Call Font(String,Map).
	(Font(String,Map)): If attrs is null, initialize it as an empty
	HashMap, which will ensure that the Font will get default attributes.

2004-02-25  David Jee  <djee@redhat.com>

	* gnu/java/awt/peer/gtk/GtkFontPeer.java
	(GtkFontPeer(String,int)): Call the new constructor with size 1.
	(GtkFontPeer(String,int,int)): New constructor with size attribute.
	* gnu/java/awt/peer/gtk/GtkToolkit.java
	(getFontPeer(String,int)): Call the new overload method with size 1.
	(getFontPeer(String,int,int)): New method. Overloaded with size
	attribute.
	(getClasspathFontPeer): Set the size of the font.

2004-02-24  Olga Rodimina  <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(bimage): New field.
	(GdkGraphics2D): New Constructor. Constructs Graphics
	object that can be used to draw into the Buffered Image.
	* gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java:
	(GdkGraphicsEnvironment): Fixed to include public
	keyword.
	(createGraphics): Implemented.
	* gnu/java/awt/peer/gtk/GtkToolkit.java
	(getLocalGraphicsEnvironment): Implemented.
	* java/awt/GraphicsEnvironment.java:
	(getLocalGraphicsEnvironment): Implemented.
	* java/awt/image/BufferedImage.java:
	(createGraphics): Implemented.

2004-02-24  David Jee  <djee@redhat.com>

	* java/awt/Component.java
	(eventTypeEnabled): Add MOUSE_MOVED and MOUSE_DRAGGED event types.
	* java/awt/Container.java
	(addNotifyContainerChildren): Fix event enabling.

2004-02-23  Olga Rodimina  <rodimina@redhat.com>

	* Makefile.am: Added
	gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
	* Makefile.in: Re-generated.
	* gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java:
	New Class.

2004-02-19  Kim Ho  <kho@redhat.com>

	* Makefile.am: Add BasicProgressBarUI
	* Makefile.in: Regenerate.
	* javax/swing/JProgressBar.java:
	Re-implement.
	* javax/swing/plaf/basic/BasicLookAndFeel.java
	Add constants for JProgressBar.
	* javax/swing/plaf/basic/BasicProgressBarUI.java
	Implement.
	* javax/swing/plaf/basic/BasicSliderUI.java
	Change comments.
	(calculateGeometry): New method
	(paint): Remove unnecessary size calculations.

2004-02-18  Olga Rodimina  <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java
	(drawRaster): Fixed small error that caused
	imageToUser transformation to be set incorrectly.
	(toString): Implemented.

2004-02-18  David Jee  <djee@redhat.com>

	* java/awt/CardLayout.java
	(addLayoutComponent): Show the first component added as the default.
	(removeLayoutComponent): After removing, show the next component.
	(gotoComponent): If there is only one component, show it and return.

2004-02-18  Kim Ho  <kho@redhat.com>

	* javax/swing/JSlider.java: Re-order
	modifiers.
	* javax/swing/JLabel.java: Re-order
	modifiers.
	* javax/swing/JComponent.java:
	(addPropertyChangeListener):
	Implement.
	(removePropertyChangeListener):
	ditto.
	(firePropertyChangeEvent):
	ditto.

2004-02-17  David Jee  <djee@redhat.com>

	* java/awt/Component.java
	(show): Dispatch ComponentEvent via system event queue.
	(hide): Likewise.
	(move): Likewise.
	(resize): Likewise.
	(reshape): Likewise.
	* java/awt/Window.java
	(setBoundsCallback): Likewise.

2004-02-17  David Jee  <djee@redhat.com>

	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
	(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_setNativeBounds):
	Use gtk_widget_set_size_request() instead of the deprecated
	gtk_widget_set_usize().

2004-02-17  Kim Ho  <kho@redhat.com>

	* javax/swing/JSlider.java: Fix comments and
	make property strings constants.
	(createStandardLabels): Use the labels
	preferred size as bounds.
	* javax/swing/plaf/basic/BasicSliderUI.java
	Fix comments.
	(ScrollHandler::actionPerformed): Don't
	calculate the timer stop value. Let the
	MouseListeners find the stop location.
	(getPreferredHorizontalSize): Re-implement.
	(getPreferredVerticalSize): ditto.
	(getMinimumHorizontalSize): ditto.
	(getMinimumVerticalSize): ditto.
	(getPreferredSize): ditto.
	(getMinimumSize): ditto.
	(getMaximumSize): ditto.
	(paintTicks): Use doubles to find the
	tick location.
	(paintHorizontalLabel):�� Use preferredSize
	as initial width and height.
	(paintVerticalLabel): ditto.

2004-02-17  Kim Ho  <kho@redhat.com>

	* javax/swing/JLabel.java: Changed
	property strings to constants.
	(DISPLAYED_MNEMONIC_INDEX_CHANGED_PROPERTY):
	New property.
	(setText): Change mnemonic index if
	text is too short.
	(setDisplayedMnemonicIndex): Fire property
	change event.
	(getDisplayedMnemonicIndex): Remove check
	against short text.

2004-02-17 Olga Rodimina <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java:
	(drawImage(img,xform,obs)): Invert xform before
	passing the xform to cairo.
	(drawImage(img,x,y,bgcolor,obs)): Implemented.
	(drawImage (img,x,y,w,h,bgcolor,obs)): Partly
	implemented.
	(drawImage (img,x,y,w,h,obs)): Implemented.
	(drawImage (img,dx1,dy1,dx2,dy2,sx1,sy1,sx2,sy2,
	bgcolor,obs)): Partly implemented.
	(drawImage (img,dx1,dy1,dx2,dy2,sx1,sy1,sx2,sy2,obs)):
	Implemented.
	* java/awt/image/BufferedImage.java:
	(copyData): if dest is null, create raster with same
	dimensions as the current image.

2004-02-16  Graydon Hoare  <graydon@redhat.com>

	* javax/swing/plaf/basic/BasicLabelUI.java
	(getPreferredSize): Use layoutCL.
	* javax/swing/plaf/basic/BasicGraphicsUtils.java
	(getPreferredButtonSize): Start with empty view rect, layout using
	component's preferred alignment.
	* javax/swing/plaf/basic/BasicLookAndFeel.java: Add some Label and
	List defaults.

2004-02-16  David Jee  <djee@redhat.com>

	* java/awt/Component.java
	(show): Dispatch COMPONENT_SHOWN ComponentEvent.
	(hide): Dispatch COMPONENT_HIDDEN ComponentEvent.
	(move): Erase old bounds and repaint new bounds. Dispatch
	COMPONENT_MOVED ComponentEvent.
	(resize): Erase old bounds and repaint new bounds. Dispatch
	COMPONENT_RESIZED ComponentEvent.
	(reshape): Dispatch COMPONENT_RESIZED and COMPONENT_MOVED
	ComponentEvents.
	* java/awt/Window.java
	(setBoundsCallback): Dispatch COMPONENT_RESIZED and COMPONENT_MOVED
	ComponentEvents.

2004-02-16  Olga Rodimina  <rodimina@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java:
	(setRenderingHint): Added implementation of
	Interpolation rendering hints.
	(setRenderingHints): Ditto.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c:
	(drawPixels): fixed to allow user to choose type
	of filtering that should be used when displaying images.
	(cairoSurfaceSetFilter): New method. Sets filter type for
	interpolation of pixel values.

2004-02-16  David Jee  <djee@redhat.com>

	* java/awt/GridBagLayout.java
	(calcCellSizes): Rows or columns with zero sizes should still be
	considered for extra space distribution.

2004-02-16  Kim Ho  <kho@redhat.com>

	* javax/swing/JLabel.java: Re-implement.
	* javax/swing/plaf/basic/BasicLabelUI.java
	Re-implement.
	* javax/swing/plaf/basic/BasicLookAndFeel.java:
	Added constant.

2004-02-16�� Kim Ho�� <kho@redhat.com>

	* javax/swing/JSlider.java: Fix indentation and comments.
	(setModel): Remove null check to conform with Sun's.
	(setOrientation): Throw exception if not
	HORIZONTAL or VERTICAL.
	(getInverted): Use private variable instead of
	ComponentOrientation.
	(setInverted): ditto.
	* javax/swing/plaf/basic/BasicSliderUI.java:
	Fix indentation and comments.
	(propertyChange): Remove check for inverted slider, handle
	in main paint.
	(getMinimumSize): Return preferred size.
	(getMaximumSize): ditto.
	(calculateFocusRect): Don't relocate rectangle.
	(drawInverted): Return XOR of the slider's inversion and
	the component's orientation.
	(paint): Update leftToRightCache

2004-02-13  David Jee  <djee@redhat.com>

	* java/awt/GridBagLayout.java
	(GetLayoutInfo): Fix weight and size distribution. Relocate repeated
	code to helper methods.
	(sortBySpan): New helper method.
	(distributeSizeAndWeight): Likewise.
	(calcCellWeights): Likewise.
	(calcCellSizes): Add comments.

2004-02-13  David Jee  <djee@redhat.com>

	* java/awt/Component.java
        (show): Only do something if component is invisible at the moment.
        (hide): Only do something if component is visible at the moment.
        (reshape): If lightweight, erase old bounds and repaint new bounds.

2004-02-13�� Kim Ho�� <kho@redhat.com>

	* Makefile.am: Updated for new file.
	* Makefile.in: Regenerated.
	* javax/swing/JSlider.java: Reimplement.
	* javax/swing/SwingUtilities.java
	(layoutCompoundLabel): Use icon height
	instead of width.
	(paintComponent): Implement.
	* javax/swing/plaf/basic/BasicLookAndFeel.java:
	Add JSlider defaults.
	* javax/swing/plaf/basic/BasicSliderUI.java:
	Implement. New file.

From-SVN: r79607
2004-03-17 21:29:02 +00:00
Alan Modra d1d5c836a1 linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Don't bump retaddr here.
* config/rs6000/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Don't
	bump retaddr here.

	* include/powerpc-signal.h: Revert 2004-01-21 change.
	(INIT_SEGV, INIT_FPE): Provide powerpc64 versions.  Check return
	from syscall for ppc32 versions.

From-SVN: r77601
2004-02-10 23:57:43 +10:30
Andreas Jaeger fb1b37c797 * include/x86_64-signal.h: Fix typo.
From-SVN: r77491
2004-02-08 18:35:52 +01:00
Diego Novillo 9d4d854dc3 i386-signal.h (HANDLE_DIVIDE_OVERFLOW): Add volatile qualifier to _regs.
* include/i386-signal.h (HANDLE_DIVIDE_OVERFLOW): Add volatile
	qualifier to _regs.

From-SVN: r77489
2004-02-08 12:13:50 -05:00
Diego Novillo 6bdd607046 i386-signal.h (MAKE_THROW_FRAME): Add volatile qualifier to _regs.
* include/i386-signal.h (MAKE_THROW_FRAME): Add volatile
	qualifier to _regs.

From-SVN: r77484
2004-02-08 11:51:03 -05:00
Michael Koch 3953c05789 jvm.h (MAYBE_UNUSED): New macro tp mark probably unused arguments.
2004-02-01  Michael Koch  <konqueror@gmx.de>

	* include/jvm.h (MAYBE_UNUSED): New macro tp mark probably unused
	arguments.
	* jni.cc (_Jv_LookupJNIMethod): Mark 'args_size' unused.
	* verify.cc (debug_print): Mark 'fmt' unused.

From-SVN: r77079
2004-02-01 20:05:03 +00:00
Jakub Jelinek 02731d29be linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Corrected to handle kernels with changed ucontext.
* config/rs6000/linux64.h (MD_FALLBACK_FRAME_STATE_FOR)
	[!__powerpc64__]: Corrected to handle kernels with changed ucontext.

	* include/powerpc-signal.h: Add #ifndef __powerpc64__ around the
	header.  For __powerpc64__ provide the default-signal.h definitions
	for now.
	* include/x86_64-signal.h [!__x86_64__]: Include java-signal-aux.h
	instead of the dummy definitions.
	* configure.host (x86_64-*): Remove CHECKREFSPEC, add DIVIDESPEC.
	(powerpc64*-*): Remove with_libffi_default.
	Only add -mminimal-toc for 64-bit compilations.
	* configure.in: Use powerpc-signal.h on powerpc64 as well.
	(x86_64-*-linux*): Set SIGNAL_HANDLER_AUX.
	Link SIGNAL_HANDLER_AUX to include/java-signal-aux.h.
	* configure: Rebuilt.

From-SVN: r76437
2004-01-23 18:32:16 +01:00
David Jee 3c3a78a502 2004-01-13�� David Jee�� <djee@redhat.com>
����������������* Makefile.am: Add BitwiseXORComposite.java.
����������������* Makefile.in: Regenerated.
����������������* gcj/Makefile.in: Regenerated.
����������������* include/Makefile.in: Regenerated.
����������������* testsuite/Makefile.in: Regenerated.

From-SVN: r75808
2004-01-13 17:37:23 +00:00
Mohan Embar 5cd4d463f9 win32.cc (WSAEventWrapper): Implemented default constructor and init() methods.
* win32.cc (WSAEventWrapper): Implemented default
	constructor and init() methods.
	(_Jv_select): Removed.
	* gnu/java/nio/natSelectorImplWin32.cc
	(helper_put_filedescriptors): Removed.
	(helper_get_filedescriptors): Removed.
	(implSelect): Implemented in terms of WSAEventWrapper
	and WSAWaitForMultipleEvents instead of _Jv_select().
	Added support for thread interruption.
	* include/win32.h (WSAEventWrapper): Minor formatting
	changes; added default constructor declaration, init(),
	getFD() and getEventHandle() methods.
	(_Jv_select): Removed.

From-SVN: r74715
2003-12-16 22:54:22 +00:00
Mohan Embar 83c02e38a3 configure.in: Added new MinGW-specific configure flag --with-win32-nlsapi.
* configure.in: Added new MinGW-specific configure flag
	--with-win32-nlsapi.
	Added new AC_DEFINE MINGW_LIBGCJ_UNICODE.
	Add -lunicows to MinGW SYSTEMSPEC if --with-win32-nlsapi
	is set to unicows.
	* configure: Rebuilt.
	* include/config.h.in: Rebuilt.
	* win32.cc (_Jv_Win32NewString): Implemented.
	(nativeToUnicode): New helper function defined only for
	non-UNICODE builds.
	(unicodeToNative): Likewise.
	(_Jv_Win32TempString): Implemented.
	(lots): Refactored using tchar.h macros.
	(WSAEventWrapper): Use _Jv_Win32NewString.
	(_Jv_platform_initialize): Use GetModuleFileNameA instead
	of GetModuleFileName.
	(_Jv_platform_initProperties): Use _Jv_Win32NewString.
	Use temporary stack buffer instead of a heap buffer.
	* include/win32.h
	Added defines for UNICODE and _UNICODE if MINGW_LIBGCJ_UNICODE is
	defined; added tchar.h include.
	(_Jv_Win32TempString): Declared new helper class.
	(JV_TEMP_STRING_WIN32): New helper macro.
	(_Jv_Win32NewString): Declared new helper method.
	* java/io/natFileDescriptorWin32.cc (open): Use
	JV_TEMP_STRING_WIN32 instead of JV_TEMP_UTF_STRING.
	(write): Reformatted slightly.
	* java/io/natFileWin32.cc (lots): Use tchar.h macros;
	use JV_TEMP_STRING_WIN32 instead of JV_TEMP_UTF_STRING.
	(getCanonicalPath): Use _Jv_Win32NewString instead of
	JvNewStringUTF.
	(performList): Likewise.
	* java/lang/natWin32Process.cc (ChildProcessPipe):
	Use tchar.h macros.
	(startProcess): Use tchar.h macros, JV_TEMP_STRING_WIN32,
	and UNICODE environment flag for CreateProcess.
	* java/net/natNetworkInterfaceWin32.cc
	(winsock2GetRealNetworkInterfaces): Use tchar.h macros and
	_Jv_Win32NewString.

From-SVN: r74201
2003-12-02 22:26:50 +00:00
Danny Smith 2fe6fc5268 jni.cc (JNI_CreateJavaVM): Remove JNIEXPORT.
* jni.cc (JNI_CreateJavaVM): Remove JNIEXPORT.
	(JNI_GetCreatedJavaVMs): Likewise.
	(JNI_GetDefaultJavaVMInitArgs): Likewise.
	* include/jni.h (JNIIMPEXP): Remove definition
	and replace with...
	(__GCJ_JNIIMPEXP__): New macro, applicable only to libgcj
	symbols,
	(__GCJ_DLL__): New macro, controlling __GCJ_JNIIMPEXP__.

From-SVN: r73484
2003-11-12 05:56:44 +00:00
Mohan Embar bbf76ec06c win32.h (_Jv_platform_close_on_exec): Changed signature and declared extern.
* include/win32.h (_Jv_platform_close_on_exec): Changed
	signature and declared extern.
	* win32.cc (_Jv_platform_close_on_exec): Implemented.
	* gnu/java/net/natPlainDatagramSocketImplWin32.cc
	(create): Use new signature of _Jv_platform_close_on_exec.
	* gnu/java/net/natPlainSocketImplWin32.cc
	(create): Eliminated a few typecasts
	Use new signature of _Jv_platform_close_on_exec.
	(accept): Eliminated a few typecasts
	Use new signature of _Jv_platform_close_on_exec.
	* java/io/natFileDescriptorWin32.cc (open): Use
	_Jv_platform_close_on_exec.

From-SVN: r73325
2003-11-07 03:13:56 +00:00
Bryce McKinlay b9b5672b49 Constructor.java (toString): Avoid extra whitespace on constructor with no modifiers.
2003-10-26  Bryce McKinlay  <bryce@mckinlay.net.nz>

	* java/lang/reflect/Constructor.java (toString): Avoid extra
	whitespace on constructor with no modifiers.
	* java/lang/reflect/natConstructor.java (newInstance): Look up
	caller and perform accessibility check only if constructor is
	non-public and accessible flag is not set.

2003-10-26  Bryce McKinlay  <bryce@mckinlay.net.nz>

	* jni.cc (_Jv_JNI_CallAnyMethodV, _Jv_JNI_CallAnyMethodA,
	_Jv_JNI_CallAnyVoidMethodV, _Jv_JNI_CallAnyVoidMethodA): Don't
	use _Jv_LookupDeclaredMethod(). Call _Jv_CallAnyMethodA with
	is_virtual_call argument.
	* include/jvm.h (_Jv_isVirtualMethod): Moved and renamed from
	natClass.cc.
	* java/lang/natClass.cc (_Jv_LayoutVTableMethods): Use
	_Jv_isVirtualMethod.
	* java/lang/reflect/natMethod.cc (invoke): Don't use
	_Jv_LookupDeclaredMethod.
	(_Jv_CallAnyMethodA): New is_virtual_call argument. If specified,
	look up method in target object's vtable.

From-SVN: r72942
2003-10-26 02:25:42 +00:00
Andrew Haley 904715853c lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
2003-10-22  Andrew Haley  <aph@redhat.com>

        * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
        (java_get_callee_fndecl): New.

        * jcf-parse.c (java_parse_file): Call emit_catch_table().

        * java-tree.h (ctable_decl): New.
        (catch_classes):  New.
        (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.

        * decl.c (java_init_decl_processing): Add catch_class_type.
        Add ctable_decl.
        Add catch_classes field.

        * class.c (build_indirect_class_ref): Break out from
        build_class_ref.
        (make_field_value): Check flag_indirect_dispatch.
        (make_class_data): Ditto.
        Tidy uses of PUSH_FIELD_VALUE.
        Add field catch_classes.
        (make_catch_class_record): New.

        * java-tree.h (PUSH_FIELD_VALUE): Tidy.

2003-10-22  Andrew Haley  <aph@redhat.com>

        * java/lang/natClass.cc (initializeClass): Call
        _Jv_linkExceptionClassTable.
        (_Jv_LinkSymbolTable): Call )_Jv_ThrowNoSuchMethodError.  Call
        _Jv_Defer_Resolution on a method whose ncode is NULL.
        (_Jv_linkExceptionClassTable): New function.
        (_Jv_LayoutVTableMethods): If superclass looks like a constant pool
        entry, look it up.
        * java/lang/Class.h (struct _Jv_CatchClass): New.
        (_Jv_linkExceptionClassTable): New friend.
        (_Jv_Defer_Resolution): New friend.
        (class Class.catch_classes): New field.
        * include/java-interp.h (Jv_Defer_Resolution): New method.
        (_Jv_PrepareClass): Make a friend of _Jv_MethodBase.
        (_Jv_MethodBase.deferred): New field.
        (_Jv_Defer_Resolution): New function.
        * resolve.cc (_Jv_PrepareClass): Resolve deferred handlers.
        * exception.cc (get_ttype_entry): Change return type to void**.
        (PERSONALITY_FUNCTION): Remove all code related to using a
        Utf8Const* for a match type.  Change match type to be a pointer to
        a pointer, rather than a pointer to a Class.
        * defineclass.cc (handleCodeAttribute): Initialize
        method->deferred.
        (handleMethodsEnd): Likewise.

From-SVN: r72886
2003-10-24 09:29:43 +00:00
David Daney 1322946805 mips-signal.h: New file.
2003-10-22  David Daney  <ddaney@avtrex.com)

	* include/mips-signal.h: New file.
	* sysdep/dwarf2-backtrace.cc: New file.
	* sysdep/mips: New directory.
	* sysdep/mips/locks.h: New file.
	* Makefile.am(extra_cc_files): New, to allow extra c++ files to be
	added to libgcj.
	(extra_cc_source_files): Ditto.
	* configure.host(disable_dladdr):  New shell variable passed to
	configure.
	(mips*-*-linux*): sysdeps_dir=mips,
	can_unwind_signal=yes, disable_dladdr=yes, use -mxgot.
	(mipsel*-linux* | mipsisa32el*-linux*): Enable hash synchronization.
	* configure.in:(mips*-*-linux*): Use sysdep/dwarf2-backtrace.cc to
	generate backtrace, and include/mips-signal.h as SIGNAL_HANDLER
	(HAVE_DLADDR): Make it depend on setting of disable_dladdr.
	(EXTRA_CC_FILES): New, to support conditional addition of
	sysdep/dwarf2-backtrace.cc.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* gcj/Makefile.in: Regenerated.
	* include/config.h.in: Regenerated.
	* include/Makefile.in: Regenerated.
	* testsuite/Makefile.in: Regenerated.

From-SVN: r72808
2003-10-22 16:35:17 +00:00
Jerry Quinn 16a10fb6fc posix-threads.cc (_Jv_CondNotify,_Jv_CondNotifyAll): Rename _Jv_PthreadCheckMonitor to _Jv_MutexCheckMonitor.
2003-10-21  Jerry Quinn  <jlquinn@optonline.net>

        * posix-threads.cc (_Jv_CondNotify,_Jv_CondNotifyAll): Rename
        _Jv_PthreadCheckMonitor to _Jv_MutexCheckMonitor.
	* include/no-threads.h (_Jv_MutexCheckMonitor): New.
	* include/posix-threads.h (_Jv_MutexCheckMonitor): Rename from
        _Jv_PthreadCheckMonitor.  Simplify code.
	(_Jv_MutexUnlock): Use _Jv_MutexCheckMonitor.
	* include/win32-threads.h (_Jv_MutexCheckMonitor): New.
	* java/lang/Object.h (_Jv_ObjectCheckMonitor): Declare.
	* java/lang/Thread.java (holdsLock): New.
	* java/lang/natObject.cc (_Jv_ObjectCheckMonitor): New, with and
        without JV_HASH_SYNCHRONIZATION.
	* java/lang/natThread.cc (java::lang::Thread::holdsLock): New.

From-SVN: r72741
2003-10-21 04:46:19 +00:00
Mohan Embar ef050c9e23 win32.cc: (_Jv_pipe) Implemented.
* win32.cc: (_Jv_pipe) Implemented.
	* gnu/java/nio/natPipeImpl.cc: (nativeInit) Use
	_Jv_pipe instead of ::pipe.
	* include/posix.h: (_Jv_pipe) New inline.
	* include/win32.h: (_Jv_pipe) New declaration.

From-SVN: r72616
2003-10-17 18:44:42 +00:00
Andrew Haley 9dfc2ec225 jcf-parse.c (java_parse_file): Write otable and atable.
2003-10-01  Andrew Haley  <aph@redhat.com>

        * jcf-parse.c (java_parse_file): Write otable and atable.
        * java-tree.h (atable_methods): New.
        (atable_decl): New.
        (atable_syms_decl): New.
        (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
        JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
        (symbol_*type): Rename method_symbol* to symbol*type.
        (emit_offset_symbol_table): Delete.
        (emit_symbol_table): New.
        (get_symbol_table_index): New.
        (atable_type): New.
        * expr.c (build_field_ref): Handle flag_indirect_dispatch.
        (build_known_method_ref): Likewise.
        (get_symbol_table_index): Rename from get_offset_table_index.
        Parameterize to allow re-use by differing types of symbol table.
        (build_invokevirtual): Pass table to get_offset_table_index.
        * decl.c (java_init_decl_processing): Push types and decls for
        atable and atable_syyms.
        * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
        (make_class_data): Add new fields atable and atable_syms.
        (emit_symbol_table): Rename from emit_offset_symbol_table.
        Parameterize to allow re-use by different types of symbol table.
        (build_symbol_entry): Renamed from build_method_symbols_entry.

2003-10-01  Andrew Haley  <aph@redhat.com>

        * java/lang/natClass.cc (initializeClass): Check for otable and
        atable.
        (_Jv_LinkOffsetTable): Check for existence of atable.  Rewrite
        loops using for().  Search superinterfaces.  Check for fields as
        well as methods.  Initialize atable as well as otable: check for
        static methods as well as virtual methods.
        * java/lang/Class.h (struct _Jv_AddressTable): New.
        (atable): New.
        (atable_syms): New.
        * include/jvm.h (_Jv_equalUtf8Consts): constify.
        * prims.cc (_Jv_equalUtf8Consts): constify.

From-SVN: r71979
2003-10-01 16:22:13 +00:00
Tom Tromey 2cd5614273 re PR libgcj/10596 (Reference and String.intern don't work together)
PR libgcj/10596:
	* include/jvm.h (_Jv_FinalizeString,
	_Jv_RegisterStringFinalizer): Declare.
	* java/lang/natString.cc (_Jv_FinalizeString): Renamed from
	unintern.
	(intern): Updated.
	(_Jv_NewStringUtf8Const): Likewise.
	* java/lang/ref/natReference.cc (finalize_referred_to_object):
	Add special case when finalizing a String.
	(in_hash): New function.
	(_Jv_RegisterStringFinalizer): Likewise.
	(maybe_add_finalize): Likewise.

From-SVN: r71915
2003-09-29 21:13:55 +00:00
Mohan Embar b90e0e3cdb win32-threads.cc: (ensure_interrupt_event_initialized) New function for lazy initialization of an...
* win32-threads.cc: (ensure_interrupt_event_initialized) New
	function for lazy initialization of an auto-reset event.
	(_Jv_CondWait) Added thread interrupt support.
	(_Jv_ThreadInitData) Added initialization of interrupt support
	members.
	(_Jv_ThreadDestroyData) Added cleanup of interrupt support members.
	(_Jv_ThreadStart) Removed unused code.
	(_Jv_Win32GetInterruptEvent) New method for returning interrupt event
	to an external caller.
	(_Jv_ThreadInterrupt) Implemented.
	* include/win32-threads.h: (_Jv_Thread_t) Added a Win32 auto-reset
	event for interrupt support as well as a mutex which regulates
	access to this.
	(_Jv_Win32GetInterruptEvent) Declared new method for returning interrupt
	event to an external caller.
	* java/lang/natWin32Process.cc: (cleanup) Close handle to spawned
	process.
	(waitFor) Added interrupt support.

From-SVN: r71562
2003-09-19 08:28:43 +00:00
Michael Koch e1a3a7d02b acconfig.h: Removed most items.
2003-09-11  Michael Koch  <konqueror@gmx.de>

	* acconfig.h: Removed most items.
	* configure.in: Added descriptions to AC_DEFINE macros that where in
	acconfig.h before.
	* include/config.h.in: Regenerated.

From-SVN: r71309
2003-09-11 17:25:47 +00:00
Mohan Embar 5c14415811 win32.cc: fixed tab...
* 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
2003-08-29 04:21:01 +00:00
Tom Tromey 91edd042ff Makefile.in: Rebuilt.
* 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
2003-08-28 22:17:37 +00:00
Scott Gilbertson c79c6c5b9e Makefile.am (gtk_awt_peer_sources): Add gnu/java/awt/peer/GLightweightPeer.java.
2003-08-21  Scott Gilbertson  <scottg@mantatest.com>
            Thomas Fitzsimmons  <fitzsim@redhat.com>

	* Makefile.am (gtk_awt_peer_sources): Add
	gnu/java/awt/peer/GLightweightPeer.java.  Remove
	gnu/java/awt/GLightweightPeer.java.
	* gnu/java/awt/GLightweightPeer.java: Remove file.
	* gnu/java/awt/peer/GLightweightPeer.java: New file.
	* java/awt/Component.java (getToolkit): Add comment about
	lightweight components.
	* java/awt/Toolkit.java (createComponent): Return
	gnu.java.awt.peer.GLightweightPeer.

Co-Authored-By: Thomas Fitzsimmons <fitzsim@redhat.com>

From-SVN: r70657
2003-08-21 18:39:56 +00:00
Mohan Embar dca5e0e850 jvm.h: New class _Jv_TempUTFString (helper class for getting a temporary C string from...
* 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
2003-08-19 11:48:59 +00:00
Tom Tromey 0da021f5cc re PR libgcj/11951 (natMethod.cc (_Jv_CallAnyMethodA) should clear ffi_result before ffi_call)
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
2003-08-18 14:36:07 +00:00
Andrew Haley cf68fdb19b i386-signal.h (RESTORE): New.
2003-07-08  Andrew Haley  <aph@redhat.com>

        * include/i386-signal.h (RESTORE): New.
        (INIT_SEGV): Set restorer.
        (INIT_FPE): Likewise.

From-SVN: r69957
2003-07-30 14:50:02 +00:00
Tom Tromey ffd94572f4 Runtime.java: Comment fix.
* java/lang/Runtime.java: Comment fix.
	* java/lang/ClassLoader.java (isAncestorOf): New method.
	(getParent): Uncommented security check.  Use isAncestorOf.
	* include/jvm.h (_Jv_CheckAccess): Declare.
	* java/lang/reflect/natConstructor.cc (newInstance): Perform
	access check.
	Include IllegalAccessException.h, ArrayIndexOutOfBoundsException.h.
	* java/lang/reflect/natArray.cc (newInstance): Pass caller's
	class loader to _Jv_GetArrayClass.
	Include ArrayIndexOutOfBoundsException.h.
	* java/lang/reflect/Field.java: Update comment to reflect status.
	(equals): Fixed indentation.
	* java/lang/Class.h (Class): Declare memberAccessCheck, not
	checkMemberAccess.  Make _Jv_CheckAccess a friend.
	* java/lang/Class.java (memberAccessCheck): New method from
	Classpath.
	(checkMemberAccess): Removed.
	(getDeclaredMethod): Use memberAccessCheck.
	(getField): Likewise.
	(getMethod): Likewise.
	* resolve.cc (_Jv_ResolvePoolEntry): Use _Jv_CheckAccess.
	(_Jv_SearchMethodInClass): Likewise.
	* prims.cc (_Jv_CheckAccess): New function.
	* jni.cc (_Jv_JNI_FindClass): Use getClassLoaderInternal.
	(_Jv_JNI_GetAnyFieldID): Likewise.
	* java/lang/natClass.cc (forName): Use getClassLoaderInternal.
	(getClassLoader): Added security check.
	(getConstructor): Call memberAccessCheck.
	(getDeclaredClasses): Likewise.
	(getDeclaredField): Likewise.
	(getDeclaredFields): Likewise.
	(_getConstructors): Likewise.
	(getDeclaredConstructor): Likewise.
	(getDeclaredMethods): Likewise.
	(getFields): Likewise.
	(getMethods): Likewise.
	(newInstance): Likewise.
	(_Jv_MakeVTable): Put method name in exception.
	* java/lang/reflect/natMethod.cc (getType): Use
	getClassLoaderInternal.
	(_Jv_GetTypesFromSignature): Likewise.
	(invoke): Perform access check.
	(_Jv_CallAnyMethodA): Removed old FIXME comments.
	Include ArrayIndexOutOfBoundsException.h.
	* java/lang/reflect/natField.cc (getType): Use
	getClassLoaderInternal.
	(_Jv_CheckFieldAccessibility): Removed.
	(getAddr): Use _Jv_CheckAccess; find caller.
	Include ArrayIndexOutOfBoundsException.h.

From-SVN: r69621
2003-07-21 01:54:06 +00:00
Rainer Orth 6b3517eaf5 configure.in: Check for usleep declaration.
* configure.in: Check for usleep declaration.
	* acconfig.h (HAVE_USLEEP_DECL): Provide template.
	* configure: Regenerate.
	* include/config.h.in: Likewise.
	* include/posix.h [!HAVE_USLEEP_DECL]: Declare usleep.

From-SVN: r69041
2003-07-07 14:11:09 +00:00
Thomas Fitzsimmons 29e531ff29 glib-2.0.m4: New file.
* glib-2.0.m4: New file.
	* gtk-2.0.m4: New file.
	* glib.m4: Remove.
	* gtk.m4: Remove.
	* configure.in: Update AM_PATH_GTK macro call to
	AM_PATH_GTK_2_0.  Likewise for AM_PATH_GLIB.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c,
	jni/gtk-peer/gthread-jni.c,
	jni/gtk-peer/gthread-jni.h:
	New versions from classpath.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* gcj/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

From-SVN: r68746
2003-06-30 23:53:29 +00:00
Franz Sirl 7d8b7202f8 Oops, accidentally committed the 3.3 version to mainline. Undone.
From-SVN: r68156
2003-06-18 15:29:12 +00:00
Franz Sirl beea232412 powerpc-signal.h: New File.
2003-06-17  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>

	* include/powerpc-signal.h: New File.
	* configure.in: Use it.
	* configure: Regenerated.

From-SVN: r68088
2003-06-17 15:56:09 +00:00
Andrew Haley bec3e66d1a prims.cc (catch_segv): Create exception in handler.
2003-06-12  Andrew Haley  <aph@redhat.com>

        * prims.cc (catch_segv): Create exception in handler.
        (catch_fpe): Likewise.
        (_Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ): Likewise.
        (_Jv_ThrowSignal): Remove.

        * include/x86_64-signal.h (INIT_SEGV): Delete reference to nullp.
        * include/default-signal.h (INIT_SEGV, INIT_FPE): Delete reference
        to nullp and arithexception.
        * include/dwarf2-signal.h (INIT_SEGV, INIT_FPE): Likewise.
        * include/i386-signal.h (INIT_SEGV, INIT_FPE): Likewise.
        * include/s390-signal.h (INIT_SEGV, INIT_FPE): Likewise.
        * include/sparc-signal.h (INIT_SEGV, INIT_FPE): Likewise.
        * include/win32-signal.h (INIT_SEGV, INIT_FPE): Likewise.

From-SVN: r67892
2003-06-13 12:20:45 +00:00
Michael Koch 248e983efb 2003-06-07 Michael Koch <konqueror@gmx.de>
* include/posix.h
	(O_DSYNC): Define O_DSYNC on platforms not
	supporting O_FSYNC (newlib).

From-SVN: r67587
2003-06-07 14:30:32 +00:00
Loren J. Rittle 49c72d225b posix.h (O_SYNC): Define if not available and a reasonable...
* libjava/include/posix.h (O_SYNC): Define if not available
	and a reasonable, perhaps more conservative, replacement exists.
	(O_DSYNC): Likewise.
	* java/io/natFileDescriptorPosix.cc (open): Revert last patch.

From-SVN: r67517
2003-06-05 22:37:02 +00:00
Bert Deknuydt ad23ad2cbe posix-threads.h: Include <machine/pal.h> on OSF.
2003-06-05  Bert Deknuydt  <Bert.Deknuydt@esat.kuleuven.ac.be>

	* include/posix-threads.h: Include <machine/pal.h> on OSF.

From-SVN: r67491
2003-06-05 15:43:58 +00:00
Andrew Haley 9f47031337 x86_64-signal.h (MAKE_THROW_FRAME): Mark sigcontext on stack volatile to prevent optimization from removing it.
2003-06-03  Andrew Haley  <aph@redhat.com>

        * include/x86_64-signal.h (MAKE_THROW_FRAME): Mark sigcontext on
        stack volatile to prevent optimization from removing it.

From-SVN: r67379
2003-06-03 16:13:22 +00:00
Mohan Embar c4519773ca jvm.h: (_Jv_GetNbArgs) added (_Jv_GetSafeArg) added (_Jv_SetArgs) added
2003-03-29  Mohan Embar  <gnustuff@thisiscool.com>

        * include/jvm.h: (_Jv_GetNbArgs) added
        (_Jv_GetSafeArg) added
        (_Jv_SetArgs) added
        * prims.cc: (_Jv_GetNbArgs) implemented
        (_Jv_GetSafeArg) implemented
        (_Jv_SetArgs) implemented
        (_Jv_RunMain) use _Jv_SetArgs() instead of explicitly
        setting _Jv_argc and _Jv_argv
        * posix.cc: (_Jv_ThisExecutable) use _Jv_GetSafeArg()
        instead of _Jv_argv
        * java/lang/natRuntime.cc: (insertSystemProperties) use
        _Jv_GetSafeArg() instead of _Jv_argv

From-SVN: r66067
2003-04-25 16:48:13 +00:00
Andreas Tobler dcde977582 posix.h: Add suffix for darwin dynamic libraries.
2003-03-22  Andreas Tobler <a.tobler@schweiz.ch>

        * include/posix.h: Add suffix for darwin dynamic libraries.

From-SVN: r64705
2003-03-22 11:56:44 +01:00
Tom Tromey 2b7f1f8f41 resolve.cc (ncode): Use _Jv_platform_ffi_abi.
* resolve.cc (ncode): Use _Jv_platform_ffi_abi.
	Include platform.h.
	* java/lang/natRuntime.cc (insertSystemProperties): Use
	_Jv_platform_path_separator.
	(nativeGetLibname): Use _Jv_platform_file_separator.
	(_load): Use _Jv_platform_onload_names.
	(onload_names): New global.
	* include/win32.h (_Jv_platform_file_separator): New define.
	(_Jv_platform_path_separator): Likewise.
	(_Jv_platform_onload_names): Likewise.
	(_Jv_platform_ffi_abi): Likewise.
	* include/posix.h (_Jv_platform_file_separator): New define.
	(_Jv_platform_path_separator): Likewise.
	(_Jv_platform_onload_names): Likewise.
	(_Jv_platform_ffi_abi): Likewise.

From-SVN: r64461
2003-03-17 00:45:37 +00:00
Andrew Haley c068c63834 [multiple changes]
2003-03-10  2003-02-27  Mohan Embar  <gnustuff@thisiscool.com>

        * include/jvm.h: removed declaration of _Jv_ThisExecutable()
        setter; made return value of getter const char* instead of char*
        * prims.cc: removed all references to _Jv_ThisExecutable().
        These are in the platform-specific sections now.
        * posix.cc: define platform-specific _Jv_ThisExecutable().
        Handle DISABLE_MAIN_ARGS and HAVE_PROC_SELF_EXE cases
        * win32.cc: define platform-specific _Jv_ThisExecutable()
        using GetModuleFilename()
        * java/lang/natRuntime.cc: set gnu.gcj.progname property
        to argv[0] instead of _Jv_ThisExecutable()

2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>

        * gnu/gcj/runtime/NameFinder.java (usingAddr2name): New flag
        that is set if we are using addr2name.awk instead of addr2line.
        (NameFinder): Set usingAddr2name if using addr2name.awk.
        (getExternalLabel): New native method to convert a method
        name to an external label.
        (lookup): Convert name given by addr2line to an external label
        before demangling.

        * gnu/gcj/runtime/natNameFinder.cc (LABEL_PREFIX): New string
        constant representing the prefix attached to method names to
        convert them to an external label.
        (gnu::gcj::runtime::NameFinder::getExternalLabel): Define
        using LABEL_PREFIX.

From-SVN: r64111
2003-03-10 19:45:30 +00:00
Michael Koch c0daa90283 configure.in: Added check for memory mapping of files.
2003-03-02  Michael Koch  <konqueror@gmx.de>

	* configure.in: Added check for memory mapping of files.
	* configure: Regenerated.
	* config.h.in: Regenerated.

From-SVN: r63661
2003-03-02 13:46:06 +00:00
Tom Tromey cf88ede3d2 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (JC1FLAGS): Added -Wno-deprecated.

From-SVN: r63352
2003-02-24 02:15:43 +00:00
Rainer Orth a191802c42 natStackTrace.cc: Include platform.h immediately after config.h.
* gnu/gcj/runtime/natStackTrace.cc: Include platform.h immediately
	after config.h.  Use <> for consistency.
	* java/lang/natObject.cc: Likewise.
	* java/lang/natRuntime.cc: Likewise.
	* java/lang/natSystem.cc: Likewise.
	* java/util/natTimeZone.cc: Likewise.
	* win32.cc: Likewise.
	* include/posix.h (fcntl, socket, connect, close, bind, accept,
	listen, write, read): Undef to avoid interference from OS macros.

From-SVN: r63122
2003-02-19 16:28:37 +00:00
Ranjit Mathew ea5a63a26d win32.h: Include ws2tcpip.h instead of winsock.h to obtain definition of the socklen_t type.
2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>

	* include/win32.h: Include ws2tcpip.h instead of
	winsock.h to obtain definition of the socklen_t type.
	Remove IP_TOS definition - not needed with ws2tcpip.h
	(_Jv_connect): Correct slight formatting error.

From-SVN: r62801
2003-02-13 00:07:37 +00:00
Tom Tromey 60c7f4ef5e aclocal.m4, [...]: Rebuilt.
* aclocal.m4, configure, include/config.h.in: Rebuilt.
	* acinclude.m4 (CHECK_FOR_BROKEN_MINGW_LD): Resurrected; was in
	aclocal.m4 and lost in some merge.

From-SVN: r62188
2003-01-31 17:59:00 +00:00
Tom Tromey 5aac1dac62 Window.java (Window(Window,GraphicsConfiguration)): Don't try to find graphics configuration.
* java/awt/Window.java (Window(Window,GraphicsConfiguration)):
	Don't try to find graphics configuration.
	* java/awt/Toolkit.java (default_toolkit_name): Use new
	Configuration entry.
	* gnu/classpath/Configuration.java.in (default_awt_peer_toolkit):
	New global.
	* configure: Rebuilt.
	* configure.in (TOOLKIT): New subst.
	(--enable-java-awt) [xlib, gtk]: Set TOOLKIT if required.
	Do AWT tests much earlier.  Run Gtk tests.  Make jniinclude
	directory.  Make output directories for .c files.
	* Makefile.in: Rebuilt.
	* Makefile.am (lib_gnu_java_awt_peer_gtk_la_SOURCES): New macro.
	(toolexeclib_LTLIBRARIES): Added cond_gtk_ltlibrary.
	(all_java_source_files): Added new sources.
	($(lib_gnu_java_awt_peer_gtk_la_OBJECTS)): New target.
	(gtk_c_files): New macro.
	(gtk_c_source_files): New macro.
	(cond_gtk_ltlibrary): New macro.
	($(gtk_c_files)): New target.
	(lib_gnu_java_awt_peer_gtk_la_LIBADD): New macro.
	(gtk_awt_peer_sources): New macro.
	(gtk_c_headers): New macro.
	($(gtk_c_headers)): New target.
	(ACLOCAL_AMFLAGS): New macro.
	* gtk.m4, glib.m4, libart.m4: New files.
	* gnu/java/awt/peer/gtk/GdkFontMetrics.java,
	gnu/java/awt/peer/gtk/GdkGraphics.java,
	gnu/java/awt/peer/gtk/GtkArg.java,
	gnu/java/awt/peer/gtk/GtkArgList.java,
	gnu/java/awt/peer/gtk/GtkButtonPeer.java,
	gnu/java/awt/peer/gtk/GtkCanvasPeer.java,
	gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.java,
	gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java,
	gnu/java/awt/peer/gtk/GtkCheckboxPeer.java,
	gnu/java/awt/peer/gtk/GtkChoicePeer.java,
	gnu/java/awt/peer/gtk/GtkClipboard.java,
	gnu/java/awt/peer/gtk/GtkComponentPeer.java,
	gnu/java/awt/peer/gtk/GtkContainerPeer.java,
	gnu/java/awt/peer/gtk/GtkDialogPeer.java,
	gnu/java/awt/peer/gtk/GtkFileDialogPeer.java,
	gnu/java/awt/peer/gtk/GtkFontPeer.java,
	gnu/java/awt/peer/gtk/GtkFramePeer.java,
	gnu/java/awt/peer/gtk/GtkGenericPeer.java,
	gnu/java/awt/peer/gtk/GtkImage.java,
	gnu/java/awt/peer/gtk/GtkImagePainter.java,
	gnu/java/awt/peer/gtk/GtkLabelPeer.java,
	gnu/java/awt/peer/gtk/GtkListPeer.java,
	gnu/java/awt/peer/gtk/GtkMainThread.java,
	gnu/java/awt/peer/gtk/GtkMenuBarPeer.java,
	gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java,
	gnu/java/awt/peer/gtk/GtkMenuItemPeer.java,
	gnu/java/awt/peer/gtk/GtkMenuPeer.java,
	gnu/java/awt/peer/gtk/GtkOffScreenImage.java,
	gnu/java/awt/peer/gtk/GtkPanelPeer.java,
	gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java,
	gnu/java/awt/peer/gtk/GtkScrollbarPeer.java,
	gnu/java/awt/peer/gtk/GtkScrollPanePeer.java,
	gnu/java/awt/peer/gtk/GtkTextAreaPeer.java,
	gnu/java/awt/peer/gtk/GtkTextComponentPeer.java,
	gnu/java/awt/peer/gtk/GtkTextFieldPeer.java,
	gnu/java/awt/peer/gtk/GtkToolkit.java,
	gnu/java/awt/peer/gtk/GtkWindowPeer.java,
	gnu/java/awt/peer/gtk/TestAWT.java,
	gnu/java/awt/peer/gtk/Test.java: New files from Classpath.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImagePainter.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c,
	jni/gtk-peer/gthread-jni.c, jni/gtk-peer/gthread-jni.h,
	jni/gtk-peer/gtkpeer.h, jni/classpath/jcl.c, jni/classpath/jcl.h,
	jni/classpath/jnilink.c, jni/classpath/jnilink.h,
	jni/classpath/native_state.c, jni/classpath/native_state.h,
	jni/classpath/primlib.c, jni/classpath/primlib.h: Likewise.

From-SVN: r62187
2003-01-31 17:54:14 +00:00
Ranjit Mathew 65b8e87409 re PR java/9254 (java::lang::Object::wait(), threads-win32.cc returns wrong return codes)
2003-01-28  Ranjit Mathew  <rmathew@hotmail.com>

	Fixes PR java/9254:
	* include/win32-threads.h (_Jv_Mutex_t): Convert to a struct
	additionally containing id of the owner thread as well as
	the number of nested times the thread has acquired the mutex.
	(_Jv_MutexInit): Initialise owner thread id and refcount to 0.
	(_Jv_MutexDestroy): Reset owner thread id and refcount to 0.
	(_Jv_MutexUnlock): Check if really the owner thread, reset
	owner thread id to 0 before leaving, if leaving for the last
	time.
	(_Jv_MutexLock): Set owner thread id in the mutex and increment
	refcount.
	(_Jv_ThreadYield): Yield using a call to Sleep(0).
	* win32-threads.cc (_Jv_CondWait): Check if really owner of
	the passed mutex.
	Pass handle of the broadcast event, instead of a pointer to it
	in Win32 ResetEvent( ) call.
	Remove incorrect return values.
	(_Jv_CondDestroy): Close both event handles and delete
	critical section.
	(_Jv_CondNotify): Check if really the owner thread.
	(_Jv_CondNotifyAll): Check if really the owner thread.
	(_Jv_InitThreads): Change daemon_cond to a manual-reset event.
	(really_start): Use SetEvent( ) to signal daemon_cond.
	(_Jv_ThreadWait): Remove SignalObjectAndWait( ) and use
	WaitForSingleObject( ) instead to wait for daemon_cond to be
	signalled.

From-SVN: r62033
2003-01-28 22:23:36 +00:00
Ranjit Mathew e4261ef72c configure.in: Specifically define HAVE_BACKTRACE if building for MinGW.
2003-01-27  Ranjit Mathew  <rmathew@hotmail.com>

	* configure.in: Specifically define HAVE_BACKTRACE if building
	for MinGW.
	* include/win32.h: Remove HAVE_BACKTRACE definition.
	* gnu/gcj/runtime/natStackTrace.cc: Include platform.h.
	* configure: Rebuilt.

From-SVN: r62000
2003-01-28 19:10:00 +00:00
Tom Tromey 4c98b1b078 defineclass.cc (handleMethodsEnd): Precompute code for static method.
* defineclass.cc (handleMethodsEnd): Precompute code for static
	method.
	(handleCodeAttribute): Likewise.
	* resolve.cc (ncode): Use run_class for unsynchronized static
	methods.
	* include/java-interp.h (class _Jv_InterpMethod): Declare
	run_class.
	* interpret.cc (run_synch_class): Initialize class.
	(run) [insn_invokestatic]: Don't initialize class.
	[insn_anewarray]: Likewise.
	[insn_multianewarray]: Likewise.
	(run_class): New function.

From-SVN: r61727
2003-01-24 19:58:21 +00:00
Andrew Haley f8061f6ab4 x86_64-signal.h: Add simple handler for x86_64 32-bit mode.
2003-01-22  Andrew Haley  <aph@redhat.com>

        * x86_64-signal.h: Add simple handler for x86_64 32-bit mode.
        * configure.host (CHECKREFSPEC): Define for x86_64.

From-SVN: r61600
2003-01-22 17:47:04 +00:00
Andrew Haley b399dfb0b4 dwarf2-signal.h: Remove x86_64.
2003-01-10  Andrew Haley  <aph@redhat.com>

        * include/dwarf2-signal.h: Remove x86_64.
        * configure.host (x86_64 DIVIDESPEC): Remove.
        * include/x86_64-signal.h: New file.
        * configure.in: Regenerate.

From-SVN: r61285
2003-01-14 14:02:13 +00:00
Andrew Haley 399df6db87 dwarf2-signal.h: Remove x86_64.
2003-01-10  Andrew Haley  <aph@redhat.com>

        * include/dwarf2-signal.h: Remove x86_64.
        * configure.host (x86_64 DIVIDESPEC): Remove.
        * include/x86_64-signal.h: New file.
        * configure.in: Regenerate.

From-SVN: r61284
2003-01-14 13:51:15 +00:00
Tom Tromey 6ec628973a posix.h (_Jv_platform_usleep): Wrap in ifdef JV_HASH_SYNCHRONIZATION.
* include/posix.h (_Jv_platform_usleep): Wrap in ifdef
	JV_HASH_SYNCHRONIZATION.
	* include/win32.h (_Jv_platform_usleep): Wrap in ifdef
	JV_HASH_SYNCHRONIZATION.

From-SVN: r60998
2003-01-07 16:50:08 +00:00
Tom Tromey 35a94bdca8 re PR libgcj/8997 (spin() calls Thread.sleep)
2002-12-31  Tom Tromey  <tromey@redhat.com>
            Ranjit Mathew  <rmathew@hotmail.com>

	Fix for PR libgcj/8997:
	* java/lang/natObject.cc (spin): Use _Jv_platform_usleep.
	Include platform.h.
	* include/posix.h (_Jv_platform_usleep): New function.
	* include/win32.h (_Jv_platform_usleep): New function.

Co-Authored-By: Ranjit Mathew <rmathew@hotmail.com>

From-SVN: r60700
2002-12-31 17:43:47 +00:00
Mark Mitchell dfe5a36e95 boehm.cc: Remove stray semicolon.
* boehm.cc: Remove stray semicolon.
	* interpret.cc: Likewise.
	* prims.cc: Likewise.
	* verify.cc (_Jv_BytecodeVerifier::verify_fail): Move definition
	earlier to ensure default arguments are processed.
	* gcj/array.h (JArray): Add forward declaration.
	(elements): Likewise.
	* gcj/javaprim.h: Remove stray semicolons.
	* include/bohm-gc.h: Likewise.
	* include/jni.h: Likewise.
	* include/jvm.h: Likewise.
	* java/lang/Class.h (_Jv_GetArrayClass): Declare _Jv_NewArrayClass.

From-SVN: r60556
2002-12-28 06:38:52 +00:00
Tom Tromey a1aba4f9a5 natClassLoader.cc (defineClass0): Removed erroneous comment.
* java/lang/natClassLoader.cc (defineClass0): Removed erroneous
	comment.
	* java/lang/ClassLoader.java (defineClass): Use chained
	exception when rethrowing.
	* defineclass.cc (handleClassBegin): Mark class as interpreted.
	* java/lang/reflect/Modifier.java (INVISIBLE, INTERPRETED): New
	constants.
	* resolve.cc (_Jv_PrepareMissingMethods): New function.
	(_Jv_PrepareClass): Use it.
	* include/java-interp.h (_Jv_IsInterpretedClass): Rewrote.
	(_Jv_InterpClass): _Jv_PrepareMissingMethods now friend.
	* java/lang/Class.h (Class::getModifiers): Mask with ALL_FLAGS.
	(Class): _Jv_PrepareMissingMethods now friend.
	* java/lang/natClassLoader.cc (defineClass0): Use JvSynchronize.
	Record `NULL' for system class loader.
	(_Jv_RegisterInitiatingLoader): Use JvSynchronize.  Special case
	system class loader.
	(_Jv_FindClassInCache): Likewise.
	(_Jv_UnregisterClass): Use JvSynchronize.  Free old loader info.
	(_Jv_FindClass): Special case system class loader.
	* java/lang/natClass.cc (_Jv_abstractMethodError): New function.
	(_Jv_SetVTableEntries): Put _Jv_abstractMethodError into empty
	vtable slots.
	(_Jv_LayoutVTableMethods): Don't generate vtable slot for a method
	in a final class.
	(_getDeclaredMethod): Don't return synthetic methods.
	(getDeclaredMethods): Likewise.
	(_getMethod): Likewise.
	(_getMethods): Likewise.

From-SVN: r60319
2002-12-19 19:31:55 +00:00
Tom Tromey 35cfd29184 win32.h: Fixed typo in "DISABLE_JAVA_NET".
* include/win32.h: Fixed typo in "DISABLE_JAVA_NET".
	From Laurent Bardet <l.bardet@magic.fr>.

From-SVN: r60013
2002-12-10 21:24:47 +00:00
Tom Tromey 78bb0444d2 win32.h (_Jv_platform_solib_prefix): New define.
* include/win32.h (_Jv_platform_solib_prefix): New define.
	(_Jv_platform_solib_suffix): Likewise.
	* include/posix.h (_Jv_platform_solib_prefix): New define.
	(_Jv_platform_solib_suffix): Likewise.
	* java/lang/natRuntime.cc: Include StackTrace.h.
	(_load): Use findLibrary and new platform defines.
	(nativeGetLibname): Use new platform defines.

From-SVN: r59976
2002-12-10 01:39:32 +00:00
Tom Tromey b4d0051bd9 java-interp.h (class _Jv_InterpMethod): Added JV_MARKOBJ_DECL.
* include/java-interp.h (class _Jv_InterpMethod): Added
	JV_MARKOBJ_DECL.
	* boehm.cc (_Jv_MarkObj): Consolidated interpreter code.  Also
	mark `prepared' field of interpreted method.
	* interpret.cc (compile): Use _Jv_AllocBytes.

From-SVN: r59900
2002-12-06 23:41:38 +00:00
Andrew Haley 421f9e6091 natClassLoader.cc (_Jv_PrepareCompiledClass): Call _Jv_PushClass.
2002-12-03  Andrew Haley  <aph@redhat.com>

        * java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call
	_Jv_PushClass.
        (_Jv_InitNewClassFields): Set protectionDomain and chain = NULL.
        (_Jv_PopClass): New.
        (_Jv_PushClass): New.
        * java/lang/natClass.cc (forName (jstring)): Use a StackTrace to
        discover the ClassLoader of our caller.
        (_Jv_CheckArrayStore): Don't check that a class is assignment
        compatible with Object.
        * java/lang/natVMTHrowable.cc: Delete.
        * gnu/gcj/runtime/StackTrace.java: New, partly copied from
	java.lang.VMThrowable.
        (StackTrace(), StackTrace(int)): New constructors.
        (classAt, methodAt, update, methodAtAddress): New methods.
        (map): New field.
	* java/lang/VMThrowable.java: Use StackTrace instead of
	natVMTHrowable.
	* java/lang/Class.h (getClassLoaderInternal): New.
        (class Class): Be friendly with _Jv_PopClass and _Jv_PushClass.
        Be friendly with gnu::gcj::runtime::StackTrace.
        (Object.chain): New field.
        * include/java-interp.h (class _Jv_InterpMethod): Be friendly with
        gnu::gcj::runtime::StackTrace.
        * prims.cc (_Jv_NewObjectArray): Use getClassLoaderInternal()
        instead of getClassLoader().
        * verify.cc (class _Jv_BytecodeVerifier): Likewise.
        java::lang::VMThrowable.
        * Makefile.am (core_java_source_files): Add MethodRef.java,
	StackTrace.java.
        (nat_source_files): Remove natVMThrowable.cc; add natStackTrace.cc.
        * Makefile.in: Rebuild.

2002-12-03  Andrew Haley  <aph@redhat.com>

	* class.c (make_class_data): New field, "chain".
	* decl.c (java_init_decl_processing): Likewise.

From-SVN: r59769
2002-12-03 13:50:05 +00:00
Tom Tromey 35e058a2b8 jni.cc: Added `name' argument.
* jni.cc: Added `name' argument.
	* include/jni.h (struct JNINativeInterface) [DefineClass]: Added
	`const char *' argument.
	(class _Jv_JNIEnv) [DefineClass]: Likewise.

From-SVN: r59756
2002-12-03 03:54:05 +00:00
Andreas Tobler 32e098dd98 natPlainDatagramSocketImpl.cc (socklen_t): Don't define.
2002-11-26  Andreas Tobler  <a.tobler@schweiz.ch>

	* java/net/natPlainDatagramSocketImpl.cc (socklen_t): Don't
	define.
	* java/net/natPlainSocketImpl.cc (socklen_t): Don't define.
	* include/posix.h (socklen_t): Define if not already defined.

From-SVN: r59533
2002-11-26 20:09:28 +00:00
Michael Koch c6d58c6682 2002-11-22 Michael Koch <konqueror@gmx.de>
* include/posix.h:
	(_Jv_platform_on_close): Moved out of #ifndef DISBALE_JAVA_NET.
	* include/win32.h:
	(_Jv_platform_on_close): Moved out of #ifndef DISBALE_JAVA_NET.
	(backtrace): Moved out of #ifndef DISBALE_JAVA_NET.

From-SVN: r59374
2002-11-22 10:27:53 +00:00
Michael Koch d1bf262d83 posix.h: I put too much into the #ifndef DISABLE_JAVA_NET.
2002-11-21  Michael Koch <konqueror@gmx.de>

        * include/posix.h: I put too much into the #ifndef DISABLE_JAVA_NET.
        Only the new network functions should be in it.

From-SVN: r59350
2002-11-21 18:01:22 +00:00
Michael Koch e59ff7e93a posic.h: Moved new functions into a #ifndef DISABLE_JAVA_NET
2002-11-21  Michael Koch <konqueror@gmx.de>

	* include/posic.h: Moved new functions into a #ifndef DISABLE_JAVA_NET
	* include/win32.h: Moved new functions into a #ifndef DISABLE_JAVA_NET

From-SVN: r59346
2002-11-21 14:34:12 +00:00
Michael Koch c3e0633cc3 2002-11-21 Michael Koch <konqueror@gmx.de>
* include/posix.h
       (_Jv_socket): New method.
       (_Jv_connect): New method.
       (_Jv_close): New method.
       (_Jv_platform_close_on_exec): Prefixed system function with "::".
       (_Jv_bind): New method.
       (_Jv_listen): New method.
       (_Jv_write): New method.
       (_Jv_read): New method.
       * include/win32.h
       (_Jv_socket): New method.
       (_Jv_connect): New method.
       (_Jv_close): New method.
       (_Jv_bind): New method.
       (_Jv_listen): New method.
       (_Jv_write): New method.
       (_Jv_read): New method.
       * java/net/natNetworkInterface.cc:
       Include platform.h, removed inclusion of socket.h
       (getRealNetworkInterfaces): Replaced ::socket() by _Jv_socket() and
       ::close() by _Jv_close().
       * java/net/natPlainDatagramSocketImpl.cc:
       Removed include of socket.h, definition of NATIVE_CLOSE and _Jv_bind,
       added some new lines to make code more readable.
       (create): Replaced ::socket() by _Jv_socket().
       (close): Replaced NATIVE_CLOSE() by _Jv_close().
       * java/net/natPlainSocketImpl.cc:
       Removed definition of NATIVE_CLOSE, _Jv_bind, Jv_connect and _Jv_accept,
       removed include of socket.h, removed some windows defines
       (now in include/win32.h).
       (create): Replaced ::socket() by _Jv_socket().
       (close): Replaced NATIVE_CLOSE() by _Jv_close().
       (write): Replaced ::read by _Jv_write().
       (read): Replaced ::read by _Jv_read().

From-SVN: r59338
2002-11-21 10:08:03 +00:00
Ranjit Mathew 93745862c4 jni.h: Add missing JNICALL and JNIEXPORT attributes to function and function pointer...
2002-11-19  Ranjit Mathew <rmathew@hotmail.com>

	* include/jni.h: Add missing JNICALL and JNIEXPORT attributes
	to function and function pointer declarations in accordance with
	Sun's JDKs. Define JNIIMPEXP to either JNIEXPORT or JNIIMPORT
	based on whether __GCJ_JNI_IMPL__ has been defined or not.
	* jni.cc: Add missing JNICALL and JNIEXPORT attributes to
	JNI function definitions.

From-SVN: r59277
2002-11-19 21:23:28 +00:00
Ranjit Mathew a2eb270a7e jni.h (JNIIMPORT, [...]): Linker defines for Win32.
2002-11-08  Ranjit Mathew <rmathew@hotmail.com>

	* include/jni.h (JNIIMPORT, JNIEXPORT, JNICALL): Linker defines
	for Win32. JNICALL has been defined to __stdcall to be compatible
	with Sun's JDKs.

From-SVN: r58985
2002-11-10 17:38:08 +00:00
Adam Megacz e2a450f6e8 aclocal.m4 (CHECK_FOR_BROKEN_MINGW_LD): added
2002-10-20  Adam Megacz <adam@xwt.org>

        * aclocal.m4 (CHECK_FOR_BROKEN_MINGW_LD): added
        * configure.in: enabled hash sync on Win32
        * include/win32-threads.h (_Jv_ThreadId_t): added.
        * java/lang/natObject.cc (_Jv_MonitorEnter, _Jv_MonitorExit,
        heavy_lock_obj_finalization_proc, wait, notify, notifyAll):
        removed some posix-isms, use Thread::sleep() instead of usleep,
        added code to clear bottom three bits if platform has a broken
        linker.  * include/win32-threads.h (_Jv_ThreadId_t): added.

From-SVN: r58344
2002-10-21 01:50:14 +00:00
Michael Koch 4d1d2b093d cvsignore: New file to ignore files generated during build.
2002-10-10  Michael Koch  <konqueror@gmx.de>

	* gcj/.cvsignore: New file to ignore files generated during build.
	* include/.cvsignore: New file to ignore files generated during build.

From-SVN: r58003
2002-10-10 05:21:53 +00:00
Tom Tromey d74732f5cd ObjectInputStream.java (resolveProxyClass): New method from Classpath.
* java/io/ObjectInputStream.java (resolveProxyClass): New method
	from Classpath.
	* Makefile.in: Rebuilt.
	* Makefile.am (rmi_java_source_files): Added new files.
	* gnu/java/rmi/RMIMarshalledObjectInputStream.java,
	gnu/java/rmi/RMIMarshalledObjectOutputStream.java,
	gnu/java/rmi/server/ConnectionRunnerPool.java: New files from
	Classpath.
	* gnu/java/rmi/dgc/DGCImpl.java,
	gnu/java/rmi/dgc/DGCImpl_Skel.java,
	gnu/java/rmi/dgc/DGCImpl_Stub.java,
	gnu/java/rmi/registry/RegistryImpl_Skel.java,
	gnu/java/rmi/registry/RegistryImpl_Stub.java,
	gnu/java/rmi/server/RMIHashes.java,
	gnu/java/rmi/server/RMIObjectInputStream.java,
	gnu/java/rmi/server/RMIObjectOutputStream.java,
	gnu/java/rmi/server/UnicastConnection.java,
	gnu/java/rmi/server/UnicastConnectionManager.java,
	gnu/java/rmi/server/UnicastRef.java,
	gnu/java/rmi/server/UnicastServer.java,
	gnu/java/rmi/server/UnicastServerRef.java,
	java/rmi/MarshalledObject.java,
	java/rmi/server/RMIClassLoader.java,
	java/rmi/server/RemoteObject.java,
	java/rmi/server/UnicastRemoteObject.java,
	java/security/SecureClassLoader.java: Merged from Classpath.

From-SVN: r57675
2002-10-01 03:46:43 +00:00
Anthony Green d3cc3f10da Add Proxy support.
From-SVN: r57635
2002-09-30 05:19:09 +00:00
Michael Koch a2f2457fa4 Matcher.java, [...]: Merge with classpath, new files.
2002-09-18  Michael Koch  <konqueror@gmx.de>

	* java/util/regex/Matcher.java, java/util/regex/Pattern.java,
	java/util/regex/PatternSyntaxException.java:
	Merge with classpath, new files.
	* Makefile.am (core_java_source_files):
	Added java/util/regex/Matcher.java,
	java/util/regex/Pattern.java,
	java/util/regex/PatternSyntaxException.java
	* Makefile.in: Regenerated.
	* include/config.h.in: Added HAVE_NET_IF_H.
	* java/net/natNetworkInterface.cc (getRealNetworkInterfaces):
	Removed #if 0 ... #endif.

From-SVN: r57275
2002-09-18 10:15:52 +00:00
Adam Megacz 981f97c364 natPlainDatagramSocket.cc: removed #include <ws2tcpip.h>; the mingw header is broken (conflicts with itself).
2002-09-14  Adam Megacz <adam@xwt.org>

        * java/net/natPlainDatagramSocket.cc: removed #include
        <ws2tcpip.h>; the mingw header is broken (conflicts with itself).
        * include/win32.h: included definition for IP_TOS to satisfy
        natPlainDatagramSocket.cc

From-SVN: r57151
2002-09-14 21:56:44 +00:00
Tom Tromey 0148e1ee90 natFileDescriptorPosix.cc (setLength): Handle case where ftruncate is missing.
* java/io/natFileDescriptorPosix.cc (setLength): Handle case where
	ftruncate is missing.
	* configure, include/config.h.in: Rebuilt.
	* acconfig.h (HAVE_FTRUNCATE): Mention.
	* configure.in: Check for ftruncate.

From-SVN: r56658
2002-08-29 18:05:15 +00:00
Tom Tromey 3308c46e47 jvm.h (struct _Jv_frame_info): New structure.
* include/jvm.h (struct _Jv_frame_info): New structure.
	* gnu/gcj/runtime/natNameFinder.cc: Include StringBuffer.h,
	java-interp.h.
	(lookupInterp): New method.
	(getAddrAsString): Use _Jv_frame_info.
	(dladdrLookup): Likewise.
	* gnu/gcj/runtime/NameFinder.java (lookup): Try to look up
	interpreted frame.
	(lookupInterp): Declare.
	* java/lang/natVMThrowable.cc: Include Thread.h, java-interp.h.
	(fillInStackTrace): Collect information on interpreted frames.
	Use _Jv_frame_info.
	* interpret.cc: Include Thread.h.
	(run): Create and push _Jv_MethodChain object.
	(_Jv_EndOfInterpreter): New global.
	* java/lang/Thread.java (interp_frame): New field.
	* include/java-interp.h (struct _Jv_MethodChain): New structure.
	Include NameFinder.h.

From-SVN: r56657
2002-08-29 17:53:28 +00:00
Tony Kimball 835cb22e3b natPlainDatagramSocketImpl.cc (NATIVE_CLOSE): New define.
2002-08-27  Tony Kimball <alk@pobox.com>
            Tom Tromey  <tromey@redhat.com>

	* java/net/natPlainDatagramSocketImpl.cc (NATIVE_CLOSE): New
	define.
	(::close): Removed.
	(PlainDatagramSocketImpl::close): Use NATIVE_CLOSE.
	* java/net/natPlainSocketImpl.cc (NATIVE_CLOSE): New define.
	(::close): Removed.
	(PlainSocketImpl::close): Use NATIVE_CLOSE.
	* include/win32.h (getcwd): Removed declaration.  Include io.h.

Co-Authored-By: Tom Tromey <tromey@redhat.com>

From-SVN: r56605
2002-08-27 16:08:31 +00:00
Adam Megacz 6005baa707 win32.h (getcwd): copied function declaration as temporary fix for header confusion.
2002-08-25  Adam Megacz <adam@xwt.org>

        * include/win32.h (getcwd): copied function declaration as
        temporary fix for header confusion.

From-SVN: r56574
2002-08-26 05:29:59 +00:00
Mark Wielaard 6e0532cdf6 Makefile.am (libgcj_la_SOURCES): Remove name-finder.cc.
* Makefile.am (libgcj_la_SOURCES): Remove name-finder.cc.
        (core_java_source_files): Add VMThrowable.java and NameFinder.java
        (nat_source_files): Remove natThrowable.cc, add natVMThrowable.cc
        and natNameFinder.cc.
        * Makefile.in: Regenerate.
        * prims.cc: Use trace_enabled from VMThrowable.
        * name-finder.cc: Removed.
        * gcj/javaprims.h: Add class VMThrowable.
        * gnu/gcj/runtime/NameFinder.java: New file.
        * gnu/gcj/runtime/natNameFinder.cc: Likewise.
        * include/name-finder.h: Removed.
        * java/lang/Throwable.java (printStackTrace (PrintStream)): Use new
        method stackTraceString().
        (printStackTrace (PrintWriter)): Likewise.
        (stackTraceString): Complete rewrite of old printStackTrace using
        StringBuffer.
        (stackTraceStringBuffer): New helper method for stackTraceString().
        (fillInStackTrace): Delegate to VMTrowable.
        (getStackTrace): Likewise.
        (getStackTrace0): Removed.
        (trace_enabled, stackTraceBytes): Moved to new VMThrowable.java.
        (setStackTrace): Copy given array.
        * java/lang/natThrowable.cc: Removed (replaced by natVMThrowable).
        * java/lang/VMThrowable.java: New class.
        * java/lang/natVMThrowable.cc: New file.

From-SVN: r56556
2002-08-24 22:46:19 +00:00
Bo Thorsen 7b20471292 ieeefp.h: Add x86-64 support.
2002-07-19  Bo Thorsen  <bo@berlioz.suse.de>

        * java/lang/ieeefp.h: Add x86-64 support.
        * configure.in: Likewise.
        * configure.host: Likewise.
        * configure: Regenerated.
        * sysdep/x86-64/locks.h: New file with x86-64 locks.

From-SVN: r55588
2002-07-19 16:41:15 +02:00
Mark Wielaard dc7b1dda60 natThrowable.cc (printRawStackTrace): removed.
* java/lang/natThrowable.cc (printRawStackTrace): removed.
	(getStackTrace0): new method.
	* java/lang/Throwable.java (CPlusPlusDemangler): removed.
	(printStackTrace(PrintWriter)): replace with pure java implementation.
	(printRawStackTrace): removed.
	(getStackTrace0): new method.
	* java/lang/StackTraceElement.java (toString): add extra whitespace.
	* gcj/javaprims.h: regenerate class list.
	* include/name-finder.h (lookup): new returns StackTraceElement*.
	(method_name, file_name): fields removed.
	(pid2, f2_pipe, b2_pipe, b2_pipe_fd): new fields.
	(~_Jv_name_finder): close new descriptors.
	* name-finder.cc(_Jv_name_finder): setup c++filt helper process.
	(createStackTraceElement): new method.
	(lookup): returns StackTraceElement*, uses createStackTraceElement().

From-SVN: r55424
2002-07-12 12:52:44 +00:00
Tom Tromey fdae83abe7 verify.cc (branch_prepass): Updated for change to exception handler type.
* verify.cc (branch_prepass): Updated for change to exception
	handler type.
	(verify_instructions_0): Likewise.
	* defineclass.cc (handleCodeAttribute): Initialize `prepared'.
	(handleExceptionTableEntry): Updated for change to exception
	handler type.
	* java/lang/Class.h (Class): Removed _Jv_InterpMethodInvocation.
	* include/java-interp.h (_Jv_InterpMethodInvocation): Removed.
	(union _Jv_InterpPC): New.
	(class _Jv_InterpException): Changed types to _Jv_InterpPC.
	(class _Jv_InterpMethod): Added new `prepared' field.
	(class _Jv_InterpMethod): Added `compile' method.  Removed
	`continue1' and `find_exception'.  Changed arguments to `run'.
	* interpret.cc (union insn_slot): New.
	(find_exception): Removed.
	(run_normal): Removed most logic.
	(run_synch_object): Likewise; also, use JvSynchronize.
	(run_synch_class): Likewise.
	(run): Removed.
	(continue1): Renamed as `run'.  Compile bytecode if required.
	Add new code to allow refinement of direct-threaded code at
	runtime.  Handle exceptions.
	(SAVE_PC): Removed.
	(compile): New method.
	(SET_ONE, SET_INSN, SET_INT, SET_DATUM): New defines.
	(NULLARRAYCHECK): Don't use SAVE_PC.
	(pc_t): New typedef.
	(TAKE_GOTO, GET1S, GET1U, GET2U, AVAL1U, AVAL2U, AVAL2UP,
	SKIP_GOTO, GOTO_VAL, PCVAL, AMPAMP): New macros.

From-SVN: r54968
2002-06-24 20:38:47 +00:00
Tom Tromey b2ae5f70a0 configure: Rebuilt.
* configure: Rebuilt.
	* configure.in (INTERPRETER): New subst.
	(AM_RUNTESTFLAGS): Don't subst.

From-SVN: r54940
2002-06-24 04:45:46 +00:00
Tom Tromey 8217640552 javaprims.h: Updated class declaration list.
* gcj/javaprims.h: Updated class declaration list.
	* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added new file.
	* java/util/EventListenerProxy.java: New file.
	* java/util/EventListener.java: Re-merge with Classpath.
	* java/util/EventObject.java: Re-merge with Classpath.

From-SVN: r54720
2002-06-17 21:32:01 +00:00
Tom Tromey 419831367f Class.h (Class::desiredAssertionStatus): Declare.
* java/lang/Class.h (Class::desiredAssertionStatus): Declare.
	(Class::getPackagePortion): Likewise.
	* java/lang/Class.java (desiredAssertionStatus): New method from
	Classpath.
	(getPackagePortion): Likewise.
	* java/lang/VMClassLoader.java (defaultAssertionStatus,
	packageAssertionStatus, classAssertionStatus): New methods from
	Classpath.
	* java/lang/ClassLoader.java (defaultAssertionStatus,
	systemPackageAssertionStatus, packageAssertionStatus,
	systemClassAssertionStatus, classAssertionStatus): New fields from
	Classpath.
	(setDefaultAssertionStatus, setPackageAssertionStatus,
	setClassAssertionStatus, clearAssertionStatus): New methods from
	Classpath.
	* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added AssertionError.java.
	* java/lang/AssertionError.java: New from Classpath.

From-SVN: r54517
2002-06-11 17:33:22 +00:00
Ulrich Weigand e793a7140e configure.host [...]: Set can_unwind_signal=yes.
* configure.host [s390*-linux*]: Set can_unwind_signal=yes.
* configure.in [s390*-*-linux*]: Do not define HAVE_BACKTRACE.
Set SIGNAL_HANDLER=include/s390-linux.h.
* configure: Regenerate.
* include/s390-linux.h: New file.

From-SVN: r54012
2002-05-29 18:36:50 +00:00
David Billinghurst 0659e0e3df natSystem.cc (getSystemTimeZone): Use HAVE_UNDERSCORE_TIMEZONE.
2002-05-03  David Billinghurst  <David.Billinghurst@riotinto.com>
	    Tom Tromey  <tromey@redhat.com>

	* java/lang/natSystem.cc (getSystemTimeZone): Use
	HAVE_UNDERSCORE_TIMEZONE.
	* include/config.h.in: Rebuilt.
	* acconfig.h (HAVE_UNDERSCORE_TIMEZONE, HAVE_BACKTRACE): Undef.
	* aclocal.m4, configure: Rebuilt.
	* acinclude.m4: Run AC_EXEEXT.
	* configure.in: Adjust test for `timezone' so it fails on Cygwin.
	Add test for `_timezone'.

Co-Authored-By: Tom Tromey <tromey@redhat.com>

From-SVN: r53117
2002-05-03 20:17:48 +00:00
Hans Boehm ce4b2ca6bc dwarf2-signal.h (INIT_SEGV, [...]): use sigaction instead of __libc_sigaction.
* include/dwarf2-signal.h (INIT_SEGV, INIT_FPE for ia64):
	use sigaction instead of __libc_sigaction.

From-SVN: r53074
2002-05-03 00:21:48 +00:00
David S. Miller fd84ba84a7 re PR bootstrap/6525 (libjava won't build on Red Hat Linux 6.2/sparc)
2002-05-02  David S. Miller  <davem@redhat.com>

	PR bootstrap/6525
	* include/dwarf2-signal.h (INIT_SEGV, INIT_FPE): Don't use
	__libc_sigaction on Sparc.

From-SVN: r53055
2002-05-02 10:54:24 -07:00
David S. Miller 6ea531707a re PR target/6422 (libjava failures on sparc-linux)
2002-04-25  David S. Miller  <davem@redhat.com>

	PR target/6422
	* include/dwarf2-signal.h (MAKE_THROW_FRAME for sparc*): Set
	program counter to next program counter minus 8.  Update
	comments in this macro to explain why.

From-SVN: r52820
2002-04-26 17:04:14 -07:00
Tom Tromey b446a5f169 verify.cc (construct_primitive_array_type): New case.
* verify.cc (construct_primitive_array_type) [void_type]: New
	case.
	(branch_prepass): Added dummy entries for unused instruction
	values.
	(verify_instructions_0): Likewise.
	* interpret.cc (continue1): Comment fix.
	* include/java-insns.h (op_xxxunusedxxx1): Removed.
	* Makefile.in: Rebuilt.
	* Makefile.am: Added -Wswitch-enum.

From-SVN: r52814
2002-04-26 22:39:29 +00:00
Adam Megacz c2a6704f60 win32.cc, win32.cc (backtrace): Added this function because Win32 does not supply it.
2002-04-23  Adam Megacz <adam@xwt.org>

        * win32.cc, include/win32.cc (backtrace): Added this function
        because Win32 does not supply it.

From-SVN: r52701
2002-04-24 01:33:19 +00:00
David S. Miller 4bf0144590 dwarf2-signal.h (MAKE_THROW_FRAME, sparc32): Document magic instruction reading sequence.
2002-04-21  David S. Miller  <davem@redhat.com>

	* include/dwarf2-signal.h (MAKE_THROW_FRAME, sparc32): Document
	magic instruction reading sequence.

From-SVN: r52609
2002-04-22 01:13:32 -07:00
David S. Miller 714708c8b1 dwarf2-signal.h (SIGNAL_HANDLER): Name siginfo_t pointer arg.
2002-04-19  David S. Miller  <davem@redhat.com>

	* include/dwarf2-signal.h (SIGNAL_HANDLER): Name siginfo_t pointer
	arg.
	(MAKE_THROW_FRAME): Define for 32-bit and 64-bit sparc.
	(INIT_SEGV, INIT_FPE): Use direct __libc_sigaction installation
	on Sparc too.
	* include/sparc-signal.h (FLUSH_REGISTER_WINDOWS): Define properly
	for 64-bit sparc.
	(MAKE_THROW_FRAME): Use long for sp/retaddr so 64-bit works.
	* sysdeps/sparc/locks.h: New file.
	* configure.in (SIGNAL_HANDLER): Set to include/sparc-signal.h
	on all sparc Solaris configurations.  Set to
	include/dwarf2-signal.h on sparc Linux.
	* configure: Regenerate
	* configure.host (can_unwind_signal): sparc*-linux* can do it now.

From-SVN: r52575
2002-04-21 02:37:49 -07:00
Tom Tromey ab8471334e re PR libgcj/6081 (libjava make install fails: Arg list too long)
Fix for PR libgcj/6081:
	* Makefile.in: Rebuilt.
	* Makefile.am (install-data-local): Use GNU make trick to avoid
	shell limit.

From-SVN: r52370
2002-04-16 15:52:26 +00:00
Anthony Green 395cb21141 Install libgcj.jar as libgcj-VERSION.jar.
From-SVN: r52226
2002-04-12 14:28:10 +00:00
Adam King 94ed000253 jvm.h (_Jv_ThrowBadArrayIndex, [...]): Mark as noreturn.
2002-04-11  Adam King <aking@dreammechanics.com>
	    Tom Tromey  <tromey@redhat.com>

	* include/jvm.h (_Jv_ThrowBadArrayIndex,
	_Jv_ThrowNullPointerException): Mark as noreturn.
	* win32.cc (_Jv_platform_initProperties): Use _Jv_MallocUnchecked
	and _Jv_free.  Correctly invoke GetTempPath().  Indentation
	fixes.

Co-Authored-By: Tom Tromey <tromey@redhat.com>

From-SVN: r52164
2002-04-11 15:57:56 +00:00
Tom Tromey 880f8c16ad Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (java/lang/Thread.h): Mark
	_Jv_AttachCurrentThreadAsDaemon as friend.
	* gcj/javaprims.h (_Jv_AttachCurrentThreadAsDaemon): Declare.
	* gcj/cni.h (JvAttachCurrentThreadAsDaemon): New function.
	* java/lang/natThread.cc (_Jv_AttachCurrentThreadAsDaemon): New
	function.
	* java/lang/natRuntime.cc (_load): Recognize JNI_VERSION_1_4.
	* jni.cc (_Jv_JNI_GetVersion): Return JNI_VERSION_1_4.
	(_Jv_JNI_InvokeFunctions): Added
	_Jv_JNI_AttachCurrentThreadAsDaemon.
	(_Jv_JNI_GetEnv): Handle JNI_VERSION_1_4.
	(JNI_GetDefaultJavaVMInitArgs): Likewise.
	(JNI_CreateJavaVM): Likewise.
	(_Jv_JNI_AttachCurrentThread): Likewise.
	(_Jv_JNI_AttachCurrentThread): Added `is_daemon' argument.
	(_Jv_JNI_AttachCurrentThreadAsDaemon): New method.
	(_Jv_JNIFunctions): Initialize new fields.
	(_Jv_JNI_NewDirectByteBuffer): New function.
	(_Jv_JNI_GetDirectBufferAddress): Likewise.
	(_Jv_JNI_GetDirectBufferCapacity): Likewise.
	* include/jni.h (JNI_VERSION_1_4): New macro.
	(JNIInvokeInterface::AttachCurrentThreadAsDaemon): New field.
	(_Jv_JavaVM::AttachCurrentThreadAsDaemon): New method.
	(JNINativeInterface::NewDirectByteBuffer): New field.
	(JNINativeInterface::GetDirectBufferAddress): New field.
	(JNINativeInterface::GetDirectBufferCapacity): New field.
	(_Jv_JNIEnv::NewDirectByteBuffer): New method.
	(_Jv_JNIEnv::GetDirectBufferAddress): New method.
	(_Jv_JNIEnv::GetDirectBufferCapacity): New method.

From-SVN: r52144
2002-04-10 20:36:04 +00:00
Adam King 455cd615c2 natSystem.cc (init_properties): Call new function _Jv_platform_initProperties.
2002-04-07  Adam King <aking@dreammechanics.com>

	* java/lang/natSystem.cc (init_properties): Call new function
	_Jv_platform_initProperties.
	* win32 (_Jv_platform_initProperties): New function that adds Win32
	support for the System properties os.name, os.arch, os.version,
	user.name, user.home, and user.dir.
	* include/posix.h, include/win32.h, posix.cc: New function
	_Jv_platform_initProperties.

From-SVN: r51989
2002-04-07 12:27:00 +01:00
Adam Megacz c77567790f win32.h (_Jv_platform_close_on_exec): added inline modifier.
2002-04-04  Adam Megacz <adam@xwt.org>

    * include/win32.h (_Jv_platform_close_on_exec): added inline
    modifier.

From-SVN: r51899
2002-04-05 04:22:28 +00:00
Richard Henderson 6ad4639794 * include/posix-threads.h [alpha] (_Jv_ThreadSelf): Avoid a copy.
From-SVN: r51468
2002-03-27 11:25:04 -08:00
Andrew Haley 3cb2054594 dwarf2-signal.h (MAKE_THROW_FRAME): Add for IA-64.
2002-03-25  Andrew Haley <aph@cambridge.redhat.com>, Hans Boehm <Hans_Boehm@hp.com>

        * include/dwarf2-signal.h (MAKE_THROW_FRAME): Add for IA-64.
        (INIT_SEGV, INIT_FPE): Add versions that use __libc_sigaction
        instead of syscall on IA-64.
        Add FIXME comment.

From-SVN: r51459
2002-03-27 17:08:47 +00:00
Anthony Green 5cb27a4697 libgcj.spec.in: Add CHECKREFSPEC.
2002-03-27  Anthony Green  <green@redhat.com>

	* libgcj.spec.in: Add CHECKREFSPEC.
	* configure.in: Ditto.
	* configure.host: Ditto.  Check references for xscale-elf.
	* configure: Rebuilt.

From-SVN: r51457
2002-03-27 16:41:44 +00:00
Hans Boehm d6220b3ad7 * include/dwarf2-signal.h: Temporarily back out last change.
From-SVN: r51415
2002-03-26 22:44:48 +00:00
Loren J. Rittle b4a19310cd * include/posix-threads.h: Support <.../pal.h> on FreeBSD/alpha.
From-SVN: r51383
2002-03-26 11:26:13 +00:00
Andrew Haley 90b2d2afa1 configure.in, configure: enable dwarf2-exception-style exception handling on IA-64.
* configure.in, configure: enable dwarf2-exception-style
	exception handling on IA-64.
	* include/dwarf2-signal.h (MAKE_THROW_FRAME): Add for IA-64.
	(INIT_SEGV, INIT_FPE): Use __libc_sigaction instead of syscall.
	Add FIXME comment.

From-SVN: r51367
2002-03-26 03:42:54 +00:00
Tom Tromey 5c00920976 Makefile.am (libgcj_la_LDFLAGS): Use THREADLDFLAGS.
* Makefile.am (libgcj_la_LDFLAGS): Use THREADLDFLAGS.
	(jv_convert_LDFLAGS): Likewise.
	(gij_LDFLAGS): Likewise.
	(rmic_LDFLAGS): Likewise.
	(rmiregistry_LDFLAGS): Likewise.
	* configure.in (THREADLDFLAGS): New subst; set correctly for
	*BSD.

From-SVN: r51363
2002-03-26 00:54:41 +00:00
Tom Tromey c677cd7f47 reverted erroneous checkin
From-SVN: r51235
2002-03-23 16:16:46 +00:00
Tom Tromey f5c5a4e915 name-finder.h (_Jv_name_finder::myclose): New method.
* include/name-finder.h (_Jv_name_finder::myclose): New method.
	* name-finder.cc (_Jv_name_finder): Initialize file descriptors.

From-SVN: r51234
2002-03-23 16:14:28 +00:00
Martin Kahlert c6ef94c533 2002-03-19 Martin Kahlert <martin.kahlert@infineon.com>
* include/jni.h Use correct C comments

From-SVN: r51046
2002-03-19 21:45:42 +00:00
Tom Tromey 9d5e46be34 jni.h (JNIIMPORT): New macro.
* include/jni.h (JNIIMPORT): New macro.
	(JNIEXPORT): Likewise.
	(JNICALL): Likewise.

From-SVN: r51009
2002-03-18 21:55:42 +00:00
Andrew Haley 71c6877d3e i386-signal.h (old_i386_kernel_sigaction): New.
2002-03-18  Andrew Haley  <aph@cambridge.redhat.com>

        * include/i386-signal.h (old_i386_kernel_sigaction): New.
        INIT_SEGV: Use old_i386_kernel_sigaction.
        INIT_FP: Likewise.

From-SVN: r50980
2002-03-18 17:11:43 +00:00
Bryce McKinlay 1b5a2139c7 natSystem.cc (init_properties): Update VM version properties.
* java/lang/natSystem.cc (init_properties): Update VM version
	properties.
	* configure.in: Set GCJVERSION.
	* acconfig.h: Add GCJVERSION.
	* configure: Rebuilt.
	* include/config.h.in: Rebuilt.

From-SVN: r50944
2002-03-18 06:19:03 +00:00
Anthony Green e2ea015c1c Install libgcj-config.h in a better place.
From-SVN: r50817
2002-03-15 18:03:49 +00:00
Bryce McKinlay 60678e476f posix.h: Add multiple include header protection.
* include/posix.h: Add multiple include header protection.
	* java/net/natPlainSocketImpl.cc: Don't #include <posix.h>.

From-SVN: r50559
2002-03-11 04:15:51 +00:00
Tom Tromey 0c1fcb02b1 Win32Process.java: Added comment.
* java/lang/Win32Process.java: Added comment.
	* include/posix.h (_Jv_platform_close_on_exec): New function.
	Include fcntl.h.
	* include/win32.h (_Jv_platform_close_on_exec): New function.
	* java/net/natPlainSocketImpl.cc (create): Set close-on-exec
	flag.
	(accept): Likewise.
	* java/net/natPlainDatagramSocketImpl.cc (create): Set
	close-on-exec flag.
	* java/io/natFileDescriptorPosix.cc (open): Set close-on-exec
	flag.

From-SVN: r50536
2002-03-10 17:59:23 +00:00
Bryce McKinlay 4559716751 Hashtable synchronization for PowerPC.
libjava:
	Hashtable synchronization for PowerPC.
	* configure.in: Define SLOW_PTHREAD_SELF if configure.host set
	slow_pthread_self. Set up symlink for sysdeps directory.
	* configure: Rebuild.
	* configure.host: Document more shell variables. Set sysdeps_dir
	for most platforms. Set slow_pthread_self for i686. Set
	enable_hash_synchronization_default and slow_pthread_self for PowerPC.
	* posix-threads.cc (_Jv_ThreadSelf_out_of_line): Use release_set so
	that memory barrier is emitted where required.
	* prims.cc: 64-bit align static primitive class instances.
	* include/posix-threads.h (_Jv_ThreadSelf for SLOW_PTHREAD_SELF): Add
	read_barrier() to enforce ordering of reads.
	* sysdep/powerpc/locks.h: New file. Implementation of synchronization
	primitives for PowerPC.
	* sysdep/i386/locks.h: New file. Synchronization primitives for i386
	moved from natObject.cc.
	* sysdep/alpha/locks.h: Likewise.
	* sysdep/ia64/locks.h: Likewise.
	* sysdep/generic/locks.h: Likewise.
	* java/lang/natObject.cc: Move thread synchronization primitives to
	system-dependent headers.
gcc/java:
	* decl.c (java_init_decl_processing): Make sure class_type_node
	alignment is not less than 64 bits if hash synchronization isenabled.

boehm-gc:
	* include/gc_priv.h: Define ALIGN_DOUBLE on 32 bit targets if GCJ
	support is enabled, for hash synchronization.

From-SVN: r50523
2002-03-10 03:53:16 +00:00
Tom Tromey de3adb3d9c * include/jni.h: Include stdio.h.
From-SVN: r50457
2002-03-08 21:37:46 +00:00
Adam Megacz 8eeda6e0e7 win32.cc (_Jv_platform_gettimeofday): Now takes no args, returns jlong.
2002-03-07  Adam Megacz  <adam@xwt.org>

        * win32.cc (_Jv_platform_gettimeofday): Now takes no args,
        returns jlong. Added implementation
        * posix.cc (_Jv_platform_gettimeofday): Now takes no args,
        returns jlong.
        * win32.h (_Jv_platform_gettimeofday): Now takes no args,
        returns jlong.
        * posix.h (_Jv_platform_gettimeofday): Now takes no args,
        returns jlong.
        * java/lang/natSystem.cc (currentTimeMillis): Now uses updated
        _Jv_platform_gettimeofday signature.

From-SVN: r50416
2002-03-08 01:03:56 +00:00
Tom Tromey fd7852b37a config.h.in: Rebuilt.
* include/config.h.in: Rebuilt.
	* configure: Rebuilt.
	* Makefile.in: Rebuilt.

From-SVN: r50381
2002-03-06 23:11:18 +00:00