diff -c -x sqX ../2.8a/src/sqNamedPrims.c src/sqNamedPrims.c *** ../2.8a/src/sqNamedPrims.c Wed Jun 28 03:35:00 2000 --- src/sqNamedPrims.c Thu Jul 6 23:33:22 2000 *************** *** 220,226 **** void *handle; ModuleEntry *module; ! dprintf(("Looking for plugin %s\n", (pluginName ? pluginName : ""))); /* Try to load the module externally */ handle = (void*) ioLoadModule(pluginName); if(ffiLoad) { --- 220,226 ---- void *handle; ModuleEntry *module; ! dprintf(("Looking for plugin %s\n", (pluginName && pluginName[0] ? pluginName : ""))); /* Try to load the module externally */ handle = (void*) ioLoadModule(pluginName); if(ffiLoad) { *************** *** 260,266 **** if(!squeakModule) { /* Load intrinsics (if possible) */ ! squeakModule = addToModuleList("", NULL, 1); firstModule = NULL; /* drop off module list - will never be unloaded */ } --- 260,266 ---- if(!squeakModule) { /* Load intrinsics (if possible) */ ! squeakModule = findAndLoadModule("", 1); firstModule = NULL; /* drop off module list - will never be unloaded */ } *************** *** 330,339 **** for(i=0; i< functionNameLength; i++) functionName[i] = ((char*)functionNameIndex)[i]; functionName[functionNameLength] = 0; ! if(moduleHandle) ! return ioFindExternalFunctionIn(functionName, moduleHandle); ! else ! return 0; } /* ioLoadModuleOfLength --- 330,336 ---- for(i=0; i< functionNameLength; i++) functionName[i] = ((char*)functionNameIndex)[i]; functionName[functionNameLength] = 0; ! return ioFindExternalFunctionIn(functionName, moduleHandle ? moduleHandle : (int)squeakModule->handle); } /* ioLoadModuleOfLength diff -c -x sqX ../2.8a/src/sqUnixExternalPrims.c src/sqUnixExternalPrims.c *** ../2.8a/src/sqUnixExternalPrims.c Sat May 20 00:24:25 2000 --- src/sqUnixExternalPrims.c Thu Jul 6 23:35:11 2000 *************** *** 90,96 **** { void *handle= 0; ! (void)(/* these are ordered so as to permit a knowledgeable user to override a "system" library with one in the CWD */ ( handle= tryLoading( "./", pluginName, ".so")) || (handle= tryLoading("./lib", pluginName, ".so")) --- 90,103 ---- { void *handle= 0; ! if (!pluginName || !pluginName[0]) { ! handle = dlopen(NULL, RTLD_NOW); ! if (!handle) ! fprintf(stderr, "ioLoadModule(): %s\n", dlerror()); ! else ! dprintf((stderr, "loaded: \n")); ! } else { ! (void)(/* these are ordered so as to permit a knowledgeable user to override a "system" library with one in the CWD */ ( handle= tryLoading( "./", pluginName, ".so")) || (handle= tryLoading("./lib", pluginName, ".so")) *************** *** 100,105 **** --- 107,113 ---- || (handle= tryLoading( "", pluginName, ".so")) || (handle= tryLoading( "lib", pluginName, ".so")) || (handle= tryLoading( "", pluginName, ""))); + } return (int)handle; }