34 "C:/Program Files/GLBasic/Compiler/platform/Win32/Bin/../lib/gcc/mingw32/3.4.2/;"
35 "C:/Program Files/GLBasic/Compiler/platform/Win32/Bin/../lib/gcc/;"
36 "/mingw/lib/gcc/mingw32/3.4.2/;"
37 "/usr/lib/gcc/mingw32/3.4.2/;"
38 "C:/Program Files/GLBasic/Compiler/platform/Win32/Bin/../lib/gcc/mingw32/3.4.2/../../../../mingw32/lib/mingw32/3.4.2/;"
39 "C:/Program Files/GLBasic/Compiler/platform/Win32/Bin/../lib/gcc/mingw32/3.4.2/../../../../mingw32/lib/;"
40 "/mingw/mingw32/lib/mingw32/3.4.2/;"
41 "/mingw/mingw32/lib/;"
42 "/mingw/lib/mingw32/3.4.2/;"
44 "C:/Program Files/GLBasic/Compiler/platform/Win32/Bin/../lib/gcc/mingw32/3.4.2/../../../mingw32/3.4.2/;"
45 "C:/Program Files/GLBasic/Compiler/platform/Win32/Bin/../lib/gcc/mingw32/3.4.2/../../../;"
46 "/mingw/lib/mingw32/3.4.2/;"
48 "/lib/mingw32/3.4.2/;"
50 "/usr/lib/mingw32/3.4.2/;"
60static errno_t (
__cdecl *p_wputenv_s)(
const wchar_t*,
const wchar_t*);
86 ok(
ret == 1,
"Expected system to return 1, got %d\n",
ret);
89 ok(
ret == 0,
"Expected system to return 0, got %d\n",
ret);
106 if (!envp)
return NULL;
107 for (
i = 0; envp[
i] !=
NULL;
i++)
125 ok(
p_environ !=
NULL,
"Expected the pointer to _environ to be non-NULL\n" );
126 ok( *
p_environ !=
NULL,
"Expected _environ to be initialized on startup\n" );
128 if (
sizeof(
void*) !=
sizeof(
int))
136 p_get_environ(&retptr);
138 "Expected _environ pointers to be identical\n" );
141 win_skip(
"_get_environ() is not available\n" );
148 "Expected _environ to be equal to initial env\n" );
151 skip(
"__p___initenv() is not available\n" );
158 "Expected initial environment block pointer to be non-NULL\n" );
160 "Expected initial environment to be equal to _environ\n" );
162 ok(
_putenv(
"cat=dog") == 0,
"failed setting cat=dog\n" );
168 "Expected _environ[] not to be equal to initial env\n" );
169 ok( retptr == initenv,
170 "Unexpected modification of initial env\n" );
172 ok(
_putenv(
"cat=") == 0,
"failed setting cat=\n" );
182 ok(
p_wenviron !=
NULL,
"Expected the pointer to _wenviron to be non-NULL\n" );
185 if (
sizeof(
void*) !=
sizeof(
int))
193 p_get_wenviron(&retptr);
194 ok( retptr == *
p_wenviron,
"Expected _wenviron pointers to be NULL\n" );
197 win_skip(
"_get_wenviron() is not available\n" );
202 ok( !*retptr,
"Expected initial env to be NULL\n" );
205 skip(
"__p___winitenv() is not available\n" );
211 ok( envp !=
NULL,
"Expected initial environment block pointer to be non-NULL\n" );
214 skip(
"Initial environment block pointer is not valid\n" );
219 ok(
_putenv(
"cat=dog") == 0,
"failed setting cat=dog\n" );
224 ok(
_wputenv(
L"cat=dog2") == 0,
"failed setting cat=dog2\n" );
228 ok( wenvp !=
NULL,
"Expected initial environment block pointer to be non-NULL\n" );
229 ok( wenvp == *
p_wenviron,
"Expected initial environment to be _wenviron[]\n" );
238 "Expected _wenviron to be different from __p___winitenv() %p %p\n", *retptr, *
p_wenviron );
242 "Expecting initial env to be derived from current env (got %ls)\n",
value );
251 "Expected _wenviron pointers to be identical\n" );
257 p_get_wenviron(&retptr);
259 "Expected _wenviron pointers to be identical\n" );
272 ok(
_putenv(
"cat=") == 0,
"_putenv failed on deletion of nonexistent environment variable\n" );
273 ok(
_putenv(
"cat=dog") == 0,
"failed setting cat=dog\n" );
274 ok(
strcmp(
getenv(
"cat"),
"dog") == 0,
"getenv did not return 'dog'\n" );
278 ok( !
ret,
"getenv_s returned %d\n",
ret );
279 ok(
len == 4,
"getenv_s returned length is %Id\n",
len);
280 ok( !
strcmp(
buf,
"dog"),
"getenv_s did not return 'dog'\n");
282 ok(
_putenv(
"cat=") == 0,
"failed deleting cat\n" );
284 ok(
_putenv(
"=") == -1,
"should not accept '=' as input\n" );
285 ok(
_putenv(
"=dog") == -1,
"should not accept '=dog' as input\n" );
288 ok(
getenv(
"nonexistent") ==
NULL,
"getenv should fail with nonexistent var name\n" );
298 ret = p_putenv_s(
"cat",
"a=b");
299 ok( !
ret,
"_putenv_s returned %d\n",
ret);
300 ret = p_putenv_s(
"cat",
"");
301 ok( !
ret,
"_putenv_s returned %d\n",
ret);
312 ret = p_wputenv_s(
L"cat",
L"a=b");
313 ok( !
ret,
"_wputenv_s returned %d\n",
ret);
314 ret = p_wputenv_s(
L"cat",
L"");
315 ok( !
ret,
"_wputenv_s returned %d\n",
ret);
323 ret = p_getenv_s(&
len,
buf,
sizeof(
buf),
"nonexistent");
324 ok( !
ret,
"_getenv_s returned %d\n",
ret);
325 ok( !
len,
"getenv_s returned length is %Id\n",
len);
333 ok( !
ret,
"_getenv_s returned %d\n",
ret);
334 ok( !
len,
"getenv_s returned length is %Id\n",
len);
340 ok(
_putenv(
"__winetest_cat=" ) == 0,
"Couldn't reset env var\n" );
341 ok(
_putenv(
"__winetest_dog=" ) == 0,
"Couldn't reset env var\n" );
343 ok(
_putenv(
"__winetest_cat=mew") == 0,
"Couldn't set env var\n" );
346 ok(
getenv(
"__winetest_cat") ==
strchr( (*
p_environ)[
count],
'=') + 1,
"Expected getenv() to return pointer inside _environ[] entry\n" );
347 ok(
_putenv(
"__winetest_dog=bark" ) == 0,
"Couldn't set env var\n" );
349 ok(
getenv(
"__winetest_dog" ) ==
strchr( (*
p_environ)[
count + 1],
'=' ) + 1,
"Expected getenv() to return pointer inside _environ[] entry\n" );
351 second = (*p_environ)[
count + 1];
354 ok(
_putenv(
"__winetest_cat=purr" ) == 0,
"Couldn't set env var\n" );
356 ok(
getenv(
"__winetest_cat" ) ==
strchr( (*
p_environ)[
count],
'=' ) + 1,
"Expected getenv() to return pointer inside _environ[] entry\n" );
357 ok( second == (*
p_environ)[
count + 1],
"Expected stability of _environ[count] pointer\n" );
359 ok(
getenv(
"__winetest_dog" ) ==
strchr( (*
p_environ)[
count + 1],
'=' ) + 1,
"Expected getenv() to return pointer inside _environ[] entry\n" );
361 ok(
_putenv(
"__winetest_cat=" ) == 0,
"Couldn't reset env vat\n" );
362 ok( second == (*
p_environ)[
count],
"Expected _environ[count] to be second\n" );
365 ok(
_putenv(
"__winetest_dog=" ) == 0,
"Couldn't reset env var\n" );
371 ok(
_putenv(
"__winetest_dog=bark" ) == 0,
"Couldn't set env var\n" );
372 ok(
getenv(
"__winetest_cat" ) ==
NULL,
"msvcrt env cache shouldn't have been updated\n" );
373 ok(
_putenv(
"__winetest_cat=" ) == 0,
"Couldn't reset env var\n" );
374 ok(
_putenv(
"__winetest_dog=" ) == 0,
"Couldn't reset env var\n" );
380 ok(
_wputenv(
L"__winetest_cat=\u263a" ) == 0,
"Couldn't set env var\n" );
383 ok(
_wputenv(
L"__winetest_cat=" ) == 0,
"Couldn't reset env var\n" );
387 ok(
_wputenv(
L"__winetest_\u263a=bark" ) == 0,
"Couldn't set env var\n" );
390 ok(
_wputenv(
L"__winetest_\u263a=" ) == 0,
"Couldn't reset env var\n" );
404 ok( cur_env !=
NULL,
"GetEnvironemntStrings failed\n" );
414 wcscpy(
q,
L"__winetest_dog=bark" );
415 q +=
wcslen(
L"__winetest_dog=bark" ) + 1;
416 wcscpy(
q,
L"__winetest_\u263a=\u03b2" );
417 q +=
wcslen(
L"__winetest_\u263a=\u03b2" ) + 1;
422 ok(
ret,
"Couldn't create child process %s\n", tmp );
431 const char *uppercase_env =
getenv(
"APPDATA");
432 const char *lowercase_env =
getenv(
"appdata");
433 const wchar_t *uppercase_wenv =
_wgetenv(
L"APPDATA");
434 const wchar_t *lowercase_wenv =
_wgetenv(
L"appdata");
436 ok( uppercase_env == lowercase_env,
"getenv() must be case insensitive, %p should be %p\n",
437 lowercase_env, uppercase_env );
438 ok( uppercase_wenv == lowercase_wenv,
"_wgetenv() must be case insensitive, %p should be %p\n",
439 lowercase_wenv, uppercase_wenv );
441 ok( !
_putenv(
"cAt=bar"),
"Failed to set CAT=bar\n" );
442 ok( !
_putenv(
"CAT=BAR"),
"Failed to set CAT=BAR\n" );
443 ok( !
strcmp(
getenv(
"cAt"),
"BAR"),
"_putenv() must be case insensitive\n" );
445 ok( !
_wputenv(
L"cAt=bar"),
"Failed to set CAT=bar\n" );
446 ok( !
_wputenv(
L"CAT=BAR"),
"Failed to set CAT=BAR\n" );
463 "Couldn't find env var\n" );
465 "Couldn't find unicode env var\n" );
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
char * strchr(const char *String, int ch)
static LPCWSTR LPCWSTR LPCWSTR env
void __getmainargs(int *argc, char ***argv, char ***envp, int expand_wildcards, int *new_mode)
#define GetProcAddress(x, y)
#define WideCharToMultiByte
BOOL WINAPI FreeEnvironmentStringsW(IN LPWSTR EnvironmentStrings)
BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableA(IN LPCSTR lpName, IN LPCSTR lpValue)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble GLdouble q
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_ _CRTIMP int __cdecl _wputenv(_In_z_ const wchar_t *_EnvString)
_Check_return_ _CRTIMP wchar_t *__cdecl _wgetenv(_In_z_ const wchar_t *_VarName)
_Check_return_ _CRTIMP int __cdecl _putenv(_In_z_ const char *_EnvString)
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define memcpy(s1, s2, n)
static PEXPLICIT_ACCESSW *static HMODULE hmod
static char ***__cdecl * p__p___initenv(void)
static void test__environ(void)
static const char *static const wchar_t *static char const char *static char *** p_environ
static const char *static const wchar_t *static char size_t
static WCHAR ***__cdecl * p__p__wenviron(void)
static void test_case_insensitive(void)
static void test__wenviron(void)
static unsigned env_get_entry_countA(char **env)
static char ***__cdecl * p__p__environ(void)
static wchar_t ***__cdecl * p__p___winitenv(void)
static void test_environment_manipulation(void)
static const char * a_very_long_env_string
static void test_child_env(char **argv)
static WCHAR *** p_wenviron
static void test_system(void)
static wchar_t * env_get_valueW(wchar_t **envp, const wchar_t *var)
void CDECL __wgetmainargs(int *argc, WCHAR ***wargv, WCHAR ***wenvp, int expand_wildcards, int *new_mode)
int __cdecl system(_In_opt_z_ const char *_Command)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
const char int int int static __inline const char * wine_dbgstr_a(const char *s)
int winetest_get_mainargs(char ***pargv)
void winetest_wait_child_process(HANDLE process)
DWORD WINAPI GetLastError(void)
#define CREATE_UNICODE_ENVIRONMENT
LPWSTR WINAPI GetEnvironmentStringsW(void)