diff --git a/ChangeLog b/ChangeLog index 687b51fdbe..064733dc2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Nov 22 01:45:21 2005 Nobuyoshi Nakada + + * 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 * file.c (rb_path_skip_prefix, rb_file_s_basename): UNC without path diff --git a/file.c b/file.c index 37c83f208a..57069cf3bb 100644 --- a/file.c +++ b/file.c @@ -2573,7 +2573,7 @@ rb_file_s_basename(int argc, VALUE *argv) { VALUE fname, fext, basename; char *name, *p; -#ifdef DOSISH +#if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC char *root; #endif int f; @@ -2585,7 +2585,7 @@ rb_file_s_basename(int argc, VALUE *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)) @@ -2593,7 +2593,7 @@ rb_file_s_basename(int argc, VALUE *argv) if (!*name) { p = name - 1; f = 1; -#ifdef DOSISH +#if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC if (name != root) { /* has slashes */ }