From a8b5da820df6c008fd02f514a8c93a48ecfe3620 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sun, 26 Sep 2021 11:58:42 -0700 Subject: Other compiler changes. --- src/misc/util/abc_global.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/misc/util') diff --git a/src/misc/util/abc_global.h b/src/misc/util/abc_global.h index 5ba614c7..d1a9b4d3 100644 --- a/src/misc/util/abc_global.h +++ b/src/misc/util/abc_global.h @@ -329,7 +329,12 @@ static inline int Abc_Lit2Att4( int Lit ) { assert(Lit >= 0) typedef ABC_INT64_T abctime; static inline abctime Abc_Clock() { -#if (defined(LIN) || defined(LIN64)) && !(__APPLE__ & __MACH__) && !defined(__MINGW32__) +#if defined(__APPLE__) && defined(__MACH__) + #define APPLE_MACH (__APPLE__ & __MACH__) +#else + #define APPLE_MACH 0 +#endif +#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