summaryrefslogtreecommitdiffstats
path: root/src/misc/util
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2021-09-26 11:58:42 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2021-09-26 11:58:42 -0700
commita8b5da820df6c008fd02f514a8c93a48ecfe3620 (patch)
tree4a2d31a1471b83aa0c8a64fb76925743eb89d026 /src/misc/util
parentba64e78608064612db61d6515f19dd2cabe69cee (diff)
downloadabc-a8b5da820df6c008fd02f514a8c93a48ecfe3620.tar.gz
abc-a8b5da820df6c008fd02f514a8c93a48ecfe3620.tar.bz2
abc-a8b5da820df6c008fd02f514a8c93a48ecfe3620.zip
Other compiler changes.
Diffstat (limited to 'src/misc/util')
-rw-r--r--src/misc/util/abc_global.h7
1 files changed, 6 insertions, 1 deletions
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;