environ

global array to hold environment variables 

Global Variable


SYNOPSIS

#include <unistd.h>

extern char **environ;


DESCRIPTION

Inclusion of the <unistd.h> header file provides for definitions of environ as shown in the SYNOPSIS section. The environ variable is an array of character strings containing environment variables and their values in the form name=value (environment variable names cannot contain the character '=').

Programs should obtain the definition of environ by the inclusion of <unistd.h>. The practice of defining environ in a program as

extern char **environ;

(without including <unistd.h>) is unsupported.


CONFORMANCE

UNIX 98 with exceptions.


PORTING ISSUES

UNIX 98 allows environ to be declared without including <unistd.h>. This is not supported by the NuTCRACKER Platform.

In Windows, environment variable names are case-insensitive. In addition, the environment maintained by Win32 and the environment maintained by the NuTCRACKER Platform are physically separate because their formats are quite different. Because of this it is strongly recommended that environ not be used for direct access to environment variables. Rather the getenv() function should be used to read environment variables the putenv() or setenv() function should be used to set environment variables and the unsetenv() function should be used to remove a variable from the environment. Doing this ensures that the environment remains consistent.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
_NutWIN32getenv(), _NutWIN32putenv(), execl(), execle(), execlp(), execlpe(), execv(), execve(), execvp(), execvpe(), getenv(), putenv(), setenv(), unsetenv()


PTC MKS Toolkit 10.1 patch 1 Documentation Build 2.