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:
putenv() function: change, add, or remove an environment variable.
Files:
lib/putenv.c
m4/putenv.m4
Depends-on:
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
gl_CONDITIONAL([GL_COND_OBJ_PUTENV], [test $REPLACE_PUTENV = 1])
AM_COND_IF([GL_COND_OBJ_PUTENV], [
gl_PREREQ_PUTENV
])
gl_STDLIB_MODULE_INDICATOR([putenv])
Makefile.am:
if GL_COND_OBJ_PUTENV
lib_SOURCES += putenv.c
endif
Include:
<stdlib.h>
License:
LGPL
Maintainer:
Jim Meyering, glibc