diff options
author | Jan Kotas <jkotas@microsoft.com> | 2016-01-25 05:34:46 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-01-26 01:16:52 +0300 |
commit | 7f8093b8492d0031d2de3189c310a0e6819afd32 (patch) | |
tree | c65aaf2357444a02f5de6303b49315f8b30b40d0 /src/Native/Runtime/PalRedhawkFunctions.h | |
parent | e0992ff708ee9450c5f1d56e6d534aeb646b7e9c (diff) |
Add abstraction for string encoding of the underlying OS to GCToOSInterface
It is modeled after TCHAR used for similar purpose in Windows SDK. It allows us to eliminate need for Unicode conversions in the Unix runtime.
Diffstat (limited to 'src/Native/Runtime/PalRedhawkFunctions.h')
-rw-r--r-- | src/Native/Runtime/PalRedhawkFunctions.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Native/Runtime/PalRedhawkFunctions.h b/src/Native/Runtime/PalRedhawkFunctions.h index f66e7231b..5ec7b8094 100644 --- a/src/Native/Runtime/PalRedhawkFunctions.h +++ b/src/Native/Runtime/PalRedhawkFunctions.h @@ -111,11 +111,19 @@ inline UInt32 PalGetCurrentThreadId() return GetCurrentThreadId(); } +#ifdef UNICODE extern "C" UInt32 __stdcall GetEnvironmentVariableW(LPCWSTR, LPWSTR, UInt32); -inline UInt32 PalGetEnvironmentVariableW(LPCWSTR arg1, LPWSTR arg2, UInt32 arg3) +inline UInt32 PalGetEnvironmentVariable(LPCWSTR arg1, LPWSTR arg2, UInt32 arg3) { return GetEnvironmentVariableW(arg1, arg2, arg3); } +#else +extern "C" UInt32 __stdcall GetEnvironmentVariableA(LPCSTR, LPSTR, UInt32); +inline UInt32 PalGetEnvironmentVariable(LPCSTR arg1, LPSTR arg2, UInt32 arg3) +{ + return GetEnvironmentVariableA(arg1, arg2, arg3); +} +#endif extern "C" UInt32 __stdcall GetLastError(); inline UInt32 PalGetLastError() |