Skip to content

Commit

Permalink
Fix MSVC warning regarding mkdir function usage.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132109 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
fpichet committed May 26, 2011
1 parent 2aa0f23 commit 9793808
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions runtime/libprofile/GCDAProfiling.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 9793808

Please sign in to comment.