1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* file.c (DOSISH): better Cygwin support.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2003-07-23 14:09:52 +00:00
parent e96641be8e
commit 528b6c3f64
2 changed files with 8 additions and 4 deletions

View file

@ -1,3 +1,7 @@
Wed Jul 23 23:06:59 2003 WATANABE Hirofumi <eban@ruby-lang.org>
* file.c (DOSISH): better Cygwin support.
Wed Jul 23 18:43:00 2003 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp> Wed Jul 23 18:43:00 2003 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
* lib/erb.rb: import erb-2.0.4b1. * lib/erb.rb: import erb-2.0.4b1.

8
file.c
View file

@ -1549,7 +1549,7 @@ file_expand_path(fname, dname, result)
} }
BUFCHECK(strlen(dir) > buflen); BUFCHECK(strlen(dir) > buflen);
strcpy(buf, dir); strcpy(buf, dir);
#ifdef DOSISH #if defined DOSISH || defined __CYGWIN__
for (p = buf; *p; p = CharNext(p)) { for (p = buf; *p; p = CharNext(p)) {
if (*p == '\\') { if (*p == '\\') {
*p = '/'; *p = '/';
@ -1629,7 +1629,7 @@ file_expand_path(fname, dname, result)
strcpy(buf, dir); strcpy(buf, dir);
free(dir); free(dir);
} }
#ifdef DOSISH #if defined DOSISH || defined __CYGWIN__
if (isdirsep(*s)) { if (isdirsep(*s)) {
/* specified full path, but not drive letter nor UNC */ /* specified full path, but not drive letter nor UNC */
/* we need to get the drive letter or UNC share name */ /* we need to get the drive letter or UNC share name */
@ -1677,7 +1677,7 @@ file_expand_path(fname, dname, result)
} }
break; break;
case '/': case '/':
#if defined DOSISH #if defined DOSISH || defined __CYGWIN__
case '\\': case '\\':
#endif #endif
b = ++s; b = ++s;
@ -1689,7 +1689,7 @@ file_expand_path(fname, dname, result)
} }
break; break;
case '/': case '/':
#if defined DOSISH #if defined DOSISH || defined __CYGWIN__
case '\\': case '\\':
#endif #endif
if (s > b) { if (s > b) {