From cf1746e3480a3260bd80a4fa9754369a4bb6bc6b Mon Sep 17 00:00:00 2001 From: Aaron Tomb Date: Mon, 4 Nov 2013 14:25:55 -0800 Subject: Make definition of Abc_Clock work with MINGW32. --- src/misc/util/abc_global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/misc/util/abc_global.h b/src/misc/util/abc_global.h index 950a8889..5a0a1f1d 100644 --- a/src/misc/util/abc_global.h +++ b/src/misc/util/abc_global.h @@ -272,7 +272,7 @@ static inline int Abc_Lit2LitL( int * pMap, int Lit ) { return Abc_LitNo typedef ABC_INT64_T abctime; static inline abctime Abc_Clock() { -#if defined(LIN) || defined(LIN64) && !(__APPLE__ & __MACH__) +#if (defined(LIN) || defined(LIN64) && !(__APPLE__ & __MACH__)) && !defined(__MINGW32__) struct timespec ts; if ( clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts) < 0 ) return (abctime)-1; -- cgit v1.2.3 From 6a4d430e608fe1d2f8a72fdb682de1d163c641fe Mon Sep 17 00:00:00 2001 From: Aaron Tomb Date: Mon, 4 Nov 2013 14:27:09 -0800 Subject: Choose Windows file operations with MINGW32. --- src/misc/util/utilFile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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 #include -#if defined(_MSC_VER) +#if defined(_MSC_VER) || defined(__MINGW32__) #include #include #include @@ -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"); -- cgit v1.2.3 From aa2eae5cab449ef8c728eb7b62d7ea46290332c5 Mon Sep 17 00:00:00 2001 From: Aaron Tomb Date: Mon, 4 Nov 2013 14:28:32 -0800 Subject: Don't assume MSVC when __MINGW32__ set. --- src/misc/util/abc_global.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/misc/util/abc_global.h b/src/misc/util/abc_global.h index 5a0a1f1d..144177da 100644 --- a/src/misc/util/abc_global.h +++ b/src/misc/util/abc_global.h @@ -26,6 +26,7 @@ //////////////////////////////////////////////////////////////////////// #ifdef _WIN32 +#ifndef __MINGW32__ #define inline __inline // compatible with MS VS 6.0 #pragma warning(disable : 4152) // warning C4152: nonstandard extension, function/data pointer conversion in expression #pragma warning(disable : 4200) // warning C4200: nonstandard extension used : zero-sized array in struct/union @@ -34,6 +35,7 @@ #pragma warning(disable : 4710) // warning C4710: function 'Vec_PtrGrow' not inlined //#pragma warning( disable : 4273 ) #endif +#endif #ifdef WIN32 #ifdef WIN32_NO_DLL -- cgit v1.2.3