summaryrefslogtreecommitdiff
path: root/src/stdlib/getenv_s.c
blob: 489bdeea3626990a1a935f79d3cc3a1dc9e60b72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include "_stdlib.h"

/** get an environment variable **/
errno_t getenv_s(size_t * restrict len, char * restrict value, rsize_t maxsize, const char * restrict name)
{
	SIGNAL_SAFE(0);
	ASSERT_NOOVERLAP(len, sizeof(*len), value, maxsize);
	ASSERT_NOOVERLAP(len, sizeof(*len), name, strlen(name));
	ASSERT_NOOVERLAP(value, maxsize, name, strlen(name));

	(void)len; (void)value; (void)maxsize; (void)name;
	return 0;
}

/***
The fn(getenv) function read the environment variable arg(name) from the host
environment.
***/

/* UNSPECIFIED: - */
/* UNDEFINED: modifying the returned string */
/* IMPLEMENTATION: the set of environment variable names */
/* IMPLEMENTATION: the method of altering the environment */
/* LOCALE: - */

/* RETURN(NULL): the environment variable could not be found */
/* RETURN: the value of the requested environment variable */

/*
CEXT1(201112)
*/