summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-11-28 18:39:57 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-20 01:57:51 +0900
commitd44671c819e104d329e604fdf9bb59bbb426afb5 (patch)
treeab72c788f31a69c9251984091148a2f174e1484f /win32
parent50f1e7eb23382ca1f62668d9067cce2fc09ee866 (diff)
Revived the getenv macro for dln_find.c
This partially reverts commit "Windows: Improve readablity of getenv() encoding" 14453a256d58b11b06d432e2a4388d95aac298d6. The `getenv` macro defined here is to also substitute the function in dln_find.c, not only in this file.
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c
index ac83195..5904082 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -77,6 +77,7 @@ static char *w32_getenv(const char *name, UINT cp);
#define DLN_FIND_EXTRA_ARG_DECL ,UINT cp
#define DLN_FIND_EXTRA_ARG ,cp
#define rb_w32_stati128(path, st) w32_stati128(path, st, cp, FALSE)
+#define getenv(name) w32_getenv(name, cp) /* Necessarily For dln.c */
#undef CharNext
#define CharNext(p) CharNextExA(cp, (p), 0)
#define dln_find_exe_r rb_w32_udln_find_exe_r