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
commitc54db30e883b27d856573639c5c4e62bddb4831e (patch)
treefed90e72ee50ba89ead34d7cb7001a02b03521d4 /file.c
parentf47aeffd24a3bbe3768dfa959d5278666804bff3 (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_6@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 2938b89f40d..cd87d8de7a4 100644
--- a/file.c
+++ b/file.c
@@ -2304,12 +2304,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))
@@ -2330,12 +2335,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)