mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-11 21:38:19 +00:00
Fix MSVC warning regarding mkdir function usage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132109 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -26,6 +26,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#include <direct.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* #define DEBUG_GCDAPROFILING */
|
/* #define DEBUG_GCDAPROFILING */
|
||||||
|
|
||||||
@ -86,7 +89,11 @@ static void recursive_mkdir(const char *filename) {
|
|||||||
pathname = malloc(i + 1);
|
pathname = malloc(i + 1);
|
||||||
strncpy(pathname, filename, i);
|
strncpy(pathname, filename, i);
|
||||||
pathname[i] = '\0';
|
pathname[i] = '\0';
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
_mkdir(pathname);
|
||||||
|
#else
|
||||||
mkdir(pathname, 0750); /* some of these will fail, ignore it. */
|
mkdir(pathname, 0750); /* some of these will fail, ignore it. */
|
||||||
|
#endif
|
||||||
free(pathname);
|
free(pathname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user