diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-07-10 03:10:43 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-07-10 03:10:43 +0000 |
commit | 0989bf7b7a5abaf5a7764c32921d7eafa316ba58 (patch) | |
tree | 1adbe46619b51b5e80dcda3b1ecd3e29238a51e4 | |
parent | be5f332c4d9eb302cd020047c382aa133ad59501 (diff) |
c-arcmt-test.c: MSVCRT does not have setenv. Use putenv instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134859 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/c-arcmt-test/c-arcmt-test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/c-arcmt-test/c-arcmt-test.c b/tools/c-arcmt-test/c-arcmt-test.c index 86992da76b..19f6b8f30c 100644 --- a/tools/c-arcmt-test/c-arcmt-test.c +++ b/tools/c-arcmt-test/c-arcmt-test.c @@ -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); |