diff options
author | Patrik Nyblom <[email protected]> | 2012-08-20 17:52:49 +0200 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2012-08-20 17:52:49 +0200 |
commit | a49b1a844febb2740c530895b32c0bb0ae7d5aa0 (patch) | |
tree | 6e005b76b80ef0c8f629f291986087f51cbd5aff /erts/emulator/beam/utils.c | |
parent | 4e8f6f2e2cdec0e94f5b4e1a1a878190e4d01704 (diff) | |
parent | 0c387e88d5a6dc97466ec33088aa9798eeb1d16d (diff) | |
download | otp-a49b1a844febb2740c530895b32c0bb0ae7d5aa0.tar.gz otp-a49b1a844febb2740c530895b32c0bb0ae7d5aa0.tar.bz2 otp-a49b1a844febb2740c530895b32c0bb0ae7d5aa0.zip |
Merge branch 'pan/unicode_home/OTP-10160' into maint
* pan/unicode_home/OTP-10160:
Teach release_handler_SUITE about file:native_name_encoding/0
Add documetation about Unicode in environment
Make get/putenv and erlexec understand Unicode
Diffstat (limited to 'erts/emulator/beam/utils.c')
-rw-r--r-- | erts/emulator/beam/utils.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c index a36d15204e..bd708ceee6 100644 --- a/erts/emulator/beam/utils.c +++ b/erts/emulator/beam/utils.c @@ -3409,7 +3409,7 @@ erts_read_env(char *key) char *value = erts_alloc(ERTS_ALC_T_TMP, value_len); int res; while (1) { - res = erts_sys_getenv(key, value, &value_len); + res = erts_sys_getenv_raw(key, value, &value_len); if (res <= 0) break; value = erts_realloc(ERTS_ALC_T_TMP, value, value_len); @@ -3428,28 +3428,6 @@ erts_free_read_env(void *value) erts_free(ERTS_ALC_T_TMP, value); } -int -erts_write_env(char *key, char *value) -{ - int ix, res; - size_t key_len = sys_strlen(key), value_len = sys_strlen(value); - char *key_value = erts_alloc_fnf(ERTS_ALC_T_TMP, - key_len + 1 + value_len + 1); - if (!key_value) { - errno = ENOMEM; - return -1; - } - sys_memcpy((void *) key_value, (void *) key, key_len); - ix = key_len; - key_value[ix++] = '='; - sys_memcpy((void *) key_value, (void *) value, value_len); - ix += value_len; - key_value[ix] = '\0'; - res = erts_sys_putenv(key_value, key_len); - erts_free(ERTS_ALC_T_TMP, key_value); - return res; -} - /* * To be used to silence unused result warnings, but do not abuse it. */ |