summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-21 16:47:13 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-21 16:47:13 +0000
commitf8dd75cbcc43bb68b1334108105e31cfbc4b09d0 (patch)
treef4a50ff4afa4edf1385553696aaf231bd9cc7811 /file.c
parent1f26578da0fa056a58030abd231732d19e59492e (diff)
* file.c (rb_file_s_basename): DOSISH_UNC is defined on cygwin but
DOSISH is not. fixed: [ruby-dev:27797] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/file.c b/file.c
index c114818..3c725e4 100644
--- a/file.c
+++ b/file.c
@@ -2634,7 +2634,7 @@ rb_file_s_basename(argc, argv)
{
VALUE fname, fext, basename;
char *name, *p;
-#ifdef DOSISH
+#if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
char *root;
#endif
int f;
@@ -2646,7 +2646,7 @@ rb_file_s_basename(argc, argv)
if (RSTRING(fname)->len == 0 || !*(name = RSTRING(fname)->ptr))
return fname;
name = skipprefix(name);
-#ifdef DOSISH
+#if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
root = name;
#endif
while (isdirsep(*name))
@@ -2654,7 +2654,7 @@ rb_file_s_basename(argc, argv)
if (!*name) {
p = name - 1;
f = 1;
-#ifdef DOSISH
+#if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
if (name != root) {
/* has slashes */
}