putenv() — change or add value to environment
int putenv(const char *string);
points to a string of the form
makes the value of the environment variable
by altering an existing variable or creating a new one.
In either case, the string pointed to by
becomes part of the environment,
so altering the string changes the environment.
The space used by
is no longer used once a new string-defining
is passed to
category determines the interpretation of characters in
as single- and/or multi-byte characters.
International Code Set Support
Single- and multi-byte character code sets are supported.
returns non-zero if it was unable to obtain enough space via
for an expanded environment, or if an invalid multibyte character
sequence was encountered in the string argument; otherwise it returns zero.
fails under the following conditions:
There is insufficient space to expand the environment.
An invalid multibyte character sequence was encountered in the string
manipulates the environment pointed to by
and can be used in conjunction with
(the third argument to
is not changed.
This routine uses
to enlarge the environment (see
is called, environmental variables are not in alphabetical order.
A potential error is to call
with an automatic variable as the argument,
then exit the calling function while
is still part of the environment.
putenv(): AES, SVID2, SVID3, XPG2, XPG3, XPG4