diff options
author | Aaron Tomb <atomb@galois.com> | 2013-11-04 14:27:09 -0800 |
---|---|---|
committer | Aaron Tomb <atomb@galois.com> | 2013-11-04 14:27:09 -0800 |
commit | 6a4d430e608fe1d2f8a72fdb682de1d163c641fe (patch) | |
tree | 9ce387742b95d2984ce2feb70f6817443a18cc57 | |
parent | cf1746e3480a3260bd80a4fa9754369a4bb6bc6b (diff) | |
download | abc-6a4d430e608fe1d2f8a72fdb682de1d163c641fe.tar.gz abc-6a4d430e608fe1d2f8a72fdb682de1d163c641fe.tar.bz2 abc-6a4d430e608fe1d2f8a72fdb682de1d163c641fe.zip |
Choose Windows file operations with MINGW32.
-rw-r--r-- | src/misc/util/utilFile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/misc/util/utilFile.c b/src/misc/util/utilFile.c index 41438c57..c5c5a08f 100644 --- a/src/misc/util/utilFile.c +++ b/src/misc/util/utilFile.c @@ -25,7 +25,7 @@ #include <fcntl.h> #include <sys/stat.h> -#if defined(_MSC_VER) +#if defined(_MSC_VER) || defined(__MINGW32__) #include <Windows.h> #include <process.h> #include <io.h> @@ -88,7 +88,7 @@ static ABC_UINT64_T realTimeAbs() // -- absolute time in nano-seconds ***********************************************************************/ int tmpFile(const char* prefix, const char* suffix, char** out_name) { -#if defined(_MSC_VER) +#if defined(_MSC_VER) || defined(__MINGW32__) int i, fd; *out_name = (char*)malloc(strlen(prefix) + strlen(suffix) + 27); for (i = 0; i < 10; i++){ @@ -174,7 +174,7 @@ char* vnsprintf(const char* format, va_list args) static FILE* dummy_file = NULL; if (!dummy_file) { -#if !defined(_MSC_VER) +#if !defined(_MSC_VER) && !defined(__MINGW32) dummy_file = fopen("/dev/null", "wb"); #else dummy_file = fopen("NUL", "wb"); |