aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
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 46481980d6..d5f005aa76 100644
--- a/file.c
+++ b/file.c
@@ -4044,7 +4044,15 @@ is_absolute_path(const char *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(VALUE path, int execpath)
{
@@ -4089,7 +4097,7 @@ path_check_0(VALUE path, int execpath)
static int
fpath_check(const char *path)
{
-#ifndef DOSISH
+#if ENABLE_PATH_CHECK
return path_check_0(rb_str_new2(path), Qfalse);
#else
return 1;
@@ -4099,7 +4107,7 @@ fpath_check(const char *path)
int
rb_path_check(const char *path)
{
-#ifndef DOSISH
+#if ENABLE_PATH_CHECK
const char *p0, *p, *pend;
const char sep = PATH_SEP_CHAR;