diff -Naurp smalltalk-3.0.4/lib-src/ltdl.c smalltalk-3.0.4.oden/lib-src/ltdl.c --- smalltalk-3.0.4/lib-src/ltdl.c 2008-07-25 11:10:33.000000000 -0400 +++ smalltalk-3.0.4.oden/lib-src/ltdl.c 2009-11-22 12:33:20.000000000 -0500 @@ -2164,7 +2164,8 @@ static int trim LT_PARAMS((char * static int try_dlopen LT_PARAMS((lt_dlhandle *handle, const char *filename)); static int tryall_dlopen LT_PARAMS((lt_dlhandle *handle, - const char *filename)); + const char *filename, + const char * useloader)); static int unload_deplibs LT_PARAMS((lt_dlhandle handle)); static int lt_argz_insert LT_PARAMS((char **pargz, size_t *pargz_len, @@ -2350,9 +2351,10 @@ lt_dlexit () } static int -tryall_dlopen (handle, filename) +tryall_dlopen (handle, filename, useloader) lt_dlhandle *handle; const char *filename; + const char *useloader; { lt_dlhandle cur; lt_dlloader *loader; @@ -2419,6 +2421,11 @@ tryall_dlopen (handle, filename) while (loader) { + if (useloader && strcmp(loader->loader_name, useloader)) + { + loader = loader->next; + continue; + } lt_user_data data = loader->dlloader_data; cur->module = loader->module_open (data, filename); @@ -2488,7 +2495,7 @@ tryall_dlopen_module (handle, prefix, di error += tryall_dlopen_module (handle, (const char *) 0, prefix, filename); } - else if (tryall_dlopen (handle, filename) != 0) + else if (tryall_dlopen (handle, filename, NULL) != 0) { ++error; } @@ -2509,7 +2516,7 @@ find_module (handle, dir, libdir, dlname /* Try to open the old library first; if it was dlpreopened, we want the preopened version of it, even if a dlopenable module is available. */ - if (old_name && tryall_dlopen (handle, old_name) == 0) + if (old_name && tryall_dlopen (handle, old_name, "dlpreload") == 0) { return 0; } @@ -2773,7 +2780,7 @@ find_handle_callback (filename, data, ig /* Try to dlopen the file, but do not continue searching in any case. */ - if (tryall_dlopen (handle, filename) != 0) + if (tryall_dlopen (handle, filename,NULL) != 0) *handle = 0; return 1; @@ -3058,7 +3065,7 @@ try_dlopen (phandle, filename) /* lt_dlclose()ing yourself is very bad! Disallow it. */ LT_DLSET_FLAG (*phandle, LT_DLRESIDENT_FLAG); - if (tryall_dlopen (&newhandle, 0) != 0) + if (tryall_dlopen (&newhandle, 0, NULL) != 0) { LT_DLFREE (*phandle); return 1; @@ -3180,7 +3187,7 @@ try_dlopen (phandle, filename) } #endif } - if (!file) + else { file = fopen (filename, LT_READTEXT_MODE); } @@ -3364,7 +3371,7 @@ try_dlopen (phandle, filename) #endif ))) { - if (tryall_dlopen (&newhandle, filename) != 0) + if (tryall_dlopen (&newhandle, filename, NULL) != 0) { newhandle = NULL; } diff -Naurp smalltalk-3.0.4/snprintfv/snprintfv/ltdl.c smalltalk-3.0.4.oden/snprintfv/snprintfv/ltdl.c --- smalltalk-3.0.4/snprintfv/snprintfv/ltdl.c 2008-01-09 12:20:48.000000000 -0500 +++ smalltalk-3.0.4.oden/snprintfv/snprintfv/ltdl.c 2009-11-22 12:33:12.000000000 -0500 @@ -2160,7 +2160,8 @@ static int trim LT_PARAMS((char * static int try_dlopen LT_PARAMS((lt_dlhandle *handle, const char *filename)); static int tryall_dlopen LT_PARAMS((lt_dlhandle *handle, - const char *filename)); + const char *filename, + const char * useloader)); static int unload_deplibs LT_PARAMS((lt_dlhandle handle)); static int lt_argz_insert LT_PARAMS((char **pargz, size_t *pargz_len, @@ -2346,9 +2347,10 @@ lt_dlexit () } static int -tryall_dlopen (handle, filename) +tryall_dlopen (handle, filename, useloader) lt_dlhandle *handle; const char *filename; + const char *useloader; { lt_dlhandle cur; lt_dlloader *loader; @@ -2415,6 +2417,11 @@ tryall_dlopen (handle, filename) while (loader) { + if (useloader && strcmp(loader->loader_name, useloader)) + { + loader = loader->next; + continue; + } lt_user_data data = loader->dlloader_data; cur->module = loader->module_open (data, filename); @@ -2484,7 +2491,7 @@ tryall_dlopen_module (handle, prefix, di error += tryall_dlopen_module (handle, (const char *) 0, prefix, filename); } - else if (tryall_dlopen (handle, filename) != 0) + else if (tryall_dlopen (handle, filename, NULL) != 0) { ++error; } @@ -2505,7 +2512,7 @@ find_module (handle, dir, libdir, dlname /* Try to open the old library first; if it was dlpreopened, we want the preopened version of it, even if a dlopenable module is available. */ - if (old_name && tryall_dlopen (handle, old_name) == 0) + if (old_name && tryall_dlopen (handle, old_name, "dlpreload") == 0) { return 0; } @@ -2769,7 +2776,7 @@ find_handle_callback (filename, data, ig /* Try to dlopen the file, but do not continue searching in any case. */ - if (tryall_dlopen (handle, filename) != 0) + if (tryall_dlopen (handle, filename,NULL) != 0) *handle = 0; return 1; @@ -3054,7 +3061,7 @@ try_dlopen (phandle, filename) /* lt_dlclose()ing yourself is very bad! Disallow it. */ LT_DLSET_FLAG (*phandle, LT_DLRESIDENT_FLAG); - if (tryall_dlopen (&newhandle, 0) != 0) + if (tryall_dlopen (&newhandle, 0, NULL) != 0) { LT_DLFREE (*phandle); return 1; @@ -3176,7 +3183,7 @@ try_dlopen (phandle, filename) } #endif } - if (!file) + else { file = fopen (filename, LT_READTEXT_MODE); } @@ -3360,7 +3367,7 @@ try_dlopen (phandle, filename) #endif ))) { - if (tryall_dlopen (&newhandle, filename) != 0) + if (tryall_dlopen (&newhandle, filename, NULL) != 0) { newhandle = NULL; }