diff options
author | John Högberg <[email protected]> | 2018-06-26 07:17:17 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2018-06-26 07:17:17 +0200 |
commit | a4381a973e2efcd7c1fd1e0f2e9e6619b9b59c67 (patch) | |
tree | 6e6b789d1a6e9e8781265d88f5537af84e3586af /erts/emulator/sys/common/erl_osenv.c | |
parent | 42901d90e4bdd44949a13488d228b77f0eda5aa9 (diff) | |
parent | a09907d56e29b24ded9a34de82bceac7f39021d1 (diff) | |
download | otp-a4381a973e2efcd7c1fd1e0f2e9e6619b9b59c67.tar.gz otp-a4381a973e2efcd7c1fd1e0f2e9e6619b9b59c67.tar.bz2 otp-a4381a973e2efcd7c1fd1e0f2e9e6619b9b59c67.zip |
Merge branch 'maint-21' into maint
* maint-21:
Updated OTP version
Prepare release
Fix unsafe optimization when running beam_block the second time
Fix environment case sensitivity issues on Windows
Diffstat (limited to 'erts/emulator/sys/common/erl_osenv.c')
-rw-r--r-- | erts/emulator/sys/common/erl_osenv.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/erts/emulator/sys/common/erl_osenv.c b/erts/emulator/sys/common/erl_osenv.c index 9f54d1dff0..487ff87116 100644 --- a/erts/emulator/sys/common/erl_osenv.c +++ b/erts/emulator/sys/common/erl_osenv.c @@ -75,7 +75,15 @@ static int compare_env_keys(const erts_osenv_data_t a, const erts_osenv_data_t b #include "erl_rbtree.h" static int compare_env_keys(const erts_osenv_data_t a, const erts_osenv_data_t b) { - int relation = sys_memcmp(a.data, b.data, MIN(a.length, b.length)); + int relation; + +#ifdef __WIN32__ + /* Environment variables are case-insensitive on Windows. */ + relation = _wcsnicmp((const WCHAR*)a.data, (const WCHAR*)b.data, + MIN(a.length, b.length) / sizeof(WCHAR)); +#else + relation = sys_memcmp(a.data, b.data, MIN(a.length, b.length)); +#endif if(relation != 0) { return relation; |