[cfe-commits] r134859 - /cfe/trunk/tools/c-arcmt-test/c-arcmt-test.c

NAKAMURA Takumi geek4civic at gmail.com
Sat Jul 9 20:10:43 PDT 2011


Author: chapuni
Date: Sat Jul  9 22:10:43 2011
New Revision: 134859

URL: http://llvm.org/viewvc/llvm-project?rev=134859&view=rev
Log:
c-arcmt-test.c: MSVCRT does not have setenv. Use putenv instead.

Modified:
    cfe/trunk/tools/c-arcmt-test/c-arcmt-test.c

Modified: cfe/trunk/tools/c-arcmt-test/c-arcmt-test.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-arcmt-test/c-arcmt-test.c?rev=134859&r1=134858&r2=134859&view=diff
==============================================================================
--- cfe/trunk/tools/c-arcmt-test/c-arcmt-test.c (original)
+++ cfe/trunk/tools/c-arcmt-test/c-arcmt-test.c Sat Jul  9 22:10:43 2011
@@ -70,7 +70,12 @@
 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);





More information about the cfe-commits mailing list