Hash :
cd90c9c8
Author :
Date :
2024-06-06T02:33:41
setenv: On native Windows, don't modify _environ directly. * m4/setenv.m4 (gl_PREREQ_SETENV): Check for _putenv. * lib/setenv.c: On native Windows, include <windows.h> and define SetEnvironmentVariable. (setenv) [HAVE_DECL__PUTENV]: New implementation for platforms with _putenv. * modules/setenv (Depends-on): Add malloc-posix.
Description:
setenv() function: set an environment variable.
Files:
lib/setenv.c
m4/setenv.m4
Depends-on:
stdlib
malloca [test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1]
alloca-opt [test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1]
malloc-posix [test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1]
unistd [test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1]
environ [test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1]
configure.ac:
gl_FUNC_SETENV
gl_CONDITIONAL([GL_COND_OBJ_SETENV],
[test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1])
gl_STDLIB_MODULE_INDICATOR([setenv])
Makefile.am:
if GL_COND_OBJ_SETENV
lib_SOURCES += setenv.c
endif
Include:
<stdlib.h>
License:
LGPLv2+
Maintainer:
all