* dln.c (load_lib): use dln_find_file_r instead of dln_find_file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-07-28 05:29:56 +00:00
Родитель a95b2fde60
Коммит 99c8c71243
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -1,3 +1,7 @@
Mon Jul 28 14:29:54 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* dln.c (load_lib): use dln_find_file_r instead of dln_find_file.
Mon Jul 28 00:18:47 2008 Yusuke Endoh <mame@tsg.ne.jp> Mon Jul 28 00:18:47 2008 Yusuke Endoh <mame@tsg.ne.jp>
* vm_core.h, thread.c: It is now prohibited to use Data_Get_Struct in * vm_core.h, thread.c: It is now prohibited to use Data_Get_Struct in

4
dln.c
Просмотреть файл

@ -911,7 +911,7 @@ char *dln_librrb_ary_path = DLN_DEFAULT_LIB_PATH;
static int static int
load_lib(const char *lib) load_lib(const char *lib)
{ {
char *path, *file; char *path, *file, fbuf[MAXPATHLEN];
char armagic[SARMAG]; char armagic[SARMAG];
int fd, size; int fd, size;
struct ar_hdr ahdr; struct ar_hdr ahdr;
@ -942,7 +942,7 @@ load_lib(const char *lib)
path = getenv("DLN_LIBRARY_PATH"); path = getenv("DLN_LIBRARY_PATH");
if (path == NULL) path = dln_librrb_ary_path; if (path == NULL) path = dln_librrb_ary_path;
file = dln_find_file(lib, path); file = dln_find_file_r(lib, path, fbuf, sizeof(fbuf));
fd = open(file, O_RDONLY); fd = open(file, O_RDONLY);
if (fd == -1) goto syserr; if (fd == -1) goto syserr;
size = read(fd, armagic, SARMAG); size = read(fd, armagic, SARMAG);