summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-30 01:59:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-30 01:59:12 +0000
commitb64f79c838c0fc771be6908fb54deadea1f4a763 (patch)
tree772a1fc4ecd2efa481580858d5884f7033759e59 /win32
parentdc0b06aa38ceb64d326b5e6e24a380040e730df2 (diff)
win32.c: rb_w32_udln_find_exe_r,
rb_w32_udln_find_file_r * win32/win32.c (rb_w32_udln_find_exe_r, rb_w32_udln_find_file_r): codepage independent versions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 39b89a3a9d..7653256fb2 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -21,7 +21,6 @@
#include "ruby/ruby.h"
#include "ruby/encoding.h"
-#include "dln.h"
#include <fcntl.h>
#include <process.h>
#include <sys/stat.h>
@@ -52,6 +51,22 @@
static int w32_stati64(const char *path, struct stati64 *st, UINT cp);
static char *w32_getenv(const char *name, UINT cp);
+#undef getenv
+#define DLN_FIND_EXTRA_ARG_DECL ,UINT cp
+#define DLN_FIND_EXTRA_ARG ,cp
+#define rb_w32_stati64(path, st) w32_stati64(path, st, cp)
+#define getenv(name) w32_getenv(name, cp)
+#define dln_find_exe_r rb_w32_udln_find_exe_r
+#define dln_find_file_r rb_w32_udln_find_file_r
+#include "dln.h"
+#include "dln_find.c"
+#undef MAXPATHLEN
+#undef rb_w32_stati64
+#undef dln_find_exe_r
+#undef dln_find_file_r
+#define dln_find_exe_r(fname, path, buf, size) rb_w32_udln_find_exe_r(fname, path, buf, size, cp)
+#define dln_find_file_r(fname, path, buf, size) rb_w32_udln_find_file_r(fname, path, buf, size, cp)
+
#undef stat
#undef fclose
#undef close