Skip to content
Browse files

backslash is valid path separator on cygwin too

  • Loading branch information...
1 parent bc9d056 commit 6a6f053ed218854f9b5ce9e268ce99a1642fcaef @Watson1978 Watson1978 committed Dec 29, 2011
Showing with 17 additions and 0 deletions.
  1. +17 −0 file.c
View
17 file.c
@@ -2272,7 +2272,24 @@ rb_file_s_umask(VALUE rcv, SEL sel, int argc, VALUE *argv)
return INT2FIX(omask);
}
+#ifdef __CYGWIN__
+#undef DOSISH
+#endif
+#if defined __CYGWIN__ || defined DOSISH
+#define DOSISH_UNC
+#define DOSISH_DRIVE_LETTER
+#define isdirsep(x) ((x) == '/' || (x) == '\\')
+#else
#define isdirsep(x) ((x) == '/')
+#endif
+
+#ifndef CharNext /* defined as CharNext[AW] on Windows. */
+# if defined(DJGPP)
+# define CharNext(p) ((p) + mblen(p, RUBY_MBCHAR_MAXSIZE))
+# else
+# define CharNext(p) ((p) + 1)
+# endif
+#endif
#define istrailinggabage(x) 0

0 comments on commit 6a6f053

Please sign in to comment.
Something went wrong with that request. Please try again.