Go to the source code of this file.
◆ pgwin32_putenv()
int pgwin32_putenv |
( |
const char * |
envval | ) |
|
Definition at line 20 of file win32env.c.
References free, and i.
Referenced by pgwin32_unsetenv().
24 typedef int (_cdecl * PUTENVPROC) (
const char *);
25 static const char *
const modulenames[] = {
56 envcpy = strdup(envval);
59 cp = strchr(envcpy,
'=');
74 if (!SetEnvironmentVariable(envcpy, cp))
89 for (i = 0; modulenames[
i]; i++)
91 HMODULE hmodule = NULL;
92 BOOL res = GetModuleHandleEx(0, modulenames[i], &hmodule);
94 if (res != 0 && hmodule != NULL)
96 PUTENVPROC putenvFunc;
98 putenvFunc = (PUTENVPROC) GetProcAddress(hmodule,
"_putenv");
101 FreeLibrary(hmodule);
110 return _putenv(envval);
◆ pgwin32_unsetenv()
void pgwin32_unsetenv |
( |
const char * |
name | ) |
|