diff options
| author | Eli Zaretskii | 2012-12-08 20:27:37 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-12-08 20:27:37 +0200 |
| commit | a16e75cd3cb27ea5647774bc71625899f35b2fa6 (patch) | |
| tree | 65306facbe512d0ebe30939c82e774db11bd0cb0 /src/w32.c | |
| parent | 5745a7df2b4abe06d032820f6ec7ddbac9ad5028 (diff) | |
| download | emacs-a16e75cd3cb27ea5647774bc71625899f35b2fa6.tar.gz emacs-a16e75cd3cb27ea5647774bc71625899f35b2fa6.zip | |
Fix putenv and unsetenv on MS-Windows.
src/w32.c (unsetenv): Return 0 if the input string is too long.
nt/inc/ms-w32.h (sys_putenv): Add prototype.
Fixes: debbugs:13070
Diffstat (limited to 'src/w32.c')
| -rw-r--r-- | src/w32.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -1562,7 +1562,7 @@ unsetenv (const char *name) | |||
| 1562 | if (name_len > 32767) | 1562 | if (name_len > 32767) |
| 1563 | { | 1563 | { |
| 1564 | errno = ENOMEM; | 1564 | errno = ENOMEM; |
| 1565 | return -1; | 1565 | return 0; |
| 1566 | } | 1566 | } |
| 1567 | /* It is safe to use 'alloca' with 32K size, since the stack is at | 1567 | /* It is safe to use 'alloca' with 32K size, since the stack is at |
| 1568 | least 2MB, and we set it to 8MB in the link command line. */ | 1568 | least 2MB, and we set it to 8MB in the link command line. */ |