summaryrefslogtreecommitdiff
path: root/ext/fiddle
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fiddle')
-rw-r--r--ext/fiddle/extconf.rb1
-rw-r--r--ext/fiddle/fiddle.c2
-rw-r--r--ext/fiddle/fiddle.h2
-rw-r--r--ext/fiddle/function.c2
4 files changed, 3 insertions, 4 deletions
diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb
index 3dcd914ddf..03b0ac2765 100644
--- a/ext/fiddle/extconf.rb
+++ b/ext/fiddle/extconf.rb
@@ -18,7 +18,6 @@ unless have_library('ffi') || have_library('libffi')
end
have_header 'sys/mman.h'
-have_header 'windows.h'
create_makefile 'fiddle'
diff --git a/ext/fiddle/fiddle.c b/ext/fiddle/fiddle.c
index 78e21c57cf..2580ac0e53 100644
--- a/ext/fiddle/fiddle.c
+++ b/ext/fiddle/fiddle.c
@@ -18,7 +18,7 @@ void Init_fiddle()
rb_define_const(mFiddle, "TYPE_FLOAT", INT2NUM(TYPE_FLOAT));
rb_define_const(mFiddle, "TYPE_DOUBLE", INT2NUM(TYPE_DOUBLE));
-#if defined(HAVE_WINDOWS_H)
+#if defined(_WIN32)
rb_define_const(mFiddle, "WINDOWS", Qtrue);
#else
rb_define_const(mFiddle, "WINDOWS", Qfalse);
diff --git a/ext/fiddle/fiddle.h b/ext/fiddle/fiddle.h
index 4418fafb1e..7165969225 100644
--- a/ext/fiddle/fiddle.h
+++ b/ext/fiddle/fiddle.h
@@ -4,7 +4,7 @@
#include <ruby.h>
#include <errno.h>
-#if defined(HAVE_WINDOWS_H)
+#if defined(_WIN32)
#include <windows.h>
#endif
diff --git a/ext/fiddle/function.c b/ext/fiddle/function.c
index ff18595c13..911c9b80fc 100644
--- a/ext/fiddle/function.c
+++ b/ext/fiddle/function.c
@@ -125,7 +125,7 @@ function_call(int argc, VALUE argv[], VALUE self)
ffi_call(cif, NUM2PTR(rb_Integer(cfunc)), &retval, values);
rb_funcall(mFiddle, rb_intern("last_error="), 1, INT2NUM(errno));
-#if defined(HAVE_WINDOWS_H)
+#if defined(_WIN32)
rb_funcall(mFiddle, rb_intern("win32_last_error="), 1, INT2NUM(errno));
#endif