From 153058238352d96ef902ddba41f3f7bd3ea7dbfe Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Tue, 16 Jun 2015 10:45:12 +0200 Subject: [PATCH] Get rid of the MACOS tests I don't know where it's supposed to come from but it's not defined. --- src/xbt/xbt_os_thread.c | 2 +- src/xbt/xbt_os_time.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xbt/xbt_os_thread.c b/src/xbt/xbt_os_thread.c index 7be5fb38d0..50a9a4cb63 100644 --- a/src/xbt/xbt_os_thread.c +++ b/src/xbt/xbt_os_thread.c @@ -1250,7 +1250,7 @@ int xbt_os_get_numcores(void) { SYSTEM_INFO sysinfo; GetSystemInfo(&sysinfo); return sysinfo.dwNumberOfProcessors; -#elif MACOS +#elif defined(__APPLE__) && defined(__MACH__) int nm[2]; size_t len = 4; uint32_t count; diff --git a/src/xbt/xbt_os_time.c b/src/xbt/xbt_os_time.c index b9912ace94..cd316484cb 100644 --- a/src/xbt/xbt_os_time.c +++ b/src/xbt/xbt_os_time.c @@ -22,7 +22,7 @@ #define CLOCK_PROCESS_CPUTIME_ID CLOCK_PROF #endif -#ifdef MACOS +#if defined(__APPLE__) && defined(__MACH__) #include #include #include @@ -357,7 +357,7 @@ void xbt_os_threadtimer_start(xbt_os_timer_t timer) timer->elapse.tv_sec = 0; timer->elapse.tv_nsec = 0; clock_gettime(CLOCK_THREAD_CPUTIME_ID, &(timer->start)); -#elif defined(HAVE_GETTIMEOFDAY) && defined(MACOS) //attempt for timing of the thread on OSX +#elif defined(HAVE_GETTIMEOFDAY) && defined(__MACH__)//attempt for timing of the thread on OSX timer->elapse.tv_sec = 0; timer->elapse.tv_usec = 0; int count = THREAD_BASIC_INFO_COUNT; @@ -397,7 +397,7 @@ void xbt_os_threadtimer_resume(xbt_os_timer_t timer) timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec; timer->elapse.tv_nsec += timer->stop.tv_nsec - timer->start.tv_nsec; clock_gettime(CLOCK_THREAD_CPUTIME_ID, &(timer->start)); -#elif defined(HAVE_GETTIMEOFDAY) && defined(MACOS) +#elif defined(HAVE_GETTIMEOFDAY) && defined(__MACH__) timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec; timer->elapse.tv_usec += timer->stop.tv_usec - timer->start.tv_usec; int count = THREAD_BASIC_INFO_COUNT; @@ -436,7 +436,7 @@ void xbt_os_threadtimer_stop(xbt_os_timer_t timer) { #ifdef HAVE_POSIX_GETTIME clock_gettime(CLOCK_THREAD_CPUTIME_ID, &(timer->stop)); -#elif defined(HAVE_GETTIMEOFDAY) && defined(MACOS) +#elif defined(HAVE_GETTIMEOFDAY) && defined(__MACH__) int count = THREAD_BASIC_INFO_COUNT; thread_basic_info_data_t thi_data; thread_basic_info_t thi = &thi_data; -- 2.20.1