projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2aa0f23
)
Fix MSVC warning regarding mkdir function usage.
author
Francois Pichet
<pichet2000@gmail.com>
Thu, 26 May 2011 04:55:20 +0000
(
04:55
+0000)
committer
Francois Pichet
<pichet2000@gmail.com>
Thu, 26 May 2011 04:55:20 +0000
(
04:55
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132109
91177308
-0d34-0410-b5e6-
96231b3b80d8
runtime/libprofile/GCDAProfiling.c
patch
|
blob
|
history
diff --git
a/runtime/libprofile/GCDAProfiling.c
b/runtime/libprofile/GCDAProfiling.c
index 5af94becfe2bad35a6f9c11b93abe78bc46653e1..09a1aec84ef89353b31a077c8aa11acbb5ebe821 100644
(file)
--- 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);
}
}