ruby-changes:6714
From: nobu <ko1@a...>
Date: Sun, 27 Jul 2008 09:15:48 +0900 (JST)
Subject: [ruby-changes:6714] Ruby:r18230 (trunk): * dln.h (dln_find_exe, dln_find_file): deprecated, use reentrant
nobu 2008-07-27 09:15:31 +0900 (Sun, 27 Jul 2008) New Revision: 18230 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18230 Log: * dln.h (dln_find_exe, dln_find_file): deprecated, use reentrant versions instead. Modified files: trunk/ChangeLog trunk/dln.c trunk/dln.h trunk/ext/win32ole/sample/ienavi2.rb trunk/win32/win32.c Index: ChangeLog =================================================================== --- ChangeLog (revision 18229) +++ ChangeLog (revision 18230) @@ -1,3 +1,8 @@ +Sun Jul 27 09:15:28 2008 Nobuyoshi Nakada <nobu@r...> + + * dln.h (dln_find_exe, dln_find_file): deprecated, use reentrant + versions instead. + Sun Jul 27 09:02:32 2008 Masatoshi SEKI <m_seki@m...> * lib/rinda/tuplespace.rb: merged from 1.8. Index: win32/win32.c =================================================================== --- win32/win32.c (revision 18229) +++ win32/win32.c (revision 18230) @@ -928,6 +928,7 @@ const char *shell; struct ChildRecord *child; char *p = NULL; + char fbuf[MAXPATHLEN]; if (!cmd && !prog) { errno = EFAULT; @@ -975,7 +976,7 @@ dwCreationFlags = (NORMAL_PRIORITY_CLASS); if (prog) { - if (!(p = dln_find_exe(prog, NULL))) { + if (!(p = dln_find_exe_r(prog, NULL, fbuf, sizeof(fbuf)))) { shell = prog; } } Index: dln.c =================================================================== --- dln.c (revision 18229) +++ dln.c (revision 18230) @@ -348,14 +348,14 @@ static int dln_init(const char *prog) { - char *file; + char *file, fbuf[MAXPATHLEN]; int fd; struct exec hdr; struct nlist *syms; if (dln_init_p == 1) return 0; - file = dln_find_exe(prog, NULL); + file = dln_find_exe_r(prog, NULL, fbuf, sizeof(fbuf)); if (file == NULL || (fd = open(file, O_RDONLY)) < 0) { dln_errno = errno; return -1; Property changes on: ext/win32ole/sample/ienavi2.rb ___________________________________________________________________ Name: svn:eol-style + LF Index: dln.h =================================================================== --- dln.h (revision 18229) +++ dln.h (revision 18230) @@ -28,8 +28,8 @@ # define _(args) () #endif -char *dln_find_exe(const char*,const char*); -char *dln_find_file(const char*,const char*); +DEPRECATED(char *dln_find_exe(const char*,const char*)); +DEPRECATED(char *dln_find_file(const char*,const char*)); char *dln_find_exe_r(const char*,const char*,char*,int); char *dln_find_file_r(const char*,const char*,char*,int); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/