diff options
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-16 02:46:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-16 02:46:53 +0000
commit9f4f9048a0b095c340e7640a999f209ca02723ca (patch)
parent633def3c636ac61802a68fbfd018e7d9130d8d6e (diff)
win32.c: CharNextExA with cp
* win32/win32.c (dln_find_1): use CharNextExA() instead of CharNext() to respect the given code page. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 files changed, 3 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 4469297..79519aa 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -64,6 +64,8 @@ static char *w32_getenv(const char *name, 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)
+#undef CharNext
+#define CharNext(p) CharNextExA(cp, (p), 0)
#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"
@@ -74,6 +76,7 @@ static char *w32_getenv(const char *name, UINT cp);
#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 CharNext /* no default cp version */
#undef stat
#undef fclose