From: degomme Date: Sat, 18 Jun 2016 22:10:38 +0000 (+0200) Subject: *** macos X-Git-Tag: v3_14~946 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/bf2e39cce25d21ff15ad0448c8419f51b1df08dc *** macos --- diff --git a/include/smpi/mpi.h b/include/smpi/mpi.h index 58ccde0d6d..8129fda0e5 100644 --- a/include/smpi/mpi.h +++ b/include/smpi/mpi.h @@ -10,7 +10,7 @@ #define SEED 221238 #define sleep(x) smpi_sleep(x) -#if _POSIX_TIMERS && _POSIX_C_SOURCE >= 199309L +#if _POSIX_TIMERS > 0 #define nanosleep(x, y) smpi_nanosleep(x, y) #endif #define usleep(x) smpi_usleep(x) @@ -23,7 +23,7 @@ #include /* Load it before the define next line to not mess with the system headers */ #define gettimeofday(x, y) smpi_gettimeofday(x, NULL) -#if _POSIX_TIMERS && _POSIX_C_SOURCE >= 199309L +#if _POSIX_TIMERS > 0 #define clock_gettime(x, y) smpi_clock_gettime(x, y) #endif #if HAVE_MC diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index c04940d2d0..0b73451b22 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -806,7 +806,7 @@ XBT_PUBLIC(int) smpi_get_host_pstate(void); XBT_PUBLIC(double) smpi_get_host_consumed_energy(void); XBT_PUBLIC(int) smpi_usleep(useconds_t usecs); -#if _POSIX_TIMERS && _POSIX_C_SOURCE >= 199309L +#if _POSIX_TIMERS > 0 XBT_PUBLIC(int) smpi_nanosleep(const struct timespec *tp, struct timespec * t); XBT_PUBLIC(int) smpi_clock_gettime(clockid_t clk_id, struct timespec *tp); #endif diff --git a/src/smpi/smpi_bench.cpp b/src/smpi/smpi_bench.cpp index 1079ca4e93..e9b4773355 100644 --- a/src/smpi/smpi_bench.cpp +++ b/src/smpi/smpi_bench.cpp @@ -307,7 +307,7 @@ int smpi_usleep(useconds_t usecs) return static_cast(private_sleep(static_cast(usecs) / 1000000.0)); } -#if _POSIX_TIMERS && _POSIX_C_SOURCE >= 199309L +#if _POSIX_TIMERS > 0 int smpi_nanosleep(const struct timespec *tp, struct timespec * t) { return static_cast(private_sleep(static_cast(tp->tv_sec + tp->tv_nsec / 1000000000.0))); @@ -331,7 +331,7 @@ int smpi_gettimeofday(struct timeval *tv, void* tz) return 0; } -#if _POSIX_TIMERS && _POSIX_C_SOURCE >= 199309L +#if _POSIX_TIMERS > 0 int smpi_clock_gettime(clockid_t clk_id, struct timespec *tp) { //there is only one time in SMPI, so clk_id is ignored.