1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/tcltklib/stubs.c (ruby_tcltk_stubs): win32_getenv returns

the same address always, so allocate string by ruby_strdup.

* win32/win32.c: prototype; rb_w32_open_osfhandle().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2002-07-30 06:34:27 +00:00
parent fd98af4c65
commit 7f2348488f
3 changed files with 16 additions and 0 deletions

View file

@ -1,3 +1,10 @@
Tue Jul 30 15:24:07 2002 WATANABE Hirofumi <eban@ruby-lang.org>
* ext/tcltklib/stubs.c (ruby_tcltk_stubs): win32_getenv returns
the same address always, so allocate string by ruby_strdup.
* win32/win32.c: prototype; rb_w32_open_osfhandle().
Tue Jul 30 09:11:07 2002 Minero Aoki <aamine@loveruby.net>
* eval.c (rb_thread_join_m): add parameter type declaration.

View file

@ -40,10 +40,16 @@ ruby_tcltk_stubs()
char tk_name[20];
ruby_tcl_dll = getenv("RUBY_TCL_DLL");
#if defined NT
if (ruby_tcl_dll) ruby_tcl_dll = ruby_strdup(ruby_tcl_dll);
#endif
ruby_tk_dll = getenv("RUBY_TK_DLL");
if (ruby_tcl_dll && ruby_tk_dll) {
tcl_dll = (DL_HANDLE)DL_OPEN(ruby_tcl_dll);
tk_dll = (DL_HANDLE)DL_OPEN(ruby_tk_dll);
#if defined NT
ruby_xfree(ruby_tcl_dll);
#endif
} else {
snprintf(tcl_name, sizeof tcl_name, TCL_NAME, DLEXT);
snprintf(tk_name, sizeof tk_name, TK_NAME, DLEXT);

View file

@ -82,6 +82,9 @@ static int valid_filename(char *s);
static void StartSockets ();
static char *str_grow(struct RString *str, size_t new_size);
static DWORD wait_events(HANDLE event, DWORD timeout);
#ifndef __BORLANDC__
static int rb_w32_open_osfhandle(long osfhandle, int flags);
#endif
char *NTLoginName;