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
2012-12-08 Eli Zaretskii <eliz@gnu.org>
* inc/ms-w32.h (putenv): Redirect to sys_putenv.
+ (sys_putenv): Add prototype.
* config.nt (HAVE_UNSETENV): Define to 1.
# undef putenv
#endif
#define putenv sys_putenv
+extern int sys_putenv (char *);
extern int getloadavg (double *, int);
extern int getpagesize (void);
+2012-12-08 Eli Zaretskii <eliz@gnu.org>
+
+ * w32.c (unsetenv): Return 0 if the input string is too long.
+
2012-12-08 Paul Eggert <eggert@cs.ucla.edu>
Use putenv+unsetenv instead of modifying environ directly (Bug#13070).
if (name_len > 32767)
{
errno = ENOMEM;
- return -1;
+ return 0;
}
/* It is safe to use 'alloca' with 32K size, since the stack is at
least 2MB, and we set it to 8MB in the link command line. */