repo.or.cz
/
neatlibc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
stddef.h: add size_t definition
[neatlibc.git]
/
stdlib.c
blob
b926f388270edcec6cc046a831ad1b49c9e55700
1
#include <stdlib.h>
2
#include <string.h>
3
4
char
**
environ
;
5
6
int
exit
(
int
status
)
7
{
8
return
_exit
(
status
);
9
}
10
11
char
*
getenv
(
char
*
name
)
12
{
13
char
**
p
=
environ
;
14
int
len
=
strlen
(
name
);
15
for
(; *
p
;
p
++)
16
if
(!
memcmp
(
name
, *
p
,
len
) && (*
p
)[
len
] ==
'='
)
17
return
*
p
+
len
+
1
;
18
return
NULL
;
19
}