30a2f3802b67d7767dd0d184882b69dcc805938f
[reactos.git] / lib / crtdll / stdio / getenv.c
1 #include <windows.h>
2 #include <msvcrt/stdlib.h>
3
4 void *malloc(size_t size);
5
6
7
8 char *getenv(const char *name) 
9 {
10         char *buffer;
11         buffer = (char *)malloc(MAX_PATH);
12         buffer[0] = 0;
13         if ( GetEnvironmentVariableA(name,buffer,MAX_PATH) == 0 )
14                 return NULL;
15         return buffer;
16 }