From 9f4f9048a0b095c340e7640a999f209ca02723ca Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 16 Apr 2014 02:46:53 +0000 Subject: 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://ci.ruby-lang.org/ruby/trunk@45597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- win32/win32.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'win32/win32.c') diff --git a/win32/win32.c b/win32/win32.c index 4469297564..79519aab67 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 -- cgit v1.2.3