summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-07-30 06:34:27 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-07-30 06:34:27 +0000
commit7f2348488f5de0abcddd37f54fa95f5ffe70c9a2 (patch)
tree603a918af468a00c5421cdd63512d947eaac3b4f
parentfd98af4c65166b5e111fe3fb0a72922e20fd213b (diff)
* 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
-rw-r--r--ChangeLog7
-rw-r--r--ext/tcltklib/stubs.c6
-rw-r--r--win32/win32.c3
3 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 656c41c96b..4aa94f7dfc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/ext/tcltklib/stubs.c b/ext/tcltklib/stubs.c
index 69a5d6d3c0..0c9e9872d7 100644
--- a/ext/tcltklib/stubs.c
+++ b/ext/tcltklib/stubs.c
@@ -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);
diff --git a/win32/win32.c b/win32/win32.c
index 097aef0ce7..94e7c456ad 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -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;