aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/sdbm/_sdbm.c2
-rw-r--r--ext/tcltklib/extconf.rb1
-rw-r--r--ext/tcltklib/stubs.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/ext/sdbm/_sdbm.c b/ext/sdbm/_sdbm.c
index 92c96f26d0..d8bfae80b2 100644
--- a/ext/sdbm/_sdbm.c
+++ b/ext/sdbm/_sdbm.c
@@ -103,7 +103,7 @@ static int duppair proto((char *, datum));
/*
* externals
*/
-#if !defined(sun) && !defined(MSDOS) && !defined(_WIN32)
+#if !defined sun && !defined MSDOS && !defined _WIN32 && !defined __CYGWIN__
extern int errno;
#endif
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