summaryrefslogtreecommitdiff
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
commit90c4dae08fea47797b3ae574e5dfe35dc66f5631 (patch)
tree4198e3ccd0a5bab17db2a0f82ee7b6c643115c69 /dir.c
parente193fd8d665567c7f3b827c21a1b77af43e2c391 (diff)
WinCE patch merged
git-svn-id: svn+ssh://ci.ruby-lang.org/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 0aa41fb..065dacd 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