Commit a88f03e2 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

msvcrt: Rename _environ to avoid a conflict on Solaris.

parent fb5d0bfe
......@@ -50,7 +50,7 @@ char **MSVCRT___argv;
MSVCRT_wchar_t **MSVCRT___wargv;
char *MSVCRT__acmdln;
MSVCRT_wchar_t *MSVCRT__wcmdln;
char **_environ = 0;
char **MSVCRT__environ = 0;
MSVCRT_wchar_t **_wenviron = 0;
char **MSVCRT___initenv = 0;
MSVCRT_wchar_t **MSVCRT___winitenv = 0;
......@@ -203,9 +203,9 @@ MSVCRT_wchar_t*** CDECL __p___wargv(void) { return &MSVCRT___wargv; }
*/
char*** CDECL __p__environ(void)
{
if (!_environ)
_environ = msvcrt_SnapshotOfEnvironmentA(NULL);
return &_environ;
if (!MSVCRT__environ)
MSVCRT__environ = msvcrt_SnapshotOfEnvironmentA(NULL);
return &MSVCRT__environ;
}
/*********************************************************************
......@@ -302,7 +302,7 @@ void msvcrt_free_args(void)
/* FIXME: more things to free */
HeapFree(GetProcessHeap(), 0, MSVCRT___initenv);
HeapFree(GetProcessHeap(), 0, MSVCRT___winitenv);
HeapFree(GetProcessHeap(), 0, _environ);
HeapFree(GetProcessHeap(), 0, MSVCRT__environ);
HeapFree(GetProcessHeap(), 0, _wenviron);
HeapFree(GetProcessHeap(), 0, MSVCRT__pgmptr);
HeapFree(GetProcessHeap(), 0, MSVCRT__wpgmptr);
......
......@@ -105,8 +105,8 @@ int CDECL _putenv(const char *str)
if ((ret == -1) && (GetLastError() == ERROR_ENVVAR_NOT_FOUND)) ret = 0;
/* Update the __p__environ array only when already initialized */
if (_environ)
_environ = msvcrt_SnapshotOfEnvironmentA(_environ);
if (MSVCRT__environ)
MSVCRT__environ = msvcrt_SnapshotOfEnvironmentA(MSVCRT__environ);
if (_wenviron)
_wenviron = msvcrt_SnapshotOfEnvironmentW(_wenviron);
......@@ -151,8 +151,8 @@ int CDECL _wputenv(const MSVCRT_wchar_t *str)
if ((ret == -1) && (GetLastError() == ERROR_ENVVAR_NOT_FOUND)) ret = 0;
/* Update the __p__environ array only when already initialized */
if (_environ)
_environ = msvcrt_SnapshotOfEnvironmentA(_environ);
if (MSVCRT__environ)
MSVCRT__environ = msvcrt_SnapshotOfEnvironmentA(MSVCRT__environ);
if (_wenviron)
_wenviron = msvcrt_SnapshotOfEnvironmentW(_wenviron);
......
......@@ -119,7 +119,7 @@ void msvcrt_set_errno(int);
void _purecall(void);
void _amsg_exit(int errnum);
extern char **_environ;
extern char **MSVCRT__environ;
extern MSVCRT_wchar_t **_wenviron;
extern char ** msvcrt_SnapshotOfEnvironmentA(char **);
......
......@@ -208,7 +208,7 @@
@ cdecl _ecvt(double long ptr ptr)
@ cdecl _endthread ()
@ cdecl _endthreadex(long)
@ extern _environ
@ extern _environ MSVCRT__environ
@ cdecl _eof(long)
@ cdecl _errno() MSVCRT__errno
@ cdecl _except_handler2(ptr ptr ptr ptr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment