|
Author: piumarta
Date: 2010-04-09 00:41:16 -0700 (Fri, 09 Apr 2010)
New Revision: 2180
Modified:
trunk/platforms/unix/vm/sqUnixExternalPrims.c
Log:
try loading plugins from the unmodified name to permit fully-specified library names or paths
Modified: trunk/platforms/unix/vm/sqUnixExternalPrims.c
===================================================================
--- trunk/platforms/unix/vm/sqUnixExternalPrims.c 2010-04-06 13:31:46 UTC (rev 2179)
+++ trunk/platforms/unix/vm/sqUnixExternalPrims.c 2010-04-09 07:41:16 UTC (rev 2180)
@@ -24,7 +24,7 @@
* SOFTWARE.
*/
-/* Last edited: 2009-08-31 13:57:04 by piumarta on emilia-3.local
+/* Last edited: 2010-04-09 00:37:36 by piumarta on ubuntu
*/
#define DEBUG 0
@@ -168,6 +168,11 @@
return handle;
}
+ /* try loading the name unmodified */
+
+ if ((handle= dlopen(pluginName, RTLD_NOW | RTLD_GLOBAL)))
+ return handle;
+
/* try loading {pluginPaths}/MODULE_PREFIX<name>MODULE_SUFFIX */
while (*dir) {
@@ -185,7 +190,9 @@
sprintf(path, "%s%s%s", LIBRARY_PREFIX, pluginName, LIBRARY_SUFFIX);
# endif
- handle= dlopen(path, RTLD_NOW | RTLD_GLOBAL);
+ if ((handle= dlopen(path, RTLD_NOW | RTLD_GLOBAL)))
+ return handle;
+
fdebugf((stderr, "ioLoadModule(%s) = %p\n", path, handle));
return handle;
|