From daf4f04c69bc36874bcf9e765de51759f44b7c5d Mon Sep 17 00:00:00 2001 From: suter Date: Wed, 7 May 2014 03:09:51 +0200 Subject: [PATCH] allow MPI codes to use timezone in their gettimeofday (but we replace it to NULL anyway). The previous macro prevented the compilation of some code. --- include/smpi/mpi.h | 3 ++- include/smpi/smpi.h | 2 +- src/smpi/smpi_bench.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/smpi/mpi.h b/include/smpi/mpi.h index 4224e7ffbc..482fa7eba8 100644 --- a/include/smpi/mpi.h +++ b/include/smpi/mpi.h @@ -10,7 +10,6 @@ #define SEED 221238 #define sleep(x) smpi_sleep(x) -#define gettimeofday(x, y) smpi_gettimeofday(x) #include #include @@ -18,6 +17,8 @@ #include #include +#define gettimeofday(x, y) smpi_gettimeofday(x, NULL) + #ifdef HAVE_MC #undef assert #define assert(x) MC_assert(x) diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index 0cc6f08cb9..c520980c0c 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -709,7 +709,7 @@ XBT_PUBLIC(void) smpi_set_host_power_peak_at(int pstate_index); XBT_PUBLIC(double) smpi_get_host_consumed_energy(void); XBT_PUBLIC(unsigned int) smpi_sleep(unsigned int secs); -XBT_PUBLIC(int) smpi_gettimeofday(struct timeval *tv); +XBT_PUBLIC(int) smpi_gettimeofday(struct timeval *tv, void* tz); XBT_PUBLIC(unsigned long long) smpi_rastro_resolution (void); XBT_PUBLIC(unsigned long long) smpi_rastro_timestamp (void); XBT_PUBLIC(void) smpi_sample_1(int global, const char *file, int line, diff --git a/src/smpi/smpi_bench.c b/src/smpi/smpi_bench.c index f7464dbd2a..2cb5bb204a 100644 --- a/src/smpi/smpi_bench.c +++ b/src/smpi/smpi_bench.c @@ -227,7 +227,7 @@ unsigned int smpi_sleep(unsigned int secs) return secs; } -int smpi_gettimeofday(struct timeval *tv) +int smpi_gettimeofday(struct timeval *tv, void* tz) { double now; smpi_bench_end(); -- 2.20.1