summaryrefslogtreecommitdiffstats
path: root/dir.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-02 07:57:17 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-02 07:57:17 +0000
commit4d6d2ae1b417133546c56b3150ef51fa7647e2dc (patch)
tree4198e3ccd0a5bab17db2a0f82ee7b6c643115c69 /dir.c
parent1668ec3e5ce555161454e9b2657c89dc27fa1364 (diff)
downloadruby-4d6d2ae1b417133546c56b3150ef51fa7647e2dc.tar.gz
ruby-4d6d2ae1b417133546c56b3150ef51fa7647e2dc.tar.xz
ruby-4d6d2ae1b417133546c56b3150ef51fa7647e2dc.zip
WinCE patch merged
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/dir.c b/dir.c
index 0aa41fb89..065dacda8 100644
--- a/dir.c
+++ b/dir.c
@@ -21,10 +21,10 @@
#include <unistd.h>
#endif
-#if defined HAVE_DIRENT_H && !defined NT
+#if defined HAVE_DIRENT_H && !defined NT && !defined _WIN32_WCE
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
-#elif defined HAVE_DIRECT_H && !defined NT
+#elif defined HAVE_DIRECT_H && !defined NT && !defined _WIN32_WCE
# include <direct.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
#else
@@ -39,7 +39,7 @@
# if HAVE_NDIR_H
# include <ndir.h>
# endif
-# if defined(NT)
+# if defined(NT) || defined(_WIN32_WCE)
# include "win32/dir.h"
# endif
#endif
@@ -79,6 +79,10 @@ char *strchr _((char*,char));
# define CharNext(p) ((p) + 1)
# endif
#endif
+#ifdef _WIN32_WCE
+#undef CharNext
+#define CharNext CharNextA
+#endif
#if defined DOSISH
#define isdirsep(c) ((c) == '/' || (c) == '\\')
static char *
@@ -534,7 +538,7 @@ dir_s_mkdir(argc, argv, obj)
SafeStringValue(path);
rb_secure(2);
-#if !defined(NT)
+#if !defined(NT) && !defined(_WIN32_WCE)
if (mkdir(RSTRING(path)->ptr, mode) == -1)
rb_sys_fail(RSTRING(path)->ptr);
#else