summaryrefslogtreecommitdiffstats
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
commita2a7c12cb18f012edb3484c67b7e78259b177cd8 (patch)
treef4a50ff4afa4edf1385553696aaf231bd9cc7811
parent2f656f874a0ea0aa4e1042c69f4b0ef43db785db (diff)
downloadruby-a2a7c12cb18f012edb3484c67b7e78259b177cd8.tar.gz
ruby-a2a7c12cb18f012edb3484c67b7e78259b177cd8.tar.xz
ruby-a2a7c12cb18f012edb3484c67b7e78259b177cd8.zip
* file.c (rb_file_s_basename): DOSISH_UNC is defined on cygwin but
DOSISH is not. fixed: [ruby-dev:27797] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--file.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 8a1115803..e860cb339 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Nov 22 01:45:21 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * file.c (rb_file_s_basename): DOSISH_UNC is defined on cygwin but
+ DOSISH is not. fixed: [ruby-dev:27797]
+
Mon Nov 21 22:50:48 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_path_skip_prefix, rb_file_s_basename): UNC without path
diff --git a/file.c b/file.c
index c11481824..3c725e457 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 */
}