aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-08-03 01:25:17 +0000
committerTom Tromey <tromey@gcc.gnu.org>2001-08-03 01:25:17 +0000
commit870f3799af30bc486196ce85da6cf5b1f35ce15f (patch)
tree5d4403537d5d4a367b291432413f6436240f81a4
parent8aeea6e67d77adc1a5e1575e4543d4259295be39 (diff)
downloadgcc-870f3799af30bc486196ce85da6cf5b1f35ce15f.zip
gcc-870f3799af30bc486196ce85da6cf5b1f35ce15f.tar.gz
gcc-870f3799af30bc486196ce85da6cf5b1f35ce15f.tar.bz2
prims.cc (JNI_OnLoad): Don't declare.
* prims.cc (JNI_OnLoad): Don't declare. (_JNI_OnLoad): Don't define. (_Jv_CreateJavaVM): Don't handle JNI_OnLoad. From-SVN: r44590
-rw-r--r--libjava/ChangeLog6
-rw-r--r--libjava/prims.cc35
2 files changed, 6 insertions, 35 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 5bdccf0..4eb7694 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,5 +1,11 @@
2001-08-02 Tom Tromey <tromey@redhat.com>
+ * prims.cc (JNI_OnLoad): Don't declare.
+ (_JNI_OnLoad): Don't define.
+ (_Jv_CreateJavaVM): Don't handle JNI_OnLoad.
+
+2001-08-02 Tom Tromey <tromey@redhat.com>
+
* java/io/RandomAccessFile.java (seek): Let seek go past end of
file.
(skipBytes): Don't fail if seeking past end of file.
diff --git a/libjava/prims.cc b/libjava/prims.cc
index f10497e..0e610aa 100644
--- a/libjava/prims.cc
+++ b/libjava/prims.cc
@@ -690,21 +690,6 @@ win32_exception_handler (LPEXCEPTION_POINTERS e)
#endif
-/* This will be different from _JNI_OnLoad if the user has preloaded a JNI
- library, or linked one into the executable. */
-extern "C"
-{
- /* Some systems, like Tru64 UNIX, don't support weak definitions, so use
- an empty dummy function to check if the user provided his own. */
-#pragma weak JNI_OnLoad = _JNI_OnLoad
- extern jint JNI_OnLoad (JavaVM *, void *) __attribute__((weak));
-
- jint _JNI_OnLoad (JavaVM *vm, void *)
- {
- return 0;
- }
-}
-
#ifndef DISABLE_GETENV_PROPERTIES
@@ -897,26 +882,6 @@ _Jv_CreateJavaVM (void* /*vm_args*/)
_Jv_JNI_Init ();
- /* Some systems let you preload shared libraries before running a
- program. Under Linux, this is done by setting the LD_PRELOAD
- environment variable. We take advatage of this here to allow for
- dynamically loading a JNI library into a fully linked executable. */
-
- if (JNI_OnLoad != _JNI_OnLoad)
- {
- JavaVM *vm = _Jv_GetJavaVM ();
- if (vm == NULL)
- {
- // FIXME: what?
- return -1;
- }
- jint vers = JNI_OnLoad (vm, NULL);
- if (vers != JNI_VERSION_1_1 && vers != JNI_VERSION_1_2)
- {
- // FIXME: unload the library.
- _Jv_Throw (new java::lang::UnsatisfiedLinkError (JvNewStringLatin1 ("unrecognized version from preloaded JNI_OnLoad")));
- }
- }
return 0;
}