summaryrefslogtreecommitdiff
path: root/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/debug.c b/debug.c
index 4eaae0d..a5ae6a7 100644
--- a/debug.c
+++ b/debug.c
@@ -140,6 +140,9 @@ ruby_debug_breakpoint(void)
static void
set_debug_option(const char *str, int len, void *arg)
{
+#if defined _WIN32 && RUBY_MSVCRT_VERSION >= 80
+ extern int ruby_w32_rtc_error;
+#endif
#define SET_WHEN(name, var, val) do { \
if (len == sizeof(name) - 1 && \
strncmp(str, (name), len) == 0) { \
@@ -149,7 +152,7 @@ set_debug_option(const char *str, int len, void *arg)
} while (0)
SET_WHEN("gc_stress", *ruby_initial_gc_stress_ptr, Qtrue);
SET_WHEN("core", ruby_enable_coredump, 1);
-#if defined _WIN32 && defined _MSC_VER && _MSC_VER >= 1400
+#if defined _WIN32 && RUBY_MSVCRT_VERSION >= 80
SET_WHEN("rtc_error", ruby_w32_rtc_error, 1);
#endif
fprintf(stderr, "unexpected debug option: %.*s\n", len, str);