Commit Graph

2285 Commits

Author SHA1 Message Date
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