summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-17 16:57:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-17 16:57:53 +0000
commit10a21478845b788b01bb3b6913d55c3d565efd40 (patch)
treea83302dc6d5cecd84785edb957c6f237c23fcc23 /file.c
parent3f974165a75daf8bb0b6c992c764621265f60709 (diff)
* file.c (isdirsep): backslash is valid path separator on cygwin too.
backported from 1.8 HEAD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@16451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/file.c b/file.c
index 9153283689..f5e9a9b9ed 100644
--- a/file.c
+++ b/file.c
@@ -2298,12 +2298,17 @@ rb_file_s_umask(argc, argv)
return INT2FIX(omask);
}
-#if defined DOSISH
+#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, MB_CUR_MAX))
@@ -2324,12 +2329,6 @@ rb_file_s_umask(argc, argv)
#define istrailinggabage(x) 0
#endif
-#ifdef __CYGWIN__
-#undef DOSISH
-#define DOSISH_UNC
-#define DOSISH_DRIVE_LETTER
-#endif
-
#ifdef DOSISH_DRIVE_LETTER
static inline int
has_drive_letter(buf)