Skip to content

Commit

Permalink
backslash is valid path separator on cygwin too
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Dec 29, 2011
1 parent bc9d056 commit 6a6f053
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions file.c
Expand Up @@ -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

Expand Down

0 comments on commit 6a6f053

Please sign in to comment.