summaryrefslogtreecommitdiff
path: root/include/ruby/win32.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ruby/win32.h')
-rw-r--r--include/ruby/win32.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/include/ruby/win32.h b/include/ruby/win32.h
index be3a1cce96..69e92ed9ff 100644
--- a/include/ruby/win32.h
+++ b/include/ruby/win32.h
@@ -127,15 +127,14 @@ typedef unsigned int uintptr_t;
typedef int clockid_t;
-/* defined in win32/win32.c for old versions */
-#if !defined(__MINGW32__) || !defined(HAVE_CLOCK_GETTIME)
-# define HAVE_CLOCK_GETTIME 1
-# define NEED_CLOCK_GETTIME 1
-#endif
-#if !defined(__MINGW32__) || !defined(HAVE_CLOCK_GETRES)
-# define HAVE_CLOCK_GETRES 1
-# define NEED_CLOCK_GETRES 1
-#endif
+/*
+ * Since we use our versions in win32/win32.c, not to depend on yet
+ * another DLL, prefix our versions not to conflict with inline
+ * versions provided in time.h.
+ */
+#define clock_gettime rb_w32_clock_gettime
+#define clock_getres rb_w32_clock_getres
+
#ifndef CLOCK_REALTIME
# define CLOCK_REALTIME 0
#endif