# HG changeset patch # User diego # Date 1363560451 0 # Node ID cef5275fc11f3c9524404cb3c88047ebdeee5b54 # Parent 389d43c448b3f0a0c76a9b1b2fe129363b475c5a Avoid usage of obsolete and BSD-specific "struct timezone". diff -r 389d43c448b3 -r cef5275fc11f TOOLS/fastmemcpybench.c --- a/TOOLS/fastmemcpybench.c Sun Mar 17 22:47:17 2013 +0000 +++ b/TOOLS/fastmemcpybench.c Sun Mar 17 22:47:31 2013 +0000 @@ -175,9 +175,8 @@ static unsigned int GetTimer(void) { struct timeval tv; - struct timezone tz; //float s; - gettimeofday(&tv, &tz); + gettimeofday(&tv, NULL); //s = tv.tv_usec; s *= 0.000001; s += tv.tv_sec; return tv.tv_sec * 1000000 + tv.tv_usec; } diff -r 389d43c448b3 -r cef5275fc11f TOOLS/realcodecs/14_4.c --- a/TOOLS/realcodecs/14_4.c Sun Mar 17 22:47:17 2013 +0000 +++ b/TOOLS/realcodecs/14_4.c Sun Mar 17 22:47:31 2013 +0000 @@ -112,16 +112,15 @@ loadSyms(); } -struct timezone tz; struct timeval tv1, tv2; void tic(void) { - gettimeofday(&tv1, &tz); + gettimeofday(&tv1, NULL); } void toc(void) { long secs, usecs; - gettimeofday(&tv2, &tz); + gettimeofday(&tv2, NULL); secs=tv2.tv_sec-tv1.tv_sec; usecs=tv2.tv_usec-tv1.tv_usec; if (usecs<0) { diff -r 389d43c448b3 -r cef5275fc11f TOOLS/realcodecs/28_8.c --- a/TOOLS/realcodecs/28_8.c Sun Mar 17 22:47:17 2013 +0000 +++ b/TOOLS/realcodecs/28_8.c Sun Mar 17 22:47:31 2013 +0000 @@ -112,16 +112,15 @@ loadSyms(); } -struct timezone tz; struct timeval tv1, tv2; void tic(void) { - gettimeofday(&tv1, &tz); + gettimeofday(&tv1, NULL); } void toc(void) { long secs, usecs; - gettimeofday(&tv2, &tz); + gettimeofday(&tv2, NULL); secs=tv2.tv_sec-tv1.tv_sec; usecs=tv2.tv_usec-tv1.tv_usec; if (usecs<0) { diff -r 389d43c448b3 -r cef5275fc11f TOOLS/realcodecs/cook.c --- a/TOOLS/realcodecs/cook.c Sun Mar 17 22:47:17 2013 +0000 +++ b/TOOLS/realcodecs/cook.c Sun Mar 17 22:47:31 2013 +0000 @@ -159,16 +159,15 @@ loadSyms(); } -struct timezone tz; struct timeval tv1, tv2; void tic(void) { - gettimeofday(&tv1, &tz); + gettimeofday(&tv1, NULL); } void toc(void) { long secs, usecs; - gettimeofday(&tv2, &tz); + gettimeofday(&tv2, NULL); secs=tv2.tv_sec-tv1.tv_sec; usecs=tv2.tv_usec-tv1.tv_usec; if (usecs<0) { diff -r 389d43c448b3 -r cef5275fc11f TOOLS/realcodecs/drv2.c --- a/TOOLS/realcodecs/drv2.c Sun Mar 17 22:47:17 2013 +0000 +++ b/TOOLS/realcodecs/drv2.c Sun Mar 17 22:47:31 2013 +0000 @@ -136,16 +136,15 @@ loadSyms(); } -struct timezone tz; struct timeval tv1, tv2; void tic(void) { - gettimeofday(&tv1, &tz); + gettimeofday(&tv1, NULL); } void toc(void) { long secs, usecs; - gettimeofday(&tv2, &tz); + gettimeofday(&tv2, NULL); secs=tv2.tv_sec-tv1.tv_sec; usecs=tv2.tv_usec-tv1.tv_usec; if (usecs<0) { diff -r 389d43c448b3 -r cef5275fc11f TOOLS/realcodecs/drv3.c --- a/TOOLS/realcodecs/drv3.c Sun Mar 17 22:47:17 2013 +0000 +++ b/TOOLS/realcodecs/drv3.c Sun Mar 17 22:47:31 2013 +0000 @@ -136,16 +136,15 @@ loadSyms(); } -struct timezone tz; struct timeval tv1, tv2; void tic(void) { - gettimeofday(&tv1, &tz); + gettimeofday(&tv1, NULL); } void toc(void) { long secs, usecs; - gettimeofday(&tv2, &tz); + gettimeofday(&tv2, NULL); secs=tv2.tv_sec-tv1.tv_sec; usecs=tv2.tv_usec-tv1.tv_usec; if (usecs<0) { diff -r 389d43c448b3 -r cef5275fc11f TOOLS/realcodecs/drv4.c --- a/TOOLS/realcodecs/drv4.c Sun Mar 17 22:47:17 2013 +0000 +++ b/TOOLS/realcodecs/drv4.c Sun Mar 17 22:47:31 2013 +0000 @@ -108,16 +108,15 @@ loadSyms(); } -struct timezone tz; struct timeval tv1, tv2; void tic(void) { - gettimeofday(&tv1, &tz); + gettimeofday(&tv1, NULL); } void toc(void) { long secs, usecs; - gettimeofday(&tv2, &tz); + gettimeofday(&tv2, NULL); secs=tv2.tv_sec-tv1.tv_sec; usecs=tv2.tv_usec-tv1.tv_usec; if (usecs<0) { diff -r 389d43c448b3 -r cef5275fc11f TOOLS/realcodecs/ra.c --- a/TOOLS/realcodecs/ra.c Sun Mar 17 22:47:17 2013 +0000 +++ b/TOOLS/realcodecs/ra.c Sun Mar 17 22:47:31 2013 +0000 @@ -158,16 +158,15 @@ loadSyms(); } -struct timezone tz; struct timeval tv1, tv2; void tic(void) { - gettimeofday(&tv1, &tz); + gettimeofday(&tv1, NULL); } void toc(void) { long secs, usecs; - gettimeofday(&tv2, &tz); + gettimeofday(&tv2, NULL); secs=tv2.tv_sec-tv1.tv_sec; usecs=tv2.tv_usec-tv1.tv_usec; if (usecs<0) { diff -r 389d43c448b3 -r cef5275fc11f TOOLS/realcodecs/rv30.c --- a/TOOLS/realcodecs/rv30.c Sun Mar 17 22:47:17 2013 +0000 +++ b/TOOLS/realcodecs/rv30.c Sun Mar 17 22:47:31 2013 +0000 @@ -187,16 +187,15 @@ loadSyms(); } -struct timezone tz; struct timeval tv1, tv2; void tic(void) { - gettimeofday(&tv1, &tz); + gettimeofday(&tv1, NULL); } void toc(void) { long secs, usecs; - gettimeofday(&tv2, &tz); + gettimeofday(&tv2, NULL); secs=tv2.tv_sec-tv1.tv_sec; usecs=tv2.tv_usec-tv1.tv_usec; if (usecs<0) { diff -r 389d43c448b3 -r cef5275fc11f TOOLS/realcodecs/sipr.c --- a/TOOLS/realcodecs/sipr.c Sun Mar 17 22:47:17 2013 +0000 +++ b/TOOLS/realcodecs/sipr.c Sun Mar 17 22:47:31 2013 +0000 @@ -181,16 +181,15 @@ loadSyms(); } -struct timezone tz; struct timeval tv1, tv2; void tic(void) { - gettimeofday(&tv1, &tz); + gettimeofday(&tv1, NULL); } void toc(void) { long secs, usecs; - gettimeofday(&tv2, &tz); + gettimeofday(&tv2, NULL); secs=tv2.tv_sec-tv1.tv_sec; usecs=tv2.tv_usec-tv1.tv_usec; if (usecs<0) { diff -r 389d43c448b3 -r cef5275fc11f configure --- a/configure Sun Mar 17 22:47:17 2013 +0000 +++ b/configure Sun Mar 17 22:47:31 2013 +0000 @@ -4143,7 +4143,7 @@ echocheck "gettimeofday()" gettimeofday=yes def_gettimeofday='#define HAVE_GETTIMEOFDAY 1' -statement_check sys/time.h 'struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz)' || +statement_check_broken stddef.h sys/time.h 'struct timeval tv; gettimeofday(&tv, NULL)' || { gettimeofday=no ; def_gettimeofday='#undef HAVE_GETTIMEOFDAY' ; } echores "$gettimeofday"