standard.C.io._putenv

_putenv is available since version 1.0.

Prototype:

number _putenv(envstring)

Parameters

envstring
Environment-string definition.

Description:

Create, modify, or remove environment variables. The _putenv function adds new environment variables or modifies the values of existing environment variables. Environment variables define the environment in which a process executes (for example, the default search path for libraries to be linked with a program). The envstring argument must be a string of the form varname=string, where varname is the name of the environment variable to be added or modified and string is the variable's value. If varname is already part of the environment, its value is replaced by string; otherwise, the new varname variable and its string value are added to the environment. You can remove a variable from the environment by specifying an empty string -- in other words, by specifying only varname=.

See also _getenv.

Return value:

Return 0 if successful, or –1 in the case of an error.