From: suter Date: Wed, 7 May 2014 01:09:51 +0000 (+0200) Subject: allow MPI codes to use timezone in their gettimeofday (but we replace it X-Git-Tag: v3_11~94^2~5 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/daf4f04c69bc36874bcf9e765de51759f44b7c5d?ds=sidebyside 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. --- 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();