aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com')
-rwxr-xr-xsrc/java/com/sun/gluegen/runtime/DynamicLinker.java2
-rwxr-xr-xsrc/java/com/sun/gluegen/runtime/MacOSXDynamicLinkerImpl.java2
-rwxr-xr-xsrc/java/com/sun/gluegen/runtime/NativeLibrary.java16
-rwxr-xr-xsrc/java/com/sun/gluegen/runtime/UnixDynamicLinkerImpl.java3
-rwxr-xr-xsrc/java/com/sun/gluegen/runtime/WindowsDynamicLinkerImpl.java2
5 files changed, 13 insertions, 12 deletions
diff --git a/src/java/com/sun/gluegen/runtime/DynamicLinker.java b/src/java/com/sun/gluegen/runtime/DynamicLinker.java
index c67c526..c928c4c 100755
--- a/src/java/com/sun/gluegen/runtime/DynamicLinker.java
+++ b/src/java/com/sun/gluegen/runtime/DynamicLinker.java
@@ -43,7 +43,7 @@ package com.sun.gluegen.runtime;
linking functionality. */
interface DynamicLinker {
- public long openLibrary(String pathname);
+ public long openLibraryGlobal(String pathname);
public long openLibraryLocal(String pathname);
public long lookupSymbol(long libraryHandle, String symbolName);
public void closeLibrary(long libraryHandle);
diff --git a/src/java/com/sun/gluegen/runtime/MacOSXDynamicLinkerImpl.java b/src/java/com/sun/gluegen/runtime/MacOSXDynamicLinkerImpl.java
index 2568050..7322ffa 100755
--- a/src/java/com/sun/gluegen/runtime/MacOSXDynamicLinkerImpl.java
+++ b/src/java/com/sun/gluegen/runtime/MacOSXDynamicLinkerImpl.java
@@ -37,7 +37,7 @@ public class MacOSXDynamicLinkerImpl implements DynamicLinker
return dlopen(pathname, RTLD_LAZY | RTLD_LOCAL);
}
- public long openLibrary(String pathname) {
+ public long openLibraryGlobal(String pathname) {
// Note we use RTLD_GLOBAL visibility to allow this functionality to
// be used to pre-resolve dependent libraries of JNI code without
// requiring that all references to symbols in those libraries be
diff --git a/src/java/com/sun/gluegen/runtime/NativeLibrary.java b/src/java/com/sun/gluegen/runtime/NativeLibrary.java
index e939de4..c0e8cdf 100755
--- a/src/java/com/sun/gluegen/runtime/NativeLibrary.java
+++ b/src/java/com/sun/gluegen/runtime/NativeLibrary.java
@@ -126,15 +126,15 @@ public class NativeLibrary {
path, and in the context of the specified ClassLoader, which is
used to help find the library in the case of e.g. Java Web Start. */
public static NativeLibrary open(String libName, ClassLoader loader) {
- return open(libName, libName, libName, true, loader, false);
+ return open(libName, libName, libName, true, loader, true);
}
/** Opens the given native library, assuming it has the same base
name on all platforms, looking first in the system's search
path, and in the context of the specified ClassLoader, which is
used to help find the library in the case of e.g. Java Web Start. */
- public static NativeLibrary open(String libName, ClassLoader loader, boolean local) {
- return open(libName, libName, libName, true, loader, local);
+ public static NativeLibrary open(String libName, ClassLoader loader, boolean global) {
+ return open(libName, libName, libName, true, loader, global);
}
/** Opens the given native library, assuming it has the given base
@@ -157,14 +157,14 @@ public class NativeLibrary {
String macOSXLibName,
boolean searchSystemPathFirst,
ClassLoader loader) {
- return open(windowsLibName, unixLibName, macOSXLibName, searchSystemPathFirst, loader, false);
+ return open(windowsLibName, unixLibName, macOSXLibName, searchSystemPathFirst, loader, true);
}
public static NativeLibrary open(String windowsLibName,
String unixLibName,
String macOSXLibName,
boolean searchSystemPathFirst,
- ClassLoader loader, boolean local) {
+ ClassLoader loader, boolean global) {
List possiblePaths = enumerateLibraryPaths(windowsLibName,
unixLibName,
macOSXLibName,
@@ -178,10 +178,10 @@ public class NativeLibrary {
}
ensureNativeLibLoaded();
long res;
- if(local) {
- res = dynLink.openLibraryLocal(path);
+ if(global) {
+ res = dynLink.openLibraryGlobal(path);
} else {
- res = dynLink.openLibrary(path);
+ res = dynLink.openLibraryLocal(path);
}
if (res != 0) {
if (DEBUG) {
diff --git a/src/java/com/sun/gluegen/runtime/UnixDynamicLinkerImpl.java b/src/java/com/sun/gluegen/runtime/UnixDynamicLinkerImpl.java
index e4c3818..a4f5667 100755
--- a/src/java/com/sun/gluegen/runtime/UnixDynamicLinkerImpl.java
+++ b/src/java/com/sun/gluegen/runtime/UnixDynamicLinkerImpl.java
@@ -42,7 +42,8 @@ public class UnixDynamicLinkerImpl implements DynamicLinker
// RTLD_LOCAL visibility so can't be used for this purpose.
return dlopen(pathname, RTLD_LAZY | RTLD_LOCAL);
}
- public long openLibrary(String pathname) {
+
+ public long openLibraryGlobal(String pathname) {
// Note we use RTLD_GLOBAL visibility to allow this functionality to
// be used to pre-resolve dependent libraries of JNI code without
// requiring that all references to symbols in those libraries be
diff --git a/src/java/com/sun/gluegen/runtime/WindowsDynamicLinkerImpl.java b/src/java/com/sun/gluegen/runtime/WindowsDynamicLinkerImpl.java
index 3690041..45cb289 100755
--- a/src/java/com/sun/gluegen/runtime/WindowsDynamicLinkerImpl.java
+++ b/src/java/com/sun/gluegen/runtime/WindowsDynamicLinkerImpl.java
@@ -27,7 +27,7 @@ public class WindowsDynamicLinkerImpl implements DynamicLinker
return LoadLibraryW(libraryName);
}
- public long openLibrary(String libraryName) {
+ public long openLibraryGlobal(String libraryName) {
return LoadLibraryW(libraryName);
}