diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2021-09-26 11:58:42 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2021-09-26 11:58:42 -0700 |
commit | a8b5da820df6c008fd02f514a8c93a48ecfe3620 (patch) | |
tree | 4a2d31a1471b83aa0c8a64fb76925743eb89d026 /src/misc/util | |
parent | ba64e78608064612db61d6515f19dd2cabe69cee (diff) | |
download | abc-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.h | 7 |
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; |