Hash :
43433e89
Author :
Date :
2024-06-06T01:21:28
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.
Description:
unsetenv() function: remove an environment variable.
Files:
lib/unsetenv.c
m4/setenv.m4
Depends-on:
stdlib
unistd [test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1]
environ [test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1]
free-posix [test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1]
malloc-posix [test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1]
configure.ac:
gl_FUNC_UNSETENV
gl_CONDITIONAL([GL_COND_OBJ_UNSETENV],
[test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1])
AM_COND_IF([GL_COND_OBJ_UNSETENV], [
gl_PREREQ_UNSETENV
])
gl_STDLIB_MODULE_INDICATOR([unsetenv])
Makefile.am:
if GL_COND_OBJ_UNSETENV
lib_SOURCES += unsetenv.c
endif
Include:
<stdlib.h>
License:
LGPLv2+
Maintainer:
all