harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r501140 - in /harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/unix: nativelib_common.h org_apache_harmony_awt_nativebridge_linux_X11.cpp
Date Mon, 29 Jan 2007 18:31:39 GMT
Author: tellison
Date: Mon Jan 29 10:31:38 2007
New Revision: 501140

URL: http://svn.apache.org/viewvc?view=rev&rev=501140
Log:
Look for versioned X11 libraries before the unversioned libs.


Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/unix/nativelib_common.h
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/unix/org_apache_harmony_awt_nativebridge_linux_X11.cpp

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/unix/nativelib_common.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/unix/nativelib_common.h?view=diff&rev=501140&r1=501139&r2=501140
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/unix/nativelib_common.h
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/unix/nativelib_common.h
Mon Jan 29 10:31:38 2007
@@ -28,8 +28,8 @@
 
 #define mkstr(x) #x
 
-
 #define LOAD_LIB(res, name) res = dlopen(mkstr(lib##name.so), RTLD_LAZY)
+#define LOAD_LIB_VER(res, name, ver) res = dlopen(mkstr(lib##name.so.##ver), RTLD_LAZY)
 
 #define FindFunction(lib, name) (void *)dlsym(lib, name)
 

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/unix/org_apache_harmony_awt_nativebridge_linux_X11.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/unix/org_apache_harmony_awt_nativebridge_linux_X11.cpp?view=diff&rev=501140&r1=501139&r2=501140
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/unix/org_apache_harmony_awt_nativebridge_linux_X11.cpp
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/unix/org_apache_harmony_awt_nativebridge_linux_X11.cpp
Mon Jan 29 10:31:38 2007
@@ -28,19 +28,28 @@
 static libHandler libXmu;
 static libHandler libXtst;
 JNIEXPORT void JNICALL Java_org_apache_harmony_awt_nativebridge_linux_X11_init (JNIEnv *
env, jclass cls) {
-    LOAD_LIB(libX11, X11);
+    LOAD_LIB_VER(libX11, X11, 6);
     if (libX11 == NULL) {
-        throwNewExceptionByName(env, LINK_EXCEPTION, "Cannot load libX11.so library");
+        LOAD_LIB(libX11, X11);
+    }
+    if (libX11 == NULL) {
+        throwNewExceptionByName(env, LINK_EXCEPTION, "Cannot load libX11 library");
         return;
     }
 
-    LOAD_LIB(libXmu, Xmu);
+    LOAD_LIB_VER(libXmu, Xmu, 6);
     if (libXmu == NULL) {
-        throwNewExceptionByName(env, LINK_EXCEPTION, "Cannot load libXmu.so library");
+        LOAD_LIB(libXmu, Xmu);
+    }
+    if (libXmu == NULL) {
+        throwNewExceptionByName(env, LINK_EXCEPTION, "Cannot load libXmu library");
         return;
     }
 
-    LOAD_LIB(libXtst, Xtst);
+    LOAD_LIB_VER(libXtst, Xtst, 6);
+    if (libXtst == NULL) {
+        LOAD_LIB(libXtst, Xtst);
+    }
     if (libXtst == NULL) {
         throwNewExceptionByName(env, LINK_EXCEPTION, "Cannot load libXtst.so library");
         return;



Mime
View raw message