diff options
author | Francois Pichet <pichet2000@gmail.com> | 2011-05-26 04:55:20 +0000 |
---|---|---|
committer | Francois Pichet <pichet2000@gmail.com> | 2011-05-26 04:55:20 +0000 |
commit | 97938081f321bc08ded74fc452523c35b7f9f17e (patch) | |
tree | e6cb9a8b459939bfd7a0115481e923450e079865 /runtime | |
parent | 2aa0f23e1cb5afc96981ecc057980d1958c0be72 (diff) | |
download | external_llvm-97938081f321bc08ded74fc452523c35b7f9f17e.zip external_llvm-97938081f321bc08ded74fc452523c35b7f9f17e.tar.gz external_llvm-97938081f321bc08ded74fc452523c35b7f9f17e.tar.bz2 |
Fix MSVC warning regarding mkdir function usage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132109 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/libprofile/GCDAProfiling.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/libprofile/GCDAProfiling.c b/runtime/libprofile/GCDAProfiling.c index 5af94be..09a1aec 100644 --- a/runtime/libprofile/GCDAProfiling.c +++ b/runtime/libprofile/GCDAProfiling.c @@ -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 @@ 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); } } |