1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-08 17:22:05 +03:00

unsetenv: On native Windows, don't modify _environ directly.

* m4/setenv.m4 (gl_PREREQ_UNSETENV): Check for _putenv.
* lib/unsetenv.c (unsetenv): Add native Windows handling, from
lib/putenv.c.
* modules/unsetenv (Depends-on): Add free-posix, malloc-posix.
* m4/putenv.m4 (gl_FUNC_PUTENV): Use AC_CHECK_DECLS_ONCE.
* lib/putenv.c (_unsetenv): Moved to lib/unsetenv.c.
(putenv): Invoke unsetenv instead of _unsetenv.
* modules/putenv-gnu (Depends-on): Add unsetenv.
This commit is contained in:
Bruno Haible
2024-06-06 01:21:28 +02:00
parent adb76c7542
commit 43433e89de
7 changed files with 50 additions and 71 deletions

View File

@@ -10,6 +10,7 @@ stdlib
environ [test $REPLACE_PUTENV = 1]
free-posix [test $REPLACE_PUTENV = 1]
malloc-posix [test $REPLACE_PUTENV = 1]
unsetenv [test $REPLACE_PUTENV = 1]
configure.ac:
gl_FUNC_PUTENV