Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
*** macos
authordegomme <augustin.degomme@unibas.ch>
Sat, 18 Jun 2016 22:10:38 +0000 (00:10 +0200)
committerdegomme <augustin.degomme@unibas.ch>
Sat, 18 Jun 2016 22:10:38 +0000 (00:10 +0200)
include/smpi/mpi.h
include/smpi/smpi.h
src/smpi/smpi_bench.cpp

index 58ccde0..8129fda 100644 (file)
@@ -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 <sys/time.h> /* 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
index c04940d..0b73451 100644 (file)
@@ -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
index 1079ca4..e9b4773 100644 (file)
@@ -307,7 +307,7 @@ int smpi_usleep(useconds_t usecs)
   return static_cast<int>(private_sleep(static_cast<double>(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<int>(private_sleep(static_cast<double>(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.