summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-17 14:50:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-17 14:50:38 +0000
commit5ff16ad011a5ad01488df39c8286b8c467ea6e76 (patch)
treeee9ba92ed7ad97b817d1ff11227b663e301eac8c /file.c
parenta49cab4938aacf715e0bf07f1c4aa466ed06ff91 (diff)
* file.c (OpenFile): prevent conflict on Windows.
* file.c (USE_NTFS): fixed merge miss. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@16449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/file.c b/file.c
index 679a228c3e..103fca2b17 100644
--- a/file.c
+++ b/file.c
@@ -20,11 +20,13 @@
#include <sys/cygwin.h>
#endif
+#define OpenFile rb_io_t
#include "ruby.h"
#include "rubyio.h"
#include "rubysig.h"
#include "util.h"
#include "dln.h"
+#include <ctype.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -2308,6 +2310,8 @@ rb_file_s_umask(argc, argv)
# else
# define CharNext(p) ((p) + 1)
# endif
+#endif
+
#if defined _WIN32 || defined __CYGWIN__
#define USE_NTFS 1
#else
@@ -2320,8 +2324,6 @@ rb_file_s_umask(argc, argv)
#define istrailinggabage(x) 0
#endif
-#endif
-
#ifdef __CYGWIN__
#undef DOSISH
#define DOSISH_UNC
@@ -2921,7 +2923,7 @@ rb_file_s_basename(argc, argv)
if (NIL_P(fext) || !(f = rmext(p, n, StringValueCStr(fext)))) {
f = n;
}
- if (f == RSTRING_LEN(fname)) return fname;
+ if (f == RSTRING(fname)->len) return fname;
}
basename = rb_str_new(p, f);
OBJ_INFECT(basename, fname);