summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-07 14:28:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-07 14:28:36 +0000
commitf335958500af254ac9299d2a22d634fae0c621f5 (patch)
tree063b543c41caca7c84daeea3a8717d1372c2b44d /file.c
parentdd0b3efe48a007f9fae7cdb67be399354fcacdd1 (diff)
* file.c (path_check_0, fpath_check): disable path check on cygwin.
[ruby-talk:213074] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/file.c b/file.c
index a2726d1df1..e83b1bc935 100644
--- a/file.c
+++ b/file.c
@@ -4097,7 +4097,15 @@ is_absolute_path(path)
return 0;
}
-#ifndef DOSISH
+#ifndef ENABLE_PATH_CHECK
+# if defined DOSISH || defined __CYGWIN__
+# define ENABLE_PATH_CHECK 0
+# else
+# define ENABLE_PATH_CHECK 1
+# endif
+#endif
+
+#if ENABLE_PATH_CHECK
static int
path_check_0(fpath, execpath)
VALUE fpath;
@@ -4145,7 +4153,7 @@ static int
fpath_check(path)
char *path;
{
-#ifndef DOSISH
+#if ENABLE_PATH_CHECK
return path_check_0(rb_str_new2(path), Qfalse);
#else
return 1;
@@ -4156,7 +4164,7 @@ int
rb_path_check(path)
char *path;
{
-#ifndef DOSISH
+#if ENABLE_PATH_CHECK
char *p0, *p, *pend;
const char sep = PATH_SEP_CHAR;