diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-17 16:57:53 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-17 16:57:53 +0000 |
commit | c54db30e883b27d856573639c5c4e62bddb4831e (patch) | |
tree | fed90e72ee50ba89ead34d7cb7001a02b03521d4 /file.c | |
parent | f47aeffd24a3bbe3768dfa959d5278666804bff3 (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.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -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) |