update for HEAD-2003021201
[reactos.git] / lib / crtdll / stdlib / putenv.c
1 #include <windows.h>
2 #include <msvcrt/stdlib.h>
3 #include <msvcrt/string.h>
4
5
6
7 int putenv(const char *val)
8 {
9   
10   char buffer[1024];
11   char *epos; 
12   
13   strcpy(buffer,val);
14
15
16   epos = strchr(buffer, '=');
17   if ( epos == NULL )
18         return -1;
19
20   *epos = 0;
21
22   return SetEnvironmentVariableA(buffer,epos+1);
23 }