Skip to content

Commit 45867ae

Browse files
Charlie Savagedenofevil
authored andcommitted
Fix for compiling on windows - the check should be _WIN32 not __WIN32__. Also, you have to ifdef the rest of the filename_cmp method because realpath does not exist on windows.
1 parent f5862e5 commit 45867ae

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/ruby_debug/ruby_debug.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,9 @@ filename_cmp_impl(VALUE source, char *file);
521521

522522
int
523523
filename_cmp(VALUE source, char *file) {
524-
#ifdef __WIN32__
524+
#ifdef _WIN32
525525
return filename_cmp_impl(source, file);
526-
#endif
526+
#else
527527

528528
if (!RTEST(resolve_symlinks)) {
529529
return filename_cmp_impl(source, file);
@@ -547,6 +547,7 @@ filename_cmp(VALUE source, char *file) {
547547
return result;
548548
}
549549
#endif
550+
#endif
550551
}
551552

552553
int

0 commit comments

Comments
 (0)