summaryrefslogtreecommitdiff
path: root/ext/tcltklib
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tcltklib')
-rw-r--r--ext/tcltklib/extconf.rb1
-rw-r--r--ext/tcltklib/stubs.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/ext/tcltklib/extconf.rb b/ext/tcltklib/extconf.rb
index c9082e0a7f..f732c165dc 100644
--- a/ext/tcltklib/extconf.rb
+++ b/ext/tcltklib/extconf.rb
@@ -67,5 +67,6 @@ if have_header("tcl.h") && have_header("tk.h") &&
find_tcl(tcllib, stubs) &&
find_tk(tklib, stubs)
$CPPFLAGS += ' -DUSE_TCL_STUBS -DUSE_TK_STUBS' if stubs
+ $CPPFLAGS += ' -D_WIN32' if /cygwin/ =~ RUBY_PLATFORM
create_makefile("tcltklib")
end
diff --git a/ext/tcltklib/stubs.c b/ext/tcltklib/stubs.c
index 537ca74d37..faf5b4bb4b 100644
--- a/ext/tcltklib/stubs.c
+++ b/ext/tcltklib/stubs.c
@@ -3,7 +3,7 @@
#include <tk.h>
#include "ruby.h"
-#if defined _WIN32
+#if defined _WIN32 || defined __CYGWIN__
# include <windows.h>
typedef HINSTANCE DL_HANDLE;
# define DL_OPEN LoadLibrary