[llvm-commits] [llvm] r132109 - /llvm/trunk/runtime/libprofile/GCDAProfiling.c

Francois Pichet pichet2000 at gmail.com
Wed May 25 21:55:20 PDT 2011


Author: fpichet
Date: Wed May 25 23:55:20 2011
New Revision: 132109

URL: http://llvm.org/viewvc/llvm-project?rev=132109&view=rev
Log:
Fix MSVC warning regarding mkdir function usage.

Modified:
    llvm/trunk/runtime/libprofile/GCDAProfiling.c

Modified: llvm/trunk/runtime/libprofile/GCDAProfiling.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtime/libprofile/GCDAProfiling.c?rev=132109&r1=132108&r2=132109&view=diff
==============================================================================
--- llvm/trunk/runtime/libprofile/GCDAProfiling.c (original)
+++ llvm/trunk/runtime/libprofile/GCDAProfiling.c Wed May 25 23:55:20 2011
@@ -26,6 +26,9 @@
 #include <string.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#ifdef _MSC_VER
+#include <direct.h>
+#endif
 
 /* #define DEBUG_GCDAPROFILING */
 
@@ -86,7 +89,11 @@
       pathname = malloc(i + 1);
       strncpy(pathname, filename, i);
       pathname[i] = '\0';
+#ifdef _MSC_VER
+      _mkdir(pathname);
+#else
       mkdir(pathname, 0750);  /* some of these will fail, ignore it. */
+#endif
       free(pathname);
     }
   }





More information about the llvm-commits mailing list