Keil Logo

getenv()

4.10 getenv()

This is the standard C library getenv() function from stdlib.h. It gets the value of a specified environment variable.

Syntax

char *getenv(const char *name);

Usage

The default implementation returns NULL, indicating that no environment information is available.
If you re-implement getenv(), ARM® recommends that you re-implement it in such a way that it searches some form of environment list for the input string, name. The set of environment names and the method for altering the environment list are implementation-defined. getenv() does not depend on any other function, and no other function depends on getenv().
A function closely associated with getenv() is _getenv_init(). _getenv_init() is called during startup if it is defined, to enable a user re-implementation of getenv() to initialize itself.

Returns

The return value is a pointer to a string associated with the matched list member. The array pointed to must not be modified by the program, but might be overwritten by a subsequent call to getenv().
Non-ConfidentialPDF file icon PDF versionARM DUI0378H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.