From 54577dec61f87995f598ca3e588a5b21b85b7ae6 Mon Sep 17 00:00:00 2001 From: Francois Pichet Date: Thu, 26 May 2011 04:55:20 +0000 Subject: [PATCH] Fix MSVC warning regarding mkdir function usage. llvm-svn: 132109 --- llvm/runtime/libprofile/GCDAProfiling.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llvm/runtime/libprofile/GCDAProfiling.c b/llvm/runtime/libprofile/GCDAProfiling.c index 5af94becfe2b..09a1aec84ef8 100644 --- a/llvm/runtime/libprofile/GCDAProfiling.c +++ b/llvm/runtime/libprofile/GCDAProfiling.c @@ -26,6 +26,9 @@ #include #include #include +#ifdef _MSC_VER +#include +#endif /* #define DEBUG_GCDAPROFILING */ @@ -86,7 +89,11 @@ static void recursive_mkdir(const char *filename) { 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); } }