c-arcmt-test.c: MSVCRT does not have setenv. Use putenv instead.

llvm-svn: 134859
This commit is contained in:
NAKAMURA Takumi 2011-07-10 03:10:43 +00:00
parent 9b07c0ab6b
commit 3310effb24
1 changed files with 5 additions and 0 deletions

View File

@ -70,7 +70,12 @@ void thread_runner(void *client_data_v) {
int main(int argc, const char **argv) {
thread_info client_data;
#if defined(_WIN32)
if (getenv("LIBCLANG_LOGGING") == NULL)
putenv("LIBCLANG_LOGGING=1");
#else
setenv("LIBCLANG_LOGGING", "1", /*overwrite=*/0);
#endif
if (getenv("CINDEXTEST_NOTHREADS"))
return carcmttest_main(argc, argv);