aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-11 04:45:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-11 04:45:08 +0000
commit2ee4cdab98562d67083049efc0f0ed2c39d7d27d (patch)
tree97d1ce39d098a7728ac2a4fa31b6734c986dae77 /file.c
parentedc6bc6dc63e08963dfc27f05bb8688c3082d656 (diff)
downloadruby-2ee4cdab98562d67083049efc0f0ed2c39d7d27d.tar.gz
file.c: ALT_SEPARATOR on cygwin
* file.c (file_alt_separator): define only on DOSISH platforms. File::ALT_SEPARATOR is nil on cygwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/file.c b/file.c
index 7fad74508a..f8b424f2fc 100644
--- a/file.c
+++ b/file.c
@@ -2991,7 +2991,9 @@ rb_file_s_umask(int argc, VALUE *argv)
#endif
#ifdef FILE_ALT_SEPARATOR
#define isdirsep(x) ((x) == '/' || (x) == FILE_ALT_SEPARATOR)
+# ifdef DOSISH
static const char file_alt_separator[] = {FILE_ALT_SEPARATOR, '\0'};
+# endif
#else
#define isdirsep(x) ((x) == '/')
#endif