Commit Graph

2363 Commits

Author SHA1 Message Date
Keith Seitz
bde6c7a990 java-interp.h (_Jv_InterpClass): Declare friend function _Jv_GetInterpClassSourceFile.
* include/java-interp.h (_Jv_InterpClass): Declare
        friend function _Jv_GetInterpClassSourceFile.
        * java/lang/Class.h (Class): Likewise.
        * java/lang/natClass.cc (_Jv_GetInterpClassSourceFile):
        New function.
        * gnu/classpath/jdwp/natVMVirtualMachine.cc
        (getSourceFile): Implement.

From-SVN: r122882
2007-03-13 19:27:13 +00:00
Marco Trudel
ff4b07ef6e natString.cc (getBytes (jstring enc)): Fixed the loop for multiple cycles, Code cleanup
2007-03-12  Marco Trudel  <mtrudel@gmx.ch>

	* java/lang/natString.cc (getBytes (jstring enc)):
	Fixed the loop for multiple cycles, Code cleanup

From-SVN: r122859
2007-03-12 19:48:32 +00:00
Mohan Embar
1611915067 Win32Process.java: Added nested class EOFInputStream.
* java/lang/Win32Process.java: Added nested class EOFInputStream.
	* java/lang/natWin32Process.cc (ChildProcessPipe): Added DUMMY
	enum and implementation.
	(startProcess): Use redirect flag.
	* classpath/lib/java/lang/Win32Process.class: Regenerated.
	* classpath/lib/java/lang/Win32Process$EOFInputStream.class: New.
	* gcj/javaprims.h: Regenerated.
	* java/lang/Win32Process$EOFInputStream.h: New.

From-SVN: r122668
2007-03-07 18:05:39 +00:00
Alexandre Oliva
18fa3240db ffi.h.in (ffi_closure_alloc, [...]): New.
libffi/ChangeLog:
* include/ffi.h.in (ffi_closure_alloc, ffi_closure_free): New.
(ffi_prep_closure_loc): New.
(ffi_prep_raw_closure_loc): New.
(ffi_prep_java_raw_closure_loc): New.
* src/closures.c: New file.
* src/dlmalloc.c [FFI_MMAP_EXEC_WRIT] (struct malloc_segment):
Replace sflags with exec_offset.
[FFI_MMAP_EXEC_WRIT] (mmap_exec_offset, add_segment_exec_offset,
sub_segment_exec_offset): New macros.
(get_segment_flags, set_segment_flags, check_segment_merge): New
macros.
(is_mmapped_segment, is_extern_segment): Use get_segment_flags.
(add_segment, sys_alloc, create_mspace, create_mspace_with_base,
destroy_mspace): Use new macros.
(sys_alloc): Silence warning.
* Makefile.am (libffi_la_SOURCES): Add src/closures.c.
* Makefile.in: Rebuilt.
* src/prep_cif [FFI_CLOSURES] (ffi_prep_closure): Implement in
terms of ffi_prep_closure_loc.
* src/raw_api.c (ffi_prep_raw_closure_loc): Renamed and adjusted
from...
(ffi_prep_raw_closure): ... this.  Re-implement in terms of the
renamed version.
* src/java_raw_api (ffi_prep_java_raw_closure_loc): Renamed and
adjusted from...
(ffi_prep_java_raw_closure): ... this.  Re-implement in terms of
the renamed version.
* src/alpha/ffi.c (ffi_prep_closure_loc): Renamed from
(ffi_prep_closure): ... this.
* src/pa/ffi.c: Likewise.
* src/cris/ffi.c: Likewise.  Adjust.
* src/frv/ffi.c: Likewise.
* src/ia64/ffi.c: Likewise.
* src/mips/ffi.c: Likewise.
* src/powerpc/ffi_darwin.c: Likewise.
* src/s390/ffi.c: Likewise.
* src/sh/ffi.c: Likewise.
* src/sh64/ffi.c: Likewise.
* src/sparc/ffi.c: Likewise.
* src/x86/ffi64.c: Likewise.
* src/x86/ffi.c: Likewise.
(FFI_INIT_TRAMPOLINE): Adjust.
(ffi_prep_raw_closure_loc): Renamed and adjusted from...
(ffi_prep_raw_closure): ... this.
* src/powerpc/ffi.c (ffi_prep_closure_loc): Renamed from
(ffi_prep_closure): ... this.
(flush_icache): Adjust.
boehm-gc/ChangeLog:
* include/gc.h (GC_REGISTER_FINALIZER_UNREACHABLE): New.
(GC_register_finalizer_unreachable): Declare.
(GC_debug_register_finalizer_unreachable): Declare.
* finalize.c (GC_unreachable_finalize_mark_proc): New.
(GC_register_finalizer_unreachable): New.
(GC_finalize): Handle it.
* dbg_mlc.c (GC_debug_register_finalizer_unreachable): New.
(GC_debug_register_finalizer_no_order): Fix whitespace.
libjava/ChangeLog:
* include/jvm.h (_Jv_ClosureListFinalizer): New.
(_Jv_Linker::create_error_method): Adjust.
* boehm.cc (_Jv_ClosureListFinalizer): New.
* nogc.cc (_Jv_ClosureListFinalizer): New.
* java/lang/Class.h (class _Jv_ClosureList): New.
(class java::lang::Class): Declare it as friend.
* java/lang/natClass.cc (_Jv_ClosureList::releaseClosures): New.
(_Jv_ClosureList::registerClousure): New.
* include/execution.h (_Jv_ExecutionEngine): Add get_closure_list.
(_Jv_CompiledEngine::do_get_closure_list): New.
(_Jv_CompiledEngine::_Jv_CompiledEngine): Use it.
(_Jv_IndirectCompiledClass): Add closures.
(_Jv_IndirectCompiledEngine::get_aux_info): New.
(_Jv_IndirectCompiledEngine::do_allocate_field_initializers): Use
it.
(_Jv_IndirectCompiledEngine::do_get_closure_list): New.
(_Jv_IndirectCompiledEngine::_Jv_IndirectCompiledEngine): Use it.
(_Jv_InterpreterEngine::do_get_closure_list): Declare.
(_Jv_InterpreterEngine::_Jv_InterpreterEngine): Use it.
* interpret.cc (FFI_PREP_RAW_CLOSURE): Use _loc variants.
(node_closure): Add closure list.
(_Jv_InterpMethod::ncode): Add jclass argument.  Use
ffi_closure_alloc and the separate code pointer.  Register the
closure for finalization.
(_Jv_JNIMethod::ncode): Likewise.
(_Jv_InterpreterEngine::do_create_ncode): Pass klass to ncode.
(_Jv_InterpreterEngine::do_get_closure_list): New.
* include/java-interp.h (_Jv_InterpMethod::ncode): Adjust.
(_Jv_InterpClass): Add closures field.
(_Jv_JNIMethod::ncode): Adjust.
* defineclass.cc (_Jv_ClassReader::handleCodeAttribute): Adjust.
(_Jv_ClassReader::handleMethodsEnd): Likewise.
* link.cc (struct method_closure): Add closure list.
(_Jv_Linker::create_error_method): Add jclass argument.  Use
ffi_closure_alloc and the separate code pointer.  Register the
closure for finalization.
(_Jv_Linker::link_symbol_table): Remove outdated comment about
sharing of otable and atable.  Adjust.
* java/lang/reflect/natVMProxy.cc (ncode_closure): Add closure
list.
(ncode): Add jclass argument.  Use ffi_closure_alloc and the
separate code pointer.  Register the closure for finalization.
(java::lang::reflect::VMProxy::generateProxyClass): Adjust.
* testsuite/libjava.jar/TestClosureGC.java: New.
* testsuite/libjava.jar/TestClosureGC.out: New.
* testsuite/libjava.jar/TestClosureGC.xfail: New.
* testsuite/libjava.jar/TestClosureGC.jar: New.

From-SVN: r122652
2007-03-07 07:27:25 +00:00
Mark Wielaard
666ff4f65d Character.java: Re-merged with Classpath.
2007-03-05  Mark Wielaard  <mark@klomp.org>

	* java/lang/Character.java: Re-merged with Classpath.
	* java/lang/natString.cc (nativeCompareTo): Renamed from
	compareTo.
	* java/lang/StringBuilder.java: Re-merged with Classpath.
	* java/lang/String.java: Re-merged with Classpath.
	(nativeCompareTo): Renamed from compareTo.
	* java/lang/StringBuffer.java: Re-merged with Classpath.
	* jni.cc (_Jv_JNI_GetAnyMethodID): Split calls to append.

From-SVN: r122560
2007-03-05 17:27:44 +00:00
Andrew Haley
a29114a3be natVMProxy.cc (ncode_closure.meth): Delete.
2007-03-05  Andrew Haley  <aph@redhat.com>

	* java/lang/reflect/natVMProxy.cc (ncode_closure.meth): Delete.
	(generateProxyClass): Don't pass method to ncode.
	(run_proxy): Call _Jv_GetReflectedMethod to find the proxy method.
	* java/lang/reflect/Method.h: Rebuild.
	* java/lang/reflect/Method.java (internalGetParameterTypes,
	internalGetExceptionTypes): New methods.
	* headers.txt (class java/lang/reflect/Method): Declare
	_Jv_GetReflectedMethod.  Be its friend.
	* java/lang/natClass.cc (_Jv_GetReflectedMethod): New method.
	* java/lang/Class.h: Declare it.  Be its friend.

From-SVN: r122554
2007-03-05 16:06:27 +00:00
Tom Tromey
f4a2a1deec sources.am, [...]: Rebuilt.
* sources.am, Makefile.in: Rebuilt.
	* scripts/makemake.tcl (emit_package_rule): Don't omit
	VMProcess.java.
	* Makefile.am (nat_source_files): Added natVMProcess.cc.
	(inner_nat_headers): Added ImmediateEOFInputStream.h.
	* gcj/javaprims.h: Regenerated.
	* java/lang/System.java (EnvironmentMap): Now package-private.
	(EnvironmentMap(Map)): New constructor.
	(EnvironmentMap.put): New method.
	* java/lang/natWin32Process.cc (startProcess): Update.
	* java/lang/Win32Process.java (Win32Process): Added 'redirect'
	argument.
	(startProcess): Likewise.
	* java/lang/EcosProcess.java (EcosProcess): Added 'redirect'
	argument.
	* java/lang/natPosixProcess.cc (nativeSpawn): Handle redirection.
	* java/lang/PosixProcess.java (redirect): New field.
	(PosixProcess): Added 'redirect' argument.
	* java/lang/natRuntime.cc (execInternal): Added 'redirect'
	argument to Process creation.
	* java/lang/natVMProcess.cc: New file.
	* java/lang/ProcessBuilder.java: Removed.
	* java/lang/VMProcess.java: New file.

From-SVN: r122553
2007-03-05 15:57:13 +00:00
Tom Tromey
3cf0c3c57e Updating header files. Earlier change here seems to have been in error.
From-SVN: r122550
2007-03-05 14:29:47 +00:00
Andrew Haley
39cd07dfc7 natClass.cc (parseAnnotationElement): Correct long annotations to read JV_CONSTANT_Long, not JV_CONSTANT_Double.
2007-03-03  Andrew Haley  <aph@redhat.com>

        * java/lang/natClass.cc (parseAnnotationElement): Correct long
        annotations to read JV_CONSTANT_Long, not JV_CONSTANT_Double.

From-SVN: r122545
2007-03-05 11:33:46 +00:00
Andrew Haley
386e9d408b AnnotationInvocationHandler.java: Generify in a few places.
2007-03-02  Andrew Haley  <aph@redhat.com>

        * sun/reflect/annotation/AnnotationInvocationHandler.java:
        Generify in a few places.
        (equals): Rewrite to use invoke on local proxy.
        (deepToString): Remove most of it.
        (toString): Make nonstatic.
        (arrayClone): Delete.
        (coerce): New method.
        (invoke): Rewrite to handle gcj's structures correctly.
        * java/lang/natClass.cc (getDeclaredAnnotations): Fix test for
        null loader.
        * sources.am: Regenerate.
        * Makefile.am: Likewise.

From-SVN: r122485
2007-03-02 19:34:18 +00:00
Gary Benson
19b9eb7102 2007-02-23 Gary Benson <gbenson@redhat.com>
* java/lang/VMCompiler.java
	(compileClass): Don't lose zeros from within the digest.

From-SVN: r122259
2007-02-23 15:15:58 +00:00
Jakub Jelinek
b3502aa8d4 re PR libgcj/17002 (java.util.TimeZone.getDefault() is broken)
libjava/
	PR libgcj/17002
	PR classpath/28550
	* java/util/VMTimeZone.java (getDefaultTimeZoneId): To read
	/etc/localtime, use ZoneInfo.readTZFile instead of
	VMTimeZone.readtzFile.  Get better timezone name for /etc/localtime,
	either if it is a symlink or through /etc/sysconfig/clock.
	(readSysconfigClockFile): New static method.
	(readtzFile): Removed.
	* java/lang/System.java: Add gnu.java.util.zoneinfo.dir to comments.
	* posix.cc (_Jv_platform_initProperties): Set
	gnu.java.util.zoneinfo.dir.
	* sources.am (gnu_java_util_source_files): Add
	classpath/gnu/java/util/ZoneInfo.java.
	* Makefile.in: Regenerated.
	* java/util/VMTimeZone.h: Regenerated.
	* java/util/TimeZone.h: Regenerated.
	* gnu/java/util/ZoneInfo.h: Generated.
libjava/classpath/
	* java/util/Date.java (parse): Properly parse 09:01:02 as
	hours/minutes/seconds, not as hours/minutes/year.
	* java/util/SimpleTimeZone.java (SimpleTimeZone): Simplify
	{start,end}TimeMode constructor by calling shorter constructor,
	set {start,end}TimeMode fields after it returns.
	(setStartRule): Don't adjust startTime into WALL_TIME.  Set
	startTimeMode to WALL_TIME.
	(endStartRule): Similarly.
	(getOffset): Handle properly millis + dstOffset overflowing into the
	next day.  Adjust startTime resp. endTime based on startTimeMode
	resp. endTimeMode.
	* java/util/TimeZone.java (zoneinfo_dir, availableIDs, aliases0): New
	static fields.
	(timezones): Remove synchronized keyword.  Set zoneinfo_dir.
	If non-null, set up aliases0 and don't put anything into
	timezones0.
	(defaultZone): Call getTimeZone instead of timezones().get.
	(getDefaultTimeZone): Fix parsing of EST5 or EST5EDT6.  Use
	getTimeZoneInternal instead of timezones().get.
	(parseTime): Parse correctly hour:minute.
	(getTimeZoneInternal): New private method.
	(getTimeZone): Do the custom ID checking first, canonicalize
	ID for custom IDs as required by documentation.  Call
	getTimeZoneInternal to handle the rest.
	(getAvailableIDs(int)): Add locking.  Handle zoneinfo_dir != null.
	(getAvailableIDs(File,String,ArrayList)): New private method.
	(getAvailableIDs()): Add locking.  Handle zoneinfo_dir != null.
	* gnu/java/util/ZoneInfo.java: New file.

From-SVN: r122229
2007-02-22 17:04:55 +01:00
Gary Benson
71d6fc6b0b GregorianCalendar.java: Removed.
2007-02-21  Gary Benson  <gbenson@redhat.com>

	* java/util/GregorianCalendar.java: Removed.
	* sources.am, Makefile.in: Rebuilt.

From-SVN: r122198
2007-02-21 13:49:01 +00:00
Gary Benson
d9f646e4b9 XEventLoop.h: Regenerated.
2007-02-20  Gary Benson  <gbenson@redhat.com>

	* gnu/awt/xlib/XEventLoop.h: Regenerated.
	* gnu/java/awt/peer/gtk/GThreadMutex.h: Likewise.
	* gnu/java/rmi/server/ConnectionRunnerPool$ConnectionRunner.h:
	Likewise.
	* gnu/java/rmi/server/UnicastConnectionManager.h: Likewise.
	* java/lang/SecurityManager.h: Likewise.
	* java/lang/Thread.h: Likewise.
	* java/security/VMSecureRandom$Spinner.h: Likewise.
	* java/util/concurrent/atomic/AtomicBoolean.h: Likewise.
	* java/util/concurrent/atomic/AtomicInteger.h: Likewise.
	* java/util/concurrent/atomic/AtomicLong.h: Likewise.
	* java/util/concurrent/atomic/AtomicReference.h: Likewise.
	* java/util/concurrent/ConcurrentHashMap$HashEntry.h: Likewise.
	* java/util/concurrent/ConcurrentHashMap$Segment.h: Likewise.
	* java/util/concurrent/ConcurrentLinkedQueue.h: Likewise.
	* java/util/concurrent/ConcurrentLinkedQueue$Node.h: Likewise.
	* java/util/concurrent/ConcurrentSkipListMap.h: Likewise.
	* java/util/concurrent/ConcurrentSkipListMap$Index.h: Likewise.
	* java/util/concurrent/ConcurrentSkipListMap$Node.h: Likewise.
	* java/util/concurrent/Exchanger.h: Likewise.
	* java/util/concurrent/Exchanger$Node.h: Likewise.
	* java/util/concurrent/FutureTask$Sync.h: Likewise.
	* java/util/concurrent/LinkedBlockingQueue$Node.h: Likewise.
	* java/util/concurrent/locks/AbstractQueuedLongSynchronizer.h:
	Likewise.
	* java/util/concurrent/locks/AbstractQueuedLongSynchronizer$Node.h: 
	Likewise.
	* java/util/concurrent/locks/AbstractQueuedSynchronizer.h: Likewise.
	* java/util/concurrent/locks/AbstractQueuedSynchronizer$Node.h:
	Likewise.
	* java/util/concurrent/ScheduledThreadPoolExecutor.h: Likewise.
	* java/util/concurrent/SynchronousQueue.h: Likewise.
	* java/util/concurrent/SynchronousQueue$TransferQueue.h: Likewise.
	* java/util/concurrent/SynchronousQueue$TransferQueue$QNode.h:
	Likewise.
	* java/util/concurrent/SynchronousQueue$TransferStack.h: Likewise.
	* java/util/concurrent/SynchronousQueue$TransferStack$SNode.h:
	Likewise.
	* java/util/concurrent/ThreadPoolExecutor.h: Likewise.
	* java/util/concurrent/ThreadPoolExecutor$Worker.h: Likewise.
	* java/util/logging/ErrorManager.h: Likewise.
	* javax/swing/plaf/basic/BasicSpinnerUI$2.h: Likewise.
	* javax/swing/plaf/basic/BasicSpinnerUI$4.h: Likewise.

From-SVN: r122161
2007-02-20 13:06:37 +00:00
David Daney
599b39ce9d Thread.java (Thread(ThreadGroup, Runnable, String)): Pass new parameter constructor.
* java/lang/Thread.java (Thread(ThreadGroup, Runnable, String)): Pass
	new parameter constructor.
	(Thread(ThreadGroup, Runnable, String, long)): Same.
	(Thread(String, boolean)): New constructor.
	(Thread(Thread, ThreadGroup, Runnable, String): Add parameter
	noInheritableThreadLocal, don't call
	InheritableThreadLocal.newChildThread if set.
	* java/lang/PosixProcess.java(ProcessManager()): Set
	noInheritableThreadLocal in super.
	* java/lang/natThread.cc (_Jv_AttachCurrentThread): Pass new
	parameter to Thread constructor.
	(_Jv_AttachCurrentThreadAsDaemon): Same.
	* java/lang/Thread.h: Regenerate.
	* classpath/lib/java/lang/Thread.class: Same.
	* classpath/lib/java/lang/PosixProcess$EOFInputStream.class: Same.
	* classpath/lib/java/lang/PosixProcess.class: Same.
	* classpath/lib/java/lang/Thread$State.class: Same.
	* classpath/lib/java/lang/PosixProcess$ProcessManager.class: Same.

From-SVN: r122054
2007-02-16 21:23:10 +00:00
Andrew Haley
24d8ce15e2 [multiple changes]
2007-02-15  Andrew Haley  <aph@redhat.com>

        * Makefile.am (nat_source_files): Remove
        java/lang/management/natVMManagementFactory.cc.
        * java/lang/Thread.java (getStackTrace): Use reflection to call
        the ManagementFactory.
        * java/lang/management/VMManagementFactory.java: Remove native
        methods.
        * java/lang/management/natVMManagementFactory.cc: Deleted.
        * sources.am: Regnerate.
        * scripts/makemake.tcl: Add new "bcheaders" type.
        Move java/lang/management and gnu/classpath/management to "bc".
        Move gnu/java/lang/management to "bcheaders".

2007-02-16  Andrew Haley  <aph@redhat.com>

        * gnu/java/lang/management/MemoryMXBeanImpl.java,
        javax/management/MBeanServerDelegate.java: Use
        gnu.javax.management.ListenerData rather than
        gnu.classpath.ListenerData.
        * gnu/javax/management/ListenerData.java: Move here from
        gnu/classpath/ListenerData.java.

From-SVN: r122041
2007-02-16 13:51:04 +00:00
David Daney
31429fbc3c PlainSocketImpl.h: Regenerate.
* gnu/java/net/PlainSocketImpl.h: Regenerate.
	* gnu/classpath/jdwp/VMVirtualMachine.h: Same.
	* gnu/classpath/jdwp/VMFrame.h: Same.
	* java/net/Socket.h: Same.
	* java/util/Collections$UnmodifiableMap$UnmodifiableEntrySet.h: Same.

From-SVN: r122006
2007-02-15 17:03:49 +00:00
Tom Tromey
40b86e5f2c Collections.java (UnmodifiableMap.toArray): Imported changes from Classpath.
libjava/classpath
	* java/util/Collections.java (UnmodifiableMap.toArray): Imported
	changes from Classpath.
libjava
	* sources.am, Makefile.in: Rebuilt.
	* java/lang/Socket.java: Removed override.
	* java/lang/DatagramSocket.java: Removed override.
	* gnu/java/net/PlainSocketImpl.java (localSocketAddress): New
	field.
	(getLocalAddress): New method.
	* gnu/java/net/PlainDatagramSocketImpl.java
	(PlainDatagramSocketImpl): Throws IOException.
	* gnu/java/net/natPlainSocketImplPosix.cc (write): Remove
	'sizeof'.
	(read): Likewise.

From-SVN: r121866
2007-02-12 23:52:39 +00:00
Jakub Jelinek
cc297c1e03 VMTimeZone.java: Rewrite to handle both the old 'TZif\0' format and the new one.
2007-02-09  Jakub Jelinek  <jakub@redhat.com>

	* java/util/VMTimeZone.java: Rewrite to handle both the old
	'TZif\0' format and the new one.

From-SVN: r121845
2007-02-12 14:39:44 +00:00
Tom Tromey
60e4646493 Checking in header files missed by earlier commit
From-SVN: r121672
2007-02-06 23:59:34 +00:00
Tom Tromey
14a9874595 * java/lang/ClassLoader.java (getResources): No longer final.
From-SVN: r121475
2007-02-01 23:00:01 +00:00
Tom Tromey
4d2446d99e LogManager.java (loggers): Genericized.
* java/util/logging/LogManager.java (loggers): Genericized.
	(addLogger): Merged.
	(findAncestor): Likewise.
	(getLogger): Likewise.
	(getLoggerNames): Genericized.
	(reset): Merged.
	(getLevelProperty): Likewise.
	* java/lang/reflect/Method.java (getDeclaringClass): Genericized.
	* java/lang/reflect/Constructor.java (getParameterTypes):
	Genericized.
	(getExceptionTypes): Likewise.
	(newInstance): Likewise.
	* java/lang/reflect/Array.java (newInstance): Genericized.
	* java/lang/Object.java (getClass): Genericized.
	* java/nio/charset/spi/CharsetProvider.java (charsets):
	Genericized.
	* java/text/Collator.java: Implement Comparable<Object>.

From-SVN: r121473
2007-02-01 21:36:01 +00:00
Tom Tromey
0a32f469ac Calendar.java: Implement Comparable<Calendar>.
* java/util/Calendar.java: Implement Comparable<Calendar>.  Update
	comments.
	(clear): Call complete.
	(setTimeZone): Call computeTime, computeFields.
	(compareTo): New method.
	* java/nio/charset/Charset.java: Implement Comparable<Charset>.
	(availableCharsets): Genericized.
	(aliases): Likewise.
	(compareTo): Changed argument type.
	* java/lang/ClassLoader.java (loadClass): Genericized.
	(findClass): Likewise.
	(defineClass): Likewise.
	(resolveClass): Likewise.
	(findSystemClass): Likewise.
	(setSigners): Likewise.
	(findLoadedClass): Likewise.
	(getResources): Likewise.
	(findResources): Likewise.
	(getSystemResources): Likewise.
	(checkInitialized): New method.
	* java/lang/Class.java (getCanonicalName): New method.

From-SVN: r121471
2007-02-01 20:34:08 +00:00
Andrew Haley
5df3325225 prims.cc (_Jv_Abort): fflush (stderr).
2007-01-31  Andrew Haley  <aph@redhat.com>

        * prims.cc (_Jv_Abort): fflush (stderr).
        * java/lang/natClassLoader.cc (_Jv_CheckABIVersion): Abort.

From-SVN: r121433
2007-01-31 19:04:35 +00:00
Tom Tromey
7679f36836 re PR libgcj/30606 (natVMURLConnection.cc:21: error: 'magic_t' does not name a typet name a type)
PR libgcj/30606:
	* configure, include/config.h.in: Rebuilt.
	* configure.ac: Check for magic_t in magic.h.
	* java/net/natVMURLConnection.cc: Use HAVE_MAGIC_T.

From-SVN: r121425
2007-01-31 17:11:11 +00:00
Kyle Galloway
3927313117 java-interp.h: Added _Jv_Frame class and its two subclasses _Jv_InterpFrame and _Jv_NativeFrame.
2007-01-29  Kyle Galloway  <kgallowa@redhat.com>

	* include/java-interp.h:  Added _Jv_Frame class and its two
	subclasses _Jv_InterpFrame and _Jv_NativeFrame.  Also moved
	_Jv_FrameType from java-stack.h.
	* include/java-stack.h: Removed _Jv_FrameType.
	* java/lang/Thread.java: Added frame member to hold new
	composite frame stack.
	* java/lang/Thread.h: Regenerated.
	* java/lang/Thread.class: Rebuilt.
	* jni.cc (_Jv_JNIMethod::call): Push a frame onto the stack when
	calling a JNI method.
	* jvmti.cc (_Jv_JVMTI_GetStackTrace): New Method.
	(_Jv_JVMTI_GetFrameCount): New method.
	* stacktrace.cc (UnwindTraceFn): Modified to use new _Jv_Frame
	classes.
	* testsuite/libjava.jvmti/interp/getstacktrace.jar: New test.
	* testsuite/libjava.jvmti/interp/natgetstacktrace.cc: New test.
	* testsuite/libjava.jvmti/interp/getstacktrace.h: New test.
	* testsuite/libjava.jvmti/interp/getstacktrace.jar: New test.
	* testsuite/libjava.jvmti/interp/getstacktrace.out: Output file
	for test.

From-SVN: r121314
2007-01-29 22:05:56 +00:00
Andrew Haley
6b05e79165 natClass.cc (initializeClass): Re-throw SecurityExceptions.
2007-01-26  Andrew Haley  <aph@redhat.com>

        * java/lang/natClass.cc (initializeClass): Re-throw
        SecurityExceptions.
        * java/lang/natVMClassLoader.cc (loadClass): checkPackageAccess.
        * java/lang/ClassLoader.java: (loadClass): Likewise.

From-SVN: r121285
2007-01-29 13:14:38 +00:00
Tom Tromey
7969a3791e libjava
* Updated headers.
libjava/classpath
	* tools/gnu/classpath/tools/javah/FieldHelper.java (print): Print
	'volatile' after field type.

From-SVN: r121215
2007-01-26 23:07:08 +00:00
Andrew Haley
9fe944471a configure, [...]: Rebuilt.
2007-01-25  Andrew Haley  <aph@redhat.com>

	* configure, Makefile.in, include/config.h.in: Rebuilt.
	* Makefile.am (libgcj_la_LIBADD): Removed $(LIBMAGIC).
	* configure.ac: Don't check for libmagic.
	* java/net/natVMURLConnection.cc (p_magic_open, p_magic_load,
	p_magic_close, p_magic_buffer): New globals.
	(init): Look up 'magic' functions.
	(guessContentTypeFromBuffer): Updated.

From-SVN: r121183
2007-01-25 19:51:33 +00:00
Keith Seitz
2b3c67882e Class.h (_Jv_GetClassStatus): Declare.
* java/lang/Class.h (_Jv_GetClassStatus): Declare.
        * java/lang/natClass.cc (_Jv_GetClassStatus): New function.
        * jvmti.cc (_Jv_JVMTI_GetClassStatus): New function.
        (_Jv_JVMTI_Interface): Define GetClassStatus.

From-SVN: r121074
2007-01-23 01:06:10 +00:00
Tom Tromey
262fa8a4b5 re PR java/29812 (env->klass value is not updated during the native calls)
PR java/29812:
	* testsuite/libjava.jni/pr29812.java: New file.
	* testsuite/libjava.jni/pr29812_injar.java: New file.
	* testsuite/libjava.jni/pr29812_injar.jar: New file.
	* testsuite/libjava.jni/pr29812.out: New file.
	* testsuite/libjava.jni/pr29812_injar.c: New file.
	* testsuite/libjava.jni/pr29812_injar.h: New file.
	* testsuite/libjava.jni/pr29812.jar: New file.
	* testsuite/libjava.jni/pr29812.c: New file.
	* testsuite/libjava.jni/pr29812.h: New file.
	* testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation):
	New proc.
	(gcj_jni_invocation_test_one): Use it.
	(gcj_jni_pr29812): New proc.
	(gcj_jni_run): Use it.
	* java/lang/natRuntime.cc (_load): Push a new system frame before
	calling JNI_OnLoad.
	* include/jvm.h (_Jv_JNI_PopSystemFrame): Declare.
	(_Jv_GetJNIEnvNewFrameWithLoader): Likewise.
	* jni.cc (struct _Jv_JNI_LocalFrame) <marker>: Now unsigned char.
	<allocated_p>: Now bool.
	<loader>: New field.
	(_Jv_JNI_EnsureLocalCapacity): Updated.
	(_Jv_JNI_NewLocalRef): Likewise.
	(_Jv_JNI_NewLocalRef): Likewise.
	(_Jv_JNI_PopLocalFrame): Likewise.
	(_Jv_JNI_FindClass): Likewise.
	(_Jv_GetJNIEnvNewFrame): Likewise.
	(_Jv_JNI_AttachCurrentThread): Likewise.
	(_Jv_GetJNIEnvNewFrameWithLoader): New function.
	(_Jv_GetJNIEnvNewFrame): Use it.
	* include/jni_md.h (_CLASSPATH_JNIENV_CONTENTS): Removed 'klass'.

From-SVN: r121064
2007-01-22 23:04:16 +00:00
Gary Benson
463c03f1bc natVMPipeEcos.cc: Renamed from gnu/java/nio/natPipeImplEcos.cc.
2007-01-18  Gary Benson  <gbenson@redhat.com>

	* gnu/java/nio/natVMPipeEcos.cc:
	Renamed from gnu/java/nio/natPipeImplEcos.cc.
	* gnu/java/nio/natVMPipePosix.cc:
	Renamed from gnu/java/nio/natPipeImplPosix.cc.
	* gnu/java/nio/natVMPipeWin32.cc:
	Renamed from gnu/java/nio/natPipeImplWin32.cc.
	* gnu/java/nio/natVMSelectorEcos.cc:
	Renamed from gnu/java/nio/natSelectorImplEcos.cc.
	* gnu/java/nio/natVMSelectorPosix.cc:
	Renamed from gnu/java/nio/natSelectorImplPosix.cc.
	* gnu/java/nio/natVMSelectorWin32.cc:
	Renamed from gnu/java/nio/natSelectorImplWin32.cc.
	* java/io/natVMObjectInputStream.cc:
	Renamed from java/io/natObjectInputStream.cc.
	* java/lang/natVMDouble.cc:
	Renamed from java/lang/natDouble.cc.
	* java/lang/natVMFloat.cc:
	Renamed from java/lang/natFloat.cc.	
	* Makefile.am, configure.ac: Reflect the above.
	* Makefile.in, configure: Rebuilt.

From-SVN: r120895
2007-01-18 11:32:40 +00:00
Keith Seitz
6ef43f5665 natThread.cc (finish_): Add JVMTI ThreadEnd notification.
* java/lang/natThread.cc (finish_): Add JVMTI ThreadEnd notification.
        (_Jv_NotifyThreadStart): Add JVMTI ThreadStart notification.

From-SVN: r120877
2007-01-17 22:05:10 +00:00
Gary Benson
8086b65daa natVMDirectByteBufferImpl.cc: Renamed from java/nio/natDirectByteBufferImpl.cc.
2007-01-17  Gary Benson  <gbenson@redhat.com>

	* java/nio/natVMDirectByteBufferImpl.cc:
	Renamed from java/nio/natDirectByteBufferImpl.cc.
	* Makefile.am: Reflect the above.
	* Makefile.in: Rebuilt.

From-SVN: r120859
2007-01-17 17:02:48 +00:00
Gary Benson
d8203cb888 MappedByteBuffer.java: Removed.
2007-01-15  Gary Benson  <gbenson@redhat.com>

	* java/nio/MappedByteBuffer.java: Removed.
	* sources.am, Makefile.in: Rebuilt.

From-SVN: r120858
2007-01-17 16:25:10 +00:00
Tom Tromey
98685f2b44 natThread.cc (finalize_native): Remove cast.
* java/lang/natThread.cc (finalize_native): Remove cast.
	(_Jv_GetCurrentJNIEnv): Likewise.
	* include/jvm.h (struct natThread) <jni_env>: Declare as
	_Jv_JNIEnv*.

From-SVN: r120844
2007-01-17 01:36:33 +00:00
Gary Benson
0122c9e791 MappedByteBuffer.java: Removed.
2007-01-15  Gary Benson  <gbenson@redhat.com>

	* java/nio/MappedByteBuffer.java: Removed.
	* sources.am, Makefile.in: Rebuilt.

From-SVN: r120793
2007-01-15 12:45:35 +00:00
Gary Benson
a5c0f6fe87 URLClassLoader.java: Removed.
2007-01-15  Gary Benson  <gbenson@redhat.com>

	* java/net/URLClassLoader.java: Removed.
	* gnu/java/net/loader/Load_gcjlib.java: New file.
	* gnu/gcj/runtime/BootClassLoader.java: Ensure core
	URL handler is present in static executables.
	* sources.am, Makefile.in: Rebuilt.

From-SVN: r120791
2007-01-15 10:25:38 +00:00
Tom Tromey
ea517ca550 natDouble.cc (toString): Added parens.
* java/lang/natDouble.cc (toString): Added parens.
	* gnu/gcj/io/shs.h (PROTO): Define.
	* link.cc (resolve_pool_entry): Added missing braces.

From-SVN: r120652
2007-01-10 22:56:20 +00:00
Gary Benson
143f796e57 URL.java: Removed.
2007-01-10  Gary Benson  <gbenson@redhat.com>

	* java/net/URL.java: Removed.
	* sources.am, Makefile.in: Rebuilt.

From-SVN: r120644
2007-01-10 16:55:10 +00:00
Tom Tromey
97b8365caf Merged gcj-eclipse branch to trunk.
From-SVN: r120621
2007-01-09 19:58:05 +00:00
Gary Benson
7ddd83802b Security.java: Merge with classpath.
2006-11-21  Gary Benson  <gbenson@redhat.com>

	* java/security/Security.java: Merge with classpath.
	* java/lang/Package.java: Likewise.
	* java/lang/Class.java (getDeclaredAnnotations): New method.

From-SVN: r119057
2006-11-21 16:18:08 +00:00
Gary Benson
adefdaca2d InetAddress.java: Removed.
2006-11-03  Gary Benson  <gbenson@redhat.com>

	* java/net/InetAddress.java: Removed.
	* java/net/natInetAddressNoNet.cc: Likewise.
	* java/net/natInetAddressPosix.cc: Likewise.
	* java/net/natInetAddressWin32.cc: Likewise.
	* java/net/VMInetAddress.java (getLocalHostname,
	lookupInaddrAny, getHostByAddr, getHostByName,
	aton): Replace glue methods with native ones.
	* java/net/natVMInetAddressNoNet.cc: New file.
	* java/net/natVMInetAddressPosix.cc: Likewise.
	* java/net/natVMInetAddressWin32.cc: Likewise.
	* Makefile.am, configure.ac: Reflect the above.
	* sources.am, Makefile.in, configure: Rebuilt.

	* java/net/natVMNetworkInterfaceWin32.cc
	(winsock2GetRealNetworkInterfaces): Create InetAddress
	objects using InetAddress.getByAddress.
	* gnu/java/net/natPlainSocketImplWin32.cc
	(accept, getOption): Likewise.
	* gnu/java/net/natPlainDatagramSocketImplWin32.cc
	(peekData, receive, getOption): Likewise.

From-SVN: r118451
2006-11-03 10:16:04 +00:00
Keith Seitz
f356a436f0 java-stack.h (ncodeMap): Declare.
* include/java-stack.h (ncodeMap): Declare.
        (_Jv_StackTrace): Make _Jv_GetMethodDeclaringClass friend.
        * java/lang/Class.h (_Jv_GetMethodDeclaringClass): Declare.
        * java/lang/natClass.cc (_Jv_GetMethodDeclaringClass): New
        function.
        * stacktrace.cc (ncodeMap): Redefine from file global to global
        for class _Jv_StackTrace.
        (_Jv_StackTrace::UpdateNCodeMap): Add interpreted classes, too,
        so that _Jv_GetMethodDeclaringClass can find them all.
        (_Jv_StackTrace::ClassForFrame): Exclude interpreted classes.
        * jvmti.cc (_Jv_JVMTI_GetMethodDeclaringClass): New function.
        (_Jv_JVMTI_Interface): Define GetMethodDeclaringClass function.

From-SVN: r118100
2006-10-28 02:15:12 +00:00
Tom Tromey
e7f7d23387 register2.java: New file.
* testsuite/libjava.jni/register2.java: New file.
	* testsuite/libjava.jni/register2.out: New file.
	* testsuite/libjava.jni/register2.c: New file.
	* java/lang/natClass.cc (_Jv_GetClassNameUtf8): New function.
	* java/lang/Class.h (_Jv_GetClassNameUtf8): Declare.
	* jni.cc (struct NativeMethodCacheEntry): New struct.
	(nathash): Changed type.
	(hash): Updated.
	(nathash_find_slot): Likewise.
	(nathash_find): Likewise.
	(natrehash): Likewise.
	(nathash_add): Likewise.
	(_Jv_JNI_RegisterNatives): Likewise.
	(_Jv_LookupJNIMethod): Likewise.
	Idea from Juerg Lehni <juerg@scratchdisk.com>

Co-Authored-By: Bryce McKinlay <mckinlay@redhat.com>

From-SVN: r117867
2006-10-18 23:17:04 +00:00
Gary Benson
704312e738 2006-10-03 Gary Benson <gbenson@redhat.com>
* java/net/InetAddress.java
	(<clinit>): Reorder the static initializers.

From-SVN: r117394
2006-10-03 10:27:28 +00:00
Gary Benson
93a8f49bfa 2006-10-02 Gary Benson <gbenson@redhat.com>
* java/net/InetAddress.java
	(checkConnect): Reinstated.
	(loopbackAddress): Ensure initialized from non-null object.

From-SVN: r117370
2006-10-02 10:54:43 +00:00
Tom Tromey
d79d57fa02 Locale.java (hashcode): No longer transient.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=201712
	* java/util/Locale.java (hashcode): No longer transient.
	(writeObject): Use ObjectOutputStream.PutField and
	defaultWriteObject.
	(readObject): Use defaultReadObject.

From-SVN: r117248
2006-09-27 07:58:11 +00:00
Gary Benson
aac8697859 InetAddress.java: Mostly merged with Classpath.
2006-09-20  Gary Benson  <gbenson@redhat.com>

	* java/net/InetAddress.java: Mostly merged with Classpath.
	* java/net/VMInetAddress.java: New file.
	* sources.am, Makefile.in: Rebuilt.

	* java/net/natVMNetworkInterfacePosix.cc
	(getInterfaces): Create InetAddress objects using
	InetAddress.getByAddress.
	* gnu/java/net/natPlainSocketImplPosix.cc
	(accept, getOption): Likewise.
	* gnu/java/net/natPlainDatagramSocketImplPosix.cc
	(peekData, receive, getLocalAddress): Likewise.

From-SVN: r117075
2006-09-20 07:55:26 +00:00
Tom Tromey
19db9631bc [multiple changes]
2006-09-19  Mark Wielaard  <mark@klomp.org>

	Fixes bug #29137
	* java/util/logging/LogManager.java (addLogger): Always check for
	existing children of a new Logger.

2006-09-19  Tom Tromey  <tromey@redhat.com>

	* java/util/logging/LogManager.java: Re-merged with Classpath.

From-SVN: r117058
2006-09-19 16:23:34 +00:00
Keith Seitz
3056423a31 Class.h (_Jv_FindInterpreterMethod): Change return type to _Jv_MethodBase instead of _Jv_InterpMethod.
* java/lang/Class.h (_Jv_FindInterpreterMethod): Change return type
        to _Jv_MethodBase instead of _Jv_InterpMethod.
        * java/lang/natClass.cc (_Jv_FindInterpreterMethod): Likewise.
        Do not check access flags.
        Fix some minor style anomalies.

From-SVN: r116730
2006-09-06 22:16:59 +00:00
Gary Benson
69afd3217e InetAddress.java (getLocalHost): Refactor to avoid security check if getLocalHostname() fails and to provide...
2006-09-01  Gary Benson  <gbenson@redhat.com>

	* java/net/InetAddress.java (getLocalHost): Refactor to avoid
	security check if getLocalHostname() fails and to provide more
	meaningful exceptions it the security check fails.

From-SVN: r116627
2006-09-01 15:38:00 +00:00
Gary Benson
39aa3581c4 InetAddress.java (getByAddress): Create Inet4Address objects when passed IPv4-mapped IPv6 addresses.
2006-09-01  Gary Benson  <gbenson@redhat.com>

	* java/net/InetAddress.java (getByAddress): Create Inet4Address
	objects when passed IPv4-mapped IPv6 addresses.
	(getByName, getAllByName): Defer to the above to ensure that the
	correct Inet*Address objects are returned.

From-SVN: r116622
2006-09-01 13:30:50 +00:00
Gary Benson
7229b95cc0 InetAddress.java (getByName, [...]): Only perform security check when DNS lookups are required.
2006-09-01  Gary Benson  <gbenson@redhat.com>

	* java/net/InetAddress.java (getByName, getAllByName):
	Only perform security check when DNS lookups are required.

From-SVN: r116621
2006-09-01 10:06:13 +00:00
Thomas Fitzsimmons
df3e8c70fd re PR libgcj/27890 (lib/logging.properties pollutes common namespace)
2006-08-22  Thomas Fitzsimmons  <fitzsim@redhat.com>

	PR libgcj/27890
	* gnu/classpath/natSystemProperties.cc (insertSystemProperties):
	Set gnu.classpath.home.url to TOOLEXECLIBDIR.
	* configure.ac: Do not add --with-native-libdir to
	ac_configure_args.
	* java/security/libgcj.security: Remove file.
	* java/util/logging/logging.properties: Likewise.
	* classpath/m4/acinclude.m4 (CLASSPATH_TOOLEXECLIBDIR): New macro.
	* classpath/resource/Makefile.am (loggingdir): Define to
	toolexeclibdir.
	(securitydir): Likewise.
	* classpath/configure.ac: Call CLASSPATH_TOOLEXECLIBDIR.
	Set default nativeexeclibdir using toolexeclibdir.
	* HACKING: Fix classpath aclocal arguments.
	* Makefile.am (secdir): Remove variable.
	(propdir): Likewise.
	(AM_CXXFLAGS): Replace LIBDIR definition with TOOLEXECLIBDIR
	definition.
	(all_property_files): Remove variable.
	(install-data-local): Do not install libgcj.security or
	logging.properties.
	* configure, Makefile.in, classpath/configure,
	classpath/Makefile.in, classpath/native/jni/java-lang/Makefile.in,
	classpath/native/jni/midi-alsa/Makefile.in,
	classpath/native/jni/classpath/Makefile.in,
	classpath/native/jni/midi-dssi/Makefile.in,
	classpath/native/jni/Makefile.in,
	classpath/native/jni/java-nio/Makefile.in,
	classpath/native/jni/java-net/Makefile.in,
	classpath/native/jni/gconf-peer/Makefile.in,
	classpath/native/jni/java-io/Makefile.in,
	classpath/native/jni/xmlj/Makefile.in,
	classpath/native/jni/java-util/Makefile.in,
	classpath/native/jni/qt-peer/Makefile.in,
	classpath/native/jni/gtk-peer/Makefile.in,
	classpath/native/Makefile.in, classpath/native/jawt/Makefile.in,
	classpath/native/target/Linux/Makefile.in,
	classpath/native/target/Makefile.in,
	classpath/native/target/generic/Makefile.in,
	classpath/native/fdlibm/Makefile.in,
	classpath/native/plugin/Makefile.in,
	classpath/resource/Makefile.in, classpath/scripts/Makefile.in,
	classpath/tools/Makefile.in, classpath/doc/Makefile.in,
	classpath/doc/api/Makefile.in, classpath/lib/Makefile.in,
	classpath/external/Makefile.in,
	classpath/external/sax/Makefile.in,
	classpath/external/w3c_dom/Makefile.in,
	classpath/external/relaxngDatatype/Makefile.in,
	classpath/include/Makefile.in, classpath/aclocal.m4,
	classpath/examples/Makefile.in, aclocal.m4: Regenerate.

From-SVN: r116332
2006-08-22 20:37:36 +00:00
Bryce McKinlay
7ddf92a874 re PR libgcj/13212 (JNI/CNI AttachCurrentThread does not register thread with garbage collector)
boehm-gc
	PR libgcj/13212:
	* configure.ac: Check for pthread_getattr_np(). Remove
	GC_PTHREAD_SYM_VERSION detection.
	* include/gc.h (GC_register_my_thread, GC_unregister_my_thread,
	GC_get_thread_stack_base): New declarations.
	* pthread_support.c (GC_register_my_thread, GC_unregister_my_thread,
	GC_get_thread_stack_base): New functions.
	(GC_delete_thread): Don't try to free the first_thread.
	* misc.c (GC_init_inner): Use GC_get_thread_stack_base() if possible.
	(pthread_create_, constr): Removed.
	(pthread_create): Don't rename.
	* include/gc_ext_config.h.in: Rebuilt.
	* include/gc_pthread_redirects.h (pthread_create): Define 
	unconditionally.
	* include/gc_config.h.in: Rebuilt.
	* configure: Rebuilt.
libjava
	* java/lang/natThread.cc (_Jv_AttachCurrentThread): Attach thread
	to GC.
	(_Jv_DetachCurrentThread): Detach thread from GC.
	* include/boehm-gc.h (_Jv_GCAttachThread, _Jv_GCDetachThread):
	Declare.
	* boehm.cc (_Jv_GCAttachThread): New function.
	(_Jv_GCDetachThread): Likewise.

From-SVN: r116313
2006-08-21 22:07:30 +00:00
Mark Wielaard
ac1ed908de Imported GNU Classpath 0.92
2006-08-14  Mark Wielaard  <mark@klomp.org>

       Imported GNU Classpath 0.92
       * HACKING: Add more importing hints. Update automake version
       requirement.

       * configure.ac (gconf-peer): New enable AC argument.
       Add --disable-gconf-peer and --enable-default-preferences-peer
       to classpath configure when gconf is disabled.
       * scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and
       gnu/java/awt/dnd/peer/gtk to bc. Classify
       gnu/java/security/Configuration.java as generated source file.

       * gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
       gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
       gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
       gnu/java/lang/management/VMRuntimeMXBeanImpl.java,
       gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
       gnu/java/lang/management/VMThreadMXBeanImpl.java,
       gnu/java/lang/management/VMMemoryMXBeanImpl.java,
       gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub
       classes.
       * java/lang/management/VMManagementFactory.java: Likewise.
       * java/net/VMURLConnection.java: Likewise.
       * gnu/java/nio/VMChannel.java: Likewise.

       * java/lang/Thread.java (getState): Add stub implementation.
       * java/lang/Class.java (isEnum): Likewise.
       * java/lang/Class.h (isEnum): Likewise.

       * gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed.

       * javax/naming/spi/NamingManager.java: New override for StackWalker
       functionality.

       * configure, sources.am, Makefile.in, gcj/Makefile.in,
       include/Makefile.in, testsuite/Makefile.in: Regenerated.

From-SVN: r116139
2006-08-14 23:12:35 +00:00
Gary Benson
be6415beae Thread.java (accessControlState): New field.
2006-08-14  Gary Benson  <gbenson@redhat.com>

	* java/lang/Thread.java (accessControlState): New field.
	* java/security/VMAccessControlState.java: New file.
	* java/security/natVMAccessControlState.cc: Likewise.
	* java/security/VMAccessController.java
	(contexts, inGetContext): Removed.
	(pushContext, popContext, getContext): Use VMAccessControlState.
	* Makefile.am (nat_source_files): Updated.
	* sources.am, Makefile.in: Rebuilt.

From-SVN: r116128
2006-08-14 14:24:52 +00:00
Gary Benson
3c95dcfdc2 java-stack.h (GetAccessControlStack): Change return type.
2006-08-10  Gary Benson  <gbenson@redhat.com>

	* include/java-stack.h (GetAccessControlStack): Change return
	type.
	* stacktrace.cc (accesscontrol_trace_fn): Record the number of
	Java frames encountered.
	(GetAccessControlStack): Return a flag indicating whether a call to
	doPrivileged was encountered rather than an array of method names.
	* java/security/natVMAccessController.cc (getStack): Change return
	type.
	* java/security/VMAccessController.java (getStack): Likewise.
	(getContext): Change to reflect the above.

From-SVN: r116058
2006-08-10 09:56:03 +00:00
Gary Benson
fac186e500 System.java (setSecurityManager): Javadoc fix.
2006-08-09  Gary Benson  <gbenson@redhat.com>

	* java/lang/System.java (setSecurityManager): Javadoc fix.
	* java/security/VMAccessController.java (getContext): Comment fix.

From-SVN: r116033
2006-08-09 08:46:34 +00:00
Gary Benson
c7dc750aef java-stack.h (accesscontrol_trace_fn): Declare.
2006-08-09  Gary Benson  <gbenson@redhat.com>

	* include/java-stack.h (accesscontrol_trace_fn): Declare.
	(GetAccessControlStack): Likewise.
	(GetClassMethodStack): Remove.
	* stacktrace.cc (accesscontrol_trace_fn): New method.
	(GetAccessControlStack): Likewise.
	(GetClassMethodStack): Remove.
	* java/security/natVMAccessController.cc (getStack): Use
	GetAccessControlStack.

From-SVN: r116032
2006-08-09 08:38:28 +00:00
Gary Benson
ded9dbb894 re PR libgcj/28340 (gij ignores -Djava.security.manager)
2006-08-07  Gary Benson  <gbenson@redhat.com>

	PR libgcj/28340:
	* java/lang/ClassLoader.java (clinit): Install a default
	security manager if java.security.manager is defined.
	(getParent, getSystemClassLoader): Use the correct stack
	frame during security checks.
	* java/net/URLClassLoader.java (findClass): Avoid calling
	this.toString() during VM initialization.
	(runtimeInitialized): New method.
	* java/net/natURLClassLoader.cc: New file.
	* Makefile.am (nat_source_files): Added the above.
	* Makefile.in: Rebuilt.

From-SVN: r115999
2006-08-07 14:48:59 +00:00
Gary Benson
da0f033486 SecurityManager.java (getSecurityContext, [...]): Merge with Classpath.
2006-08-07  Gary Benson  <gbenson@redhat.com>
	    Casey Marshall <csm@gnu.org>

	* java/lang/SecurityManager.java (getSecurityContext,
	checkPermission, checkAccess, checkRead, checkConnect,
	checkPackageAccess, checkPackageDefinition, checkPackageList):
	Merge with Classpath.
	(SecurityContext): Remove.


Co-Authored-By: Casey Marshall <csm@gnu.org>

From-SVN: r115998
2006-08-07 14:42:48 +00:00
Gary Benson
e79e0270c0 VMAccessController.java (pushContext, [...]): Use Thread.currentThread() to determine when we're bootstrapping.
2006-08-07  Gary Benson  <gbenson@redhat.com>

	* java/security/VMAccessController.java (pushContext, popContext,
	getContext): Use Thread.currentThread() to determine when we're
	bootstrapping.
	(runtimeInitialized): Remove.
	* java/security/natVMAccessController.cc (runtimeInitialized):
	Remove.

From-SVN: r115996
2006-08-07 14:14:14 +00:00
Tom Tromey
9327c475df re PR libgcj/28491 (NetworkInterface.getNetworkInterfaces() doesn't report ipv6 interfaces.)
PR libgcj/28491:
	* configure, include/config.h.in: Rebuilt.
	* configure.ac: Look for ifaddrs.h, getifaddrs.
	* java/net/natVMNetworkInterfacePosix.cc (getInterfaces): Use
	getifaddrs if available.

From-SVN: r115977
2006-08-06 22:43:05 +00:00
Andreas Tobler
d2b815074b natSystemProperties.cc: Add additional check for getpwuid_r on _POSIX_PTHREAD_SEMANTICS.
2006-08-01  Andreas Tobler  <a.tobler@schweiz.ch>

	* gnu/classpath/natSystemProperties.cc: Add additional check for
	getpwuid_r on _POSIX_PTHREAD_SEMANTICS.
	(SystemProperties::insertSystemProperties): Likewise.
	* java/io/natFilePosix.cc (File::performList): Add
	additional check for readdir_r on _POSIX_PTHREAD_SEMANTICS.
	* java/util/natVMTimeZone.cc (VMTimeZone::getSystemTimeZoneId): Add
	additional check for localtime_r on _POSIX_PTHREAD_SEMANTICS.

From-SVN: r115864
2006-08-01 22:59:24 +02:00
Gary Benson
464fc7a199 re PR libgcj/13604 (AccessController unfinished)
2006-07-28  Gary Benson  <gbenson@redhat.com>
	    Casey Marshall <csm@gnu.org>

	PR libgcj/13604:
	* include/java-stack.h (GetClassMethodStack): Declare.
	* stacktrace.cc (GetClassMethodStack): New method.
	* java/security/AccessController.java: Removed.
	* java/security/VMAccessController.java: New file.
	* java/security/natVMAccessController.cc: Likewise.
	* Makefile.am (nat_source_files): Added the above.
	* sources.am, Makefile.in: Rebuilt.


Co-Authored-By: Casey Marshall <csm@gnu.org>

From-SVN: r115793
2006-07-28 10:54:11 +00:00
Gary Benson
99460c7e0f SecurityManager.java (currentClassLoader, [...]): Remerged javadoc.
2006-07-28  Gary Benson  <gbenson@redhat.com>

	* java/lang/SecurityManager.java (currentClassLoader,
	currentLoadedClass, classLoaderDepth, checkAccess, checkRead,
	checkWrite, checkTopLevelWindow, checkPrintJobAccess,
	checkSystemClipboardAccess, checkAwtEventQueueAccess,
	checkPackageList): Remerged javadoc.

From-SVN: r115792
2006-07-28 10:47:54 +00:00
Gary Benson
8d0941a9c8 prims.cc (_Jv_CreateJavaVM): Move setting runtimeInitialized from the start to the end of the function.
2006-07-28  Gary Benson  <gbenson@redhat.com>

	* prims.cc (_Jv_CreateJavaVM): Move setting runtimeInitialized
	from the start to the end of the function.  Remove references
	to VMThrowable.trace_enabled.
	* java/lang/natVMThrowable.cc (fillInStackTrace): Use
	runtimeInitialized rather than trace_enabled to decide
	whether to inhibit stack trace generation.
	* java/lang/VMThrowable.java (trace_enabled): Removed.

From-SVN: r115791
2006-07-28 07:40:17 +00:00
Mark Wielaard
099cf3548a * java/io/OutputStreamWriter.java (flush): Create work if null.
From-SVN: r115647
2006-07-21 19:13:22 +00:00
Keith Seitz
b247341e06 natThread.cc (_Jv_ThreadGetData): New function.
* java/lang/natThread.cc (_Jv_ThreadGetData): New function.
        * Makefile.am (java/lang/Thread.h): Add friend function
        _Jv_ThreadGetData.
        * Makefile.in: Regenerate.

From-SVN: r115646
2006-07-21 18:50:48 +00:00
Gary Benson
834c81642a File.java (deleteOnExit): Fix security check.
2006-07-18  Gary Benson  <gbenson@redhat.com>

	* java/io/File.java (deleteOnExit): Fix security check.

From-SVN: r115551
2006-07-18 11:23:39 +00:00
Anthony Green
8fce9db014 natFilePosix.cc (performSetLastModified): Return true on success, false otherwise.
2006-07-14  Anthony Green  <green@redhat.com>

	* java/io/natFilePosix.cc (performSetLastModified): Return true on
	success, false otherwise.

From-SVN: r115452
2006-07-14 18:16:39 +00:00
Gary Benson
1470f196e4 File.java (internalExists): New method.
2006-07-14  Gary Benson  <gbenson@redhat.com>

	* java/io/File.java (internalExists): New method.
	(exists): Use internalExists.
	(internalIsDirectory): New method.
	(isDirectory): Use internalIsDirectory.
	(createTempFile): Use internalExists and internalIsDirectory.

From-SVN: r115441
2006-07-14 14:37:46 +00:00
Gary Benson
782bcb9f98 File.java (renameTo): Fix security checks.
2006-07-12  Gary Benson  <gbenson@redhat.com>

	* java/io/File.java (renameTo): Fix security checks.

From-SVN: r115373
2006-07-12 15:25:50 +00:00
Tom Tromey
9e01bff779 OutputStreamWriter.java (writeChars): Use a 'do' loop.
* java/io/OutputStreamWriter.java (writeChars): Use a 'do' loop.
	Set 'out.count' earlier.
	(close): Call setFinished on converter.
	(flush): Always write work buffer.
	* java/io/PrintStream.java (writeChars): Do 'do' loop.
	(close): Call setFinished on converter.  Write a 'flush' array.
	* java/lang/natString.cc (getBytes): Call setFinished on
	converter.
	* gnu/gcj/convert/CharsetToBytesAdaptor.java (hasBytes): New
	field.
	(write): Set hasBytes.  Changed 'finished' logic.
	(havePendingBytes): Rewrote.
	(setFinished): New method.
	* gnu/gcj/convert/UnicodeToBytes.java (setFinished): New method.
	* testsuite/libjava.lang/RH194522.java: New file.
	* testsuite/libjava.lang/RH194522.out: New file.

From-SVN: r115039
2006-06-27 20:38:10 +00:00
Tom Tromey
6d82bb8521 natField.cc (getAddr): Allow setting of final field when it is accessible.
* java/lang/reflect/natField.cc (getAddr): Allow setting of final
	field when it is accessible.

From-SVN: r114896
2006-06-22 16:59:15 +00:00
Andrew Haley
e046c56eee class.c (make_class_data): When using flag_indirect_classes, don't initialize the vtable of Class instances.
2006-06-16  Andrew Haley  <aph@redhat.com>

        * class.c (make_class_data): When using flag_indirect_classes,
        don't initialize the vtable of Class instances.

2006-06-16  Andrew Haley  <aph@redhat.com>

        * java/lang/natClassLoader.cc (_Jv_NewClassFromInitializer): Don't
        copy the whole Class instance from the initializer: instead, copy
        everything but the first word (the vtable pointer).
        Change prototype to (const char* class_initializer).
        (_Jv_RegisterNewClasses): Change prototype to (const char**).
        * java/lang/Class.h (_Jv_RegisterNewClasses): Change prototype to
        (const char**).

From-SVN: r114714
2006-06-16 08:56:29 +00:00
Tom Tromey
45559ef181 re PR libgcj/27730 (Thread.getId() needs implemented)
PR libgcj/27730:
	* java/lang/Thread.java (threadId): New field.
	(nextThreadId): New static field.
	(Thread): Initialize new field.
	(getId): New method.

From-SVN: r114524
2006-06-09 21:37:32 +00:00
Tom Tromey
0cf32584ca * java/lang/Class.java (getClassLoaderInternal): Now native.
From-SVN: r114523
2006-06-09 21:33:32 +00:00
Thomas Fitzsimmons
02440ca432 String.java, [...]: Merge from GNU Classpath HEAD.
2006-06-09  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* java/lang/String.java, classpath/native/jni/classpath/jcl.h,
	classpath/native/jni/qt-peer/eventmethods.h,
	classpath/native/jni/qt-peer/qtmenupeer.cpp,
	classpath/native/jni/qt-peer/.cvsignore,
	classpath/native/jni/gtk-peer/gdkdisplay.h,
	classpath/native/jni/gtk-peer/cairographics2d.h,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_FreetypeGlyphVector.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphicsCopy.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c,
	classpath/native/jni/gtk-peer/.cvsignore,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkVolatileImage.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c,
	classpath/native/jni/gtk-peer/gtkpeer.h,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoSurface.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFramePeer.c,
	classpath/native/jni/gtk-peer/Makefile.am,
	classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c,
	classpath/native/jawt/Makefile.am,
	classpath/native/jawt/.cvsignore,
	classpath/native/target/Linux/Makefile.in,
	classpath/native/plugin/gcjwebplugin.cc,
	classpath/native/plugin/Makefile.am,
	classpath/native/plugin/.cvsignore,
	classpath/resource/Makefile.in,
	classpath/gnu/java/awt/peer/gtk/VolatileImageGraphics.java,
	classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java,
	classpath/gnu/java/awt/peer/gtk/CairoSurface.java,
	classpath/gnu/java/awt/peer/gtk/GdkFontPeer.java,
	classpath/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java,
	classpath/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java,
	classpath/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java,
	classpath/gnu/java/awt/peer/gtk/GdkGraphics2D.java,
	classpath/gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java,
	classpath/gnu/java/awt/peer/gtk/GtkComponentPeer.java,
	classpath/gnu/java/awt/peer/gtk/GdkGraphics.java,
	classpath/gnu/java/awt/peer/gtk/GtkToolkit.java,
	classpath/gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java,
	classpath/gnu/java/awt/peer/gtk/BufferedImageGraphics.java,
	classpath/gnu/java/awt/peer/gtk/GdkTextLayout.java,
	classpath/gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java,
	classpath/gnu/java/awt/peer/gtk/ComponentGraphics.java,
	classpath/gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java,
	classpath/gnu/java/awt/peer/gtk/GtkImage.java,
	classpath/gnu/java/awt/peer/gtk/GtkVolatileImage.java,
	classpath/gnu/java/awt/peer/gtk/GdkGlyphVector.java,
	classpath/gnu/java/awt/peer/gtk/GtkCanvasPeer.java,
	classpath/gnu/java/awt/peer/swing/SwingContainerPeer.java,
	classpath/gnu/java/awt/peer/swing/SwingComponent.java,
	classpath/gnu/java/awt/peer/swing/SwingTextFieldPeer.java,
	classpath/gnu/java/awt/peer/swing/SwingMenuBarPeer.java,
	classpath/gnu/java/awt/peer/swing/SwingFramePeer.java,
	classpath/gnu/java/awt/peer/swing/SwingComponentPeer.java,
	classpath/gnu/java/awt/peer/swing/SwingWindowPeer.java,
	classpath/gnu/java/awt/print/JavaPrinterJob.java,
	classpath/gnu/java/awt/print/PostScriptGraphics2D.java,
	classpath/gnu/java/awt/print/SpooledDocument.java,
	classpath/gnu/java/awt/print/JavaPrinterGraphics.java,
	classpath/gnu/java/awt/BitwiseXORComposite.java,
	classpath/gnu/java/awt/font/GNUGlyphVector.java,
	classpath/gnu/java/awt/font/opentype/NameDecoder.java,
	classpath/gnu/java/awt/java2d/RasterGraphics.java,
	classpath/gnu/java/awt/java2d/TexturePaintContext.java,
	classpath/gnu/java/awt/java2d/PolyEdge.java,
	classpath/gnu/java/awt/java2d/AbstractGraphics2D.java,
	classpath/gnu/java/awt/java2d/AlphaCompositeContext.java,
	classpath/gnu/java/awt/java2d/ImagePaint.java,
	classpath/gnu/java/awt/Buffers.java,
	classpath/gnu/classpath/Configuration.java.in,
	classpath/gnu/javax/swing/text/html/CombinedAttributes.java,
	classpath/gnu/javax/swing/text/html/CharacterAttributeTranslator.java,
	classpath/gnu/javax/swing/text/html/parser/htmlAttributeSet.java,
	classpath/gnu/javax/swing/text/html/parser/SmallHtmlAttributeSet.java,
	classpath/gnu/javax/swing/text/html/ImageViewIconFactory.java,
	classpath/tools/toolwrapper.c,
	classpath/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java,
	classpath/tools/gnu/classpath/tools/native2ascii/Messages.java,
	classpath/tools/gnu/classpath/tools/getopt/FileArgumentCallback.java,
	classpath/tools/gnu/classpath/tools/getopt/OptionGroup.java,
	classpath/tools/gnu/classpath/tools/getopt/OptionException.java,
	classpath/tools/gnu/classpath/tools/getopt/Messages.java,
	classpath/tools/gnu/classpath/tools/getopt/Option.java,
	classpath/tools/gnu/classpath/tools/getopt/Parser.java,
	classpath/tools/gnu/classpath/tools/getopt/ClasspathToolParser.java,
	classpath/tools/gnu/classpath/tools/jarsigner/JarSigner.java,
	classpath/tools/gnu/classpath/tools/jarsigner/Main.java,
	classpath/tools/gnu/classpath/tools/jarsigner/Messages.java,
	classpath/tools/gnu/classpath/tools/jarsigner/package.html,
	classpath/tools/gnu/classpath/tools/keytool/ListCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/StorePasswdCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/ExportCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/GenKeyCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/Messages.java,
	classpath/tools/gnu/classpath/tools/keytool/package.html,
	classpath/tools/gnu/classpath/tools/keytool/Command.java,
	classpath/tools/gnu/classpath/tools/keytool/IdentityDBCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/Main.java,
	classpath/tools/gnu/classpath/tools/keytool/DeleteCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/CertReqCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/SelfCertCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/KeyCloneCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/KeyPasswdCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/ImportCmd.java,
	classpath/tools/gnu/classpath/tools/keytool/PrintCertCmd.java,
	classpath/tools/gnu/classpath/tools/rmi/registry/package.html,
	classpath/tools/gnu/classpath/tools/rmi/RMIC.txt,
	classpath/tools/gnu/classpath/tools/rmi/RMIC.java,
	classpath/tools/gnu/classpath/tools/appletviewer/ErrorApplet.java,
	classpath/tools/gnu/classpath/tools/appletviewer/AppletClassLoader.java,
	classpath/tools/gnu/classpath/tools/appletviewer/CommonAppletContext.java,
	classpath/tools/gnu/classpath/tools/appletviewer/StandaloneAppletContext.java,
	classpath/tools/gnu/classpath/tools/appletviewer/AppletSecurityManager.java,
	classpath/tools/gnu/classpath/tools/appletviewer/PluginAppletContext.java,
	classpath/tools/gnu/classpath/tools/appletviewer/AppletWarning.java,
	classpath/tools/gnu/classpath/tools/appletviewer/StandaloneAppletViewer.java,
	classpath/tools/gnu/classpath/tools/appletviewer/AppletTag.java,
	classpath/tools/gnu/classpath/tools/appletviewer/ConsoleDialog.java,
	classpath/tools/gnu/classpath/tools/appletviewer/Main.java,
	classpath/tools/gnu/classpath/tools/appletviewer/StandaloneAppletWindow.java,
	classpath/tools/gnu/classpath/tools/appletviewer/PluginAppletViewer.java,
	classpath/tools/gnu/classpath/tools/appletviewer/TagParser.java,
	classpath/tools/gnu/classpath/tools/appletviewer/PluginAppletWindow.java,
	classpath/tools/gnu/classpath/tools/appletviewer/CommonAppletStub.java,
	classpath/tools/gnu/classpath/tools/serialver/Messages.java,
	classpath/tools/gnu/classpath/tools/serialver/SerialVer.java,
	classpath/tools/gnu/classpath/tools/jar/Creator.java,
	classpath/tools/gnu/classpath/tools/jar/Entry.java,
	classpath/tools/gnu/classpath/tools/jar/Lister.java,
	classpath/tools/gnu/classpath/tools/jar/Main.java,
	classpath/tools/gnu/classpath/tools/jar/Updater.java,
	classpath/tools/gnu/classpath/tools/jar/Messages.java,
	classpath/tools/gnu/classpath/tools/jar/Extractor.java,
	classpath/tools/gnu/classpath/tools/jar/Action.java,
	classpath/tools/gnu/classpath/tools/jar/Indexer.java,
	classpath/tools/gnu/classpath/tools/jar/WorkSet.java,
	classpath/tools/gnu/classpath/tools/giop/GRMIC.txt,
	classpath/tools/gnu/classpath/tools/giop/grmic/GiopRmicCompiler.java,
	classpath/tools/gnu/classpath/tools/giop/GRMIC.java,
	classpath/tools/Makefile.am, classpath/tools/jarsigner.in,
	classpath/tools/keytool.in, classpath/tools/appletviewer.in,
	classpath/tools/.cvsignore, classpath/configure.ac,
	classpath/javax/swing/JTabbedPane.java,
	classpath/javax/swing/AbstractButton.java,
	classpath/javax/swing/JViewport.java,
	classpath/javax/swing/KeyboardManager.java,
	classpath/javax/swing/JMenuItem.java,
	classpath/javax/swing/JMenuBar.java,
	classpath/javax/swing/MenuSelectionManager.java,
	classpath/javax/swing/JOptionPane.java,
	classpath/javax/swing/JSpinner.java,
	classpath/javax/swing/JCheckBoxMenuItem.java,
	classpath/javax/swing/JEditorPane.java,
	classpath/javax/swing/JFormattedTextField.java,
	classpath/javax/swing/JTree.java,
	classpath/javax/swing/CellRendererPane.java,
	classpath/javax/swing/JScrollPane.java,
	classpath/javax/swing/tree/VariableHeightLayoutCache.java,
	classpath/javax/swing/tree/TreeNode.java,
	classpath/javax/swing/tree/FixedHeightLayoutCache.java,
	classpath/javax/swing/tree/DefaultTreeCellEditor.java,
	classpath/javax/swing/tree/TreePath.java,
	classpath/javax/swing/tree/RowMapper.java,
	classpath/javax/swing/tree/DefaultMutableTreeNode.java,
	classpath/javax/swing/tree/DefaultTreeModel.java,
	classpath/javax/swing/tree/AbstractLayoutCache.java,
	classpath/javax/swing/tree/TreeSelectionModel.java,
	classpath/javax/swing/tree/DefaultTreeSelectionModel.java,
	classpath/javax/swing/tree/DefaultTreeCellRenderer.java,
	classpath/javax/swing/tree/ExpandVetoException.java,
	classpath/javax/swing/JList.java,
	classpath/javax/swing/table/JTableHeader.java,
	classpath/javax/swing/table/AbstractTableModel.java,
	classpath/javax/swing/table/DefaultTableModel.java,
	classpath/javax/swing/table/TableCellEditor.java,
	classpath/javax/swing/table/TableCellRenderer.java,
	classpath/javax/swing/ProgressMonitor.java,
	classpath/javax/swing/JToolBar.java,
	classpath/javax/swing/TransferHandler.java,
	classpath/javax/swing/DefaultCellEditor.java,
	classpath/javax/swing/DefaultButtonModel.java,
	classpath/javax/swing/JLayeredPane.java,
	classpath/javax/swing/text/DefaultEditorKit.java,
	classpath/javax/swing/text/DefaultCaret.java,
	classpath/javax/swing/text/FieldView.java,
	classpath/javax/swing/text/JTextComponent.java,
	classpath/javax/swing/text/TextAction.java,
	classpath/javax/swing/text/StyleContext.java,
	classpath/javax/swing/text/html/HTMLDocument.java,
	classpath/javax/swing/text/html/MinimalHTMLWriter.java,
	classpath/javax/swing/text/html/ImageView.java,
	classpath/javax/swing/text/html/HTMLEditorKit.java,
	classpath/javax/swing/text/AbstractWriter.java,
	classpath/javax/swing/text/GapContent.java,
	classpath/javax/swing/text/Utilities.java,
	classpath/javax/swing/text/PlainView.java,
	classpath/javax/swing/UIManager.java,
	classpath/javax/swing/JSplitPane.java,
	classpath/javax/swing/JComponent.java,
	classpath/javax/swing/SwingUtilities.java,
	classpath/javax/swing/border/AbstractBorder.java,
	classpath/javax/swing/border/CompoundBorder.java,
	classpath/javax/swing/border/TitledBorder.java,
	classpath/javax/swing/border/MatteBorder.java,
	classpath/javax/swing/border/BevelBorder.java,
	classpath/javax/swing/RepaintManager.java,
	classpath/javax/swing/JTable.java,
	classpath/javax/swing/UIDefaults.java,
	classpath/javax/swing/DefaultDesktopManager.java,
	classpath/javax/swing/JMenu.java,
	classpath/javax/swing/JLabel.java,
	classpath/javax/swing/JSlider.java,
	classpath/javax/swing/plaf/basic/BasicToolBarUI.java,
	classpath/javax/swing/plaf/basic/BasicButtonUI.java,
	classpath/javax/swing/plaf/basic/BasicOptionPaneUI.java,
	classpath/javax/swing/plaf/basic/BasicTextAreaUI.java,
	classpath/javax/swing/plaf/basic/BasicToggleButtonUI.java,
	classpath/javax/swing/plaf/basic/BasicSpinnerUI.java,
	classpath/javax/swing/plaf/basic/BasicSliderUI.java,
	classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java,
	classpath/javax/swing/plaf/basic/BasicComboPopup.java,
	classpath/javax/swing/plaf/basic/BasicCheckBoxUI.java,
	classpath/javax/swing/plaf/basic/BasicInternalFrameUI.java,
	classpath/javax/swing/plaf/basic/BasicProgressBarUI.java,
	classpath/javax/swing/plaf/basic/BasicRadioButtonUI.java,
	classpath/javax/swing/plaf/basic/BasicPanelUI.java,
	classpath/javax/swing/plaf/basic/BasicSplitPaneUI.java,
	classpath/javax/swing/plaf/basic/BasicTreeUI.java,
	classpath/javax/swing/plaf/basic/BasicTableHeaderUI.java,
	classpath/javax/swing/plaf/basic/BasicFileChooserUI.java,
	classpath/javax/swing/plaf/basic/BasicScrollPaneUI.java,
	classpath/javax/swing/plaf/basic/BasicComboBoxUI.java,
	classpath/javax/swing/plaf/basic/BasicListUI.java,
	classpath/javax/swing/plaf/basic/BasicIconFactory.java,
	classpath/javax/swing/plaf/basic/BasicTextUI.java,
	classpath/javax/swing/plaf/basic/BasicLookAndFeel.java,
	classpath/javax/swing/plaf/basic/BasicDirectoryModel.java,
	classpath/javax/swing/plaf/basic/BasicRootPaneUI.java,
	classpath/javax/swing/plaf/basic/BasicTableUI.java,
	classpath/javax/swing/plaf/basic/SharedUIDefaults.java,
	classpath/javax/swing/plaf/multi/MultiComboBoxUI.java,
	classpath/javax/swing/plaf/multi/MultiListUI.java,
	classpath/javax/swing/plaf/multi/MultiSplitPaneUI.java,
	classpath/javax/swing/plaf/multi/MultiFileChooserUI.java,
	classpath/javax/swing/plaf/multi/MultiOptionPaneUI.java,
	classpath/javax/swing/plaf/multi/MultiTabbedPaneUI.java,
	classpath/javax/swing/plaf/multi/MultiLookAndFeel.java,
	classpath/javax/swing/plaf/metal/MetalSliderUI.java,
	classpath/javax/swing/plaf/metal/MetalIconFactory.java,
	classpath/javax/swing/plaf/metal/MetalComboBoxIcon.java,
	classpath/javax/swing/plaf/metal/MetalTabbedPaneUI.java,
	classpath/javax/swing/plaf/metal/MetalLookAndFeel.java,
	classpath/javax/swing/plaf/metal/MetalCheckBoxUI.java,
	classpath/javax/swing/plaf/metal/MetalSeparatorUI.java,
	classpath/javax/swing/plaf/metal/MetalBorders.java,
	classpath/javax/swing/plaf/metal/MetalSplitPaneDivider.java,
	classpath/javax/swing/plaf/metal/MetalScrollBarUI.java,
	classpath/javax/swing/plaf/metal/MetalRootPaneUI.java,
	classpath/javax/swing/plaf/metal/MetalInternalFrameUI.java,
	classpath/javax/swing/plaf/metal/MetalRadioButtonUI.java,
	classpath/javax/swing/plaf/metal/MetalToolTipUI.java,
	classpath/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java,
	classpath/javax/swing/plaf/metal/MetalFileChooserUI.java,
	classpath/javax/swing/plaf/metal/MetalUtils.java,
	classpath/javax/swing/plaf/metal/MetalComboBoxButton.java,
	classpath/javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java,
	classpath/javax/swing/plaf/metal/MetalButtonUI.java,
	classpath/javax/swing/JPopupMenu.java,
	classpath/javax/swing/JProgressBar.java,
	classpath/javax/swing/WindowConstants.java,
	classpath/javax/swing/JFrame.java,
	classpath/javax/swing/JFileChooser.java,
	classpath/javax/swing/JComboBox.java,
	classpath/javax/swing/event/EventListenerList.java,
	classpath/javax/swing/ListSelectionModel.java,
	classpath/javax/swing/JScrollBar.java,
	classpath/java/text/SimpleDateFormat.java,
	classpath/java/text/NumberFormat.java,
	classpath/java/text/class-dependencies.conf,
	classpath/java/awt/image/ColorModel.java,
	classpath/java/awt/image/BufferedImage.java,
	classpath/java/awt/Window.java,
	classpath/java/awt/ContainerOrderFocusTraversalPolicy.java,
	classpath/java/awt/LightweightDispatcher.java,
	classpath/java/awt/EventDispatchThread.java,
	classpath/java/awt/BasicStroke.java,
	classpath/java/awt/ColorPaintContext.java,
	classpath/java/awt/Container.java,
	classpath/java/awt/TexturePaint.java,
	classpath/java/awt/Component.java, classpath/java/awt/Font.java,
	classpath/java/awt/GraphicsConfiguration.java,
	classpath/java/awt/DefaultKeyboardFocusManager.java,
	classpath/java/awt/print/PrinterJob.java,
	classpath/java/awt/im/InputContext.java,
	classpath/java/awt/dnd/DragGestureRecognizer.java,
	classpath/java/awt/Toolkit.java,
	classpath/java/awt/font/GraphicAttribute.java,
	classpath/java/awt/font/ImageGraphicAttribute.java,
	classpath/java/awt/font/GlyphVector.java,
	classpath/java/awt/font/GlyphMetrics.java,
	classpath/java/awt/font/ShapeGraphicAttribute.java,
	classpath/java/awt/Graphics2D.java,
	classpath/include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h,
	classpath/include/gnu_java_awt_peer_gtk_ComponentGraphics.h,
	classpath/include/gnu_java_awt_peer_gtk_CairoGraphics2D.h,
	classpath/include/gnu_java_awt_peer_gtk_FreetypeGlyphVector.h,
	classpath/include/gnu_java_awt_peer_gtk_GtkCanvasPeer.h,
	classpath/include/config.h.in,
	classpath/include/gnu_java_awt_peer_gtk_GdkTextLayout.h,
	classpath/include/gnu_java_awt_peer_gtk_GtkComponentPeer.h,
	classpath/include/gnu_java_awt_peer_gtk_GdkFontPeer.h,
	classpath/include/gnu_java_awt_peer_gtk_ComponentGraphicsCopy.h,
	classpath/include/gnu_java_awt_peer_gtk_GtkVolatileImage.h,
	classpath/include/gnu_java_awt_peer_gtk_GtkImage.h,
	classpath/include/gnu_java_awt_peer_gtk_CairoSurface.h,
	classpath/include/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.h:
	Merge from GNU Classpath HEAD.

From-SVN: r114510
2006-06-09 16:07:07 +00:00
Gary Benson
1e19cfd26d natFilePosix.cc (getCanonicalPath): Rewritten.
* java/io/natFilePosix.cc (getCanonicalPath): Rewritten.
	* configure.ac: Remove realpath check and add checks for
	lstat and readlink.
	* configure: Rebuilt.
	* include/config.h.in: Likewise.
	* java/io/File.java: Javadoc fix.

From-SVN: r114434
2006-06-06 15:09:20 +00:00
Thomas Fitzsimmons
69037dd991 VMClassLoader.java (initialize): Set default library control to LIB_NEVER.
2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* java/lang/VMClassLoader.java (initialize): Set default library
	control to LIB_NEVER.

From-SVN: r114277
2006-05-31 17:47:44 +00:00
Thomas Fitzsimmons
2d25461bcb natThread.cc (countStackFrames): Do not throw UnsupportedOperationException.
2006-05-29  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* java/lang/natThread.cc (countStackFrames): Do not throw
	UnsupportedOperationException.
	(resume): Likewise.
	(stop): Likewise.
	(suspend): Likewise.

From-SVN: r114218
2006-05-29 22:04:13 +00:00
Tom Tromey
91f8ce668b re PR libgcj/27024 (Implement URLConnection.getFileNameMap)
PR libgcj/27024:
	* sources.am, Makefile.in: Rebuilt.
	* gnu/java/net/DefaultContentHandlerFactory.java: Removed.
	* java/net/URLConnection.java: Removed.

From-SVN: r114056
2006-05-24 21:44:34 +00:00
Tom Tromey
5aca4c41f7 re PR libgcj/27729 (Field, Method and Constructor need isSynthetic() implemetation)
gcc/java:
	PR libgcj/27729:
	* jcf.h (ACC_INVISIBLE): Changed value.
libjava:
	PR libgcj/27729:
	* java/lang/reflect/natField.cc (getAddr): Added parens.
	* java/lang/reflect/natConstructor.cc (getModifiersInternal):
	Renamed.  Don't mask flags.
	* java/lang/reflect/Constructor.java (CONSTRUCTOR_MODIFIERS): New
	constant.
	(getModifiersInternal): Renamed.
	(getModifiers): Rewrote.
	(isSynthetic, isVarArgs): New methods.
	(hashCode): Rewrote.
	(addTypeParameters, toGenericString): New methods.
	(getTypeParameters): Rewrote.
	(getSignature): New method.
	(getGenericParameterTypes, getGenericExceptionTypes): Likewise.
	* java/lang/reflect/natMethod.cc (getModifiersInternal):
	Renamed.  Don't mask flags.
	* java/lang/reflect/natField.cc (getModifiersInternal): Renamed.
	Don't mask flags.
	* java/lang/reflect/Modifier.java (BRIDGE, VARARGS, SYNTHETIC,
	ENUM): New constants.
	(INVISIBLE): Changed value.
	* java/lang/reflect/Method.java: Mostly merged with Classpath.
	(getModifiersInternal): Renamed.
	(getModifiers): Rewrote.
	(isBridge, isSynthetic, isVarArgs): New methods.
	(toGenericString): Likewise.
	(getTypeParameters): Likewise.
	(getSignature): Likewise.
	(getGenericExceptionTypes, getGenericParameterTypes,
	getGenericReturnType): Likewise.
	(METHOD_MODIFIERS): New constant.
	* java/lang/reflect/Field.java: Mostly merged with Classpath.
	Added javadoc everywhere.
	(getModifiersInternal): Renamed.
	(getModifiers, isSynthetic, isEnumConstant): Rewrote.
	(toGenericString): New method.
	(getGenericType, getSignature): Likewise.
	(FIELD_MODIFIERS): New constant.

From-SVN: r114046
2006-05-24 17:21:52 +00:00
Tom Tromey
f32f60c997 re PR libgcj/27731 (Math cbrt(), cosh(), expm1(), hypot(), log1p(), sinh() and tanh() not implemented)
PR libgcj/27731:
	* java/lang/natMath.cc (cbrt, cosh, expm1, hypot, log1p, sinh,
	tanh): New methods.
	* java/lang/Math.java (cbrt, cosh, expm1, hypot, log1p, sinh,
	tanh): Declare.

From-SVN: r114045
2006-05-24 17:14:45 +00:00
Andreas Tobler
3bed5c6bae natClass.cc (_Jv_FindMethodInCache): Mark klass, name and signature as MAYBE_UNUSED for HAVE_TLS == 0.
2006-05-21  Andreas Tobler  <a.tobler@schweiz.ch>

	* java/lang/natClass.cc (_Jv_FindMethodInCache): Mark klass, name and
	signature as MAYBE_UNUSED for HAVE_TLS == 0.
	(_Jv_AddMethodToCache): Mark klass and method as MAYBE_UNUSED for
	HAVE_TLS == 0.

From-SVN: r113939
2006-05-21 00:03:19 +02:00
Mark Wielaard
4f9533c772 Imported GNU Classpath 0.90
Imported GNU Classpath 0.90
       * scripts/makemake.tcl: LocaleData.java moved to gnu/java/locale.

       * sources.am: Regenerated.
       * gcj/javaprims.h: Regenerated.
       * Makefile.in: Regenerated.
       * gcj/Makefile.in: Regenerated.
       * include/Makefile.in: Regenerated.
       * testsuite/Makefile.in: Regenerated.

       * gnu/java/lang/VMInstrumentationImpl.java: New override.
       * gnu/java/net/local/LocalSocketImpl.java: Likewise.
       * gnu/classpath/jdwp/VMMethod.java: Likewise.
       * gnu/classpath/jdwp/VMVirtualMachine.java: Update to latest
       interface.
       * java/lang/Thread.java: Add UncaughtExceptionHandler.
       * java/lang/reflect/Method.java: Implements GenericDeclaration and
       isSynthetic(),
       * java/lang/reflect/Field.java: Likewise.
       * java/lang/reflect/Constructor.java
       * java/lang/Class.java: Implements Type, GenericDeclaration,
       getSimpleName() and getEnclosing*() methods.
       * java/lang/Class.h: Add new public methods.
       * java/lang/Math.java: Add signum(), ulp() and log10().
       * java/lang/natMath.cc (log10): New function.
       * java/security/VMSecureRandom.java: New override.
       * java/util/logging/Logger.java: Updated to latest classpath
       version.
       * java/util/logging/LogManager.java: New override.

From-SVN: r113887
2006-05-18 17:29:21 +00:00
Bryce McKinlay
5600ef7fb1 re PR libgcj/27352 (SecurityManager.checkPermission() called unnecessarily)
PR libgcj/27352
        * java/lang/Class.java (getClassLoaderInternal): New method.
        (forName (String, Class)): Use getClassLoaderInternal.
        (getPackage): Likewise.
        (getResource): Likewise.
        (getResourceAsStream): Likewise.
        (desiredAssertionStatus): Likewise.

From-SVN: r113863
2006-05-17 16:09:57 +01:00
Tom Tromey
628cacef24 sources.am, [...]: Rebuilt.
* sources.am, Makefile.in: Rebuilt.
	* Makefile.am (nat_source_files): Mention natVMChannels.cc, not
	natChannels.cc.
	* java/nio/channels/natVMChannels.cc: Renamed from
	natChannels.cc.
	* java/nio/channels/Channels.java: Removed.
	* java/nio/channels/natChannels.cc: Removed.
	* java/nio/channels/VMChannels.java: New file.

From-SVN: r113745
2006-05-13 21:21:28 +00:00
Tom Tromey
6aaaa44beb sources.am, [...]: Rebuilt.
* sources.am, Makefile.in: Rebuilt.
	* java/text/DateFormat.java: Removed.

From-SVN: r113740
2006-05-13 18:41:38 +00:00
Tom Tromey
8d288df0fe sources.am, [...]: Rebuilt.
* sources.am, Makefile.in: Rebuilt.
	* gnu/java/net/protocol/jar/Connection.java: Removed.
	* java/net/JarURLConnection.java: Removed.

From-SVN: r113739
2006-05-13 17:58:50 +00:00
Tom Tromey
143145daa4 sources.am, [...]: Rebuilt.
* sources.am, Makefile.in: Rebuilt.
	* java/util/logging/LogManager.java: Removed.
	* java/util/logging/Logger.java (resetLogger): New method, from
	Classpath.
	* java/io/RandomAccessFile.java: Removed.
	* gnu/java/nio/channels/FileChannelImpl.java (create): New
	method.
	(FileChannelImpl): Now private.
	* java/io/FileInputStream.java: Removed.
	* java/io/FileOutputStream.java: Removed.
	* java/security/AccessControlContext.java: Removed.
	* java/lang/ThreadLocal.java: Removed.
	* java/lang/InheritableThreadLocal.java: Removed.
	* java/lang/Thread.java (locals): New field.
	(getThreadLocals): New method.
	* java/lang/natThread.cc (finish_): Clear 'locals'.

From-SVN: r113735
2006-05-13 02:16:22 +00:00
Andrew Haley
e68dbbf5a3 natClassLoader.cc: Add comments.
2006-05-10  Andrew Haley  <aph@redhat.com>

        * java/lang/natClassLoader.cc: Add comments.

From-SVN: r113677
2006-05-10 17:50:09 +00:00
Andrew Haley
fdafd4613f prims.cc (_Jv_soleIndirectCompiledEngine): New.
2006-05-09  Andrew Haley  <aph@redhat.com>

        * prims.cc (_Jv_soleIndirectCompiledEngine): New.
        * include/execution.h (Jv_CompiledEngine::do_allocate_static_fields):
        Remove body.
        (_Jv_CompiledEngine::allocate_field_initializers): New.
        (_Jv_CompiledEngine::_Jv_CompiledEngine): Initialize
        allocate_field_initializers.
        (class _Jv_IndirectCompiledClass): New.
        (struct _Jv_IndirectCompiledEngine): New.
        * java/lang/Class.h: (IndirectCompiledEngine): New.
        * java/lang/natClassLoader.cc (_Jv_NewClassFromInitializer): Set
        engine to _Jv_soleIndirectCompiledEngine
        * link.cc (ensure_fields_laid_out): Call
        engine->allocate_field_initializers().

From-SVN: r113674
2006-05-10 17:17:20 +00:00
Tom Tromey
6ec13f0b96 re PR libgcj/27294 (gij throws NullPointerException, when the interpreter is not enabled)
PR libgcj/27294:
	* java/lang/natVMClassLoader.cc (defineClass): Throw
	VirtualMachineError if no interpreter configured.

From-SVN: r113554
2006-05-05 15:05:20 +00:00
Andrew Haley
b2ed63b4aa [multiple changes]
2006-05-04  Andrew Haley  <aph@redhat.com>

        * class.c (make_field_value): Always build_address_of fdecl if
        there is an initializer.

2006-05-03  Andrew Haley  <aph@redhat.com>

        PR libgcj/27352
        * expr.c (maybe_rewrite_invocation): New function.
        (rewrite_arglist_getclass): Likewise.
        (rules): New.
        (expand_invoke): Call maybe_rewrite_invocation.
        * parse.y (patch_invoke): Likewise.
        * java-tree.h: (maybe_rewrite_invocation): New function.

2006-05-03  Andrew Haley  <aph@redhat.com>

        PR libgcj/27352
        * java/lang/Class.java (getClassLoader(Class)): New.
        forName(String, Class): New.
        * java/lang/natClass.cc (getClassLoader(Class)): New.

2006-05-02  Andrew Haley  <aph@redhat.com>

        * prims.cc (_Jv_NewMultiArray): Check for phantom class.

From-SVN: r113532
2006-05-04 18:44:53 +00:00
Tom Tromey
b149e89e77 Class.h (JV_STATE_LOADING): Added comment.
* java/lang/Class.h (JV_STATE_LOADING): Added comment.
	* Makefile.in: Rebuilt.
	* Makefile.am (nat_source_files): Added natSystemClassLoader.cc.
	* gnu/gcj/runtime/natSystemClassLoader.cc: New file.
	* gnu/gcj/runtime/SystemClassLoader.java (nativeClasses):
	New field.
	(loadedClasses): Removed.
	(findClass): Declare.
	(addClass): Add to nativeClasses, not loadedClasses.

From-SVN: r113530
2006-05-04 15:29:22 +00:00
Andrew Haley
5233753562 natClassLoader.cc: Don't include link.h or dladdr.h.
2006-04-25  Andrew Haley  <aph@redhat.com>

        * java/lang/natClassLoader.cc: Don't include link.h or dladdr.h.
        * boehm.cc: Don't include link.h.
        (_Jv_RegisterLibForGc): Cast away const when calling dladdr().

From-SVN: r113246
2006-04-25 11:54:15 +00:00