Mercurial > mplayer.hg
changeset 35904:cef5275fc11f
Avoid usage of obsolete and BSD-specific "struct timezone".
author | diego |
---|---|
date | Sun, 17 Mar 2013 22:47:31 +0000 |
parents | 389d43c448b3 |
children | 0989cbea18b4 |
files | TOOLS/fastmemcpybench.c TOOLS/realcodecs/14_4.c TOOLS/realcodecs/28_8.c TOOLS/realcodecs/cook.c TOOLS/realcodecs/drv2.c TOOLS/realcodecs/drv3.c TOOLS/realcodecs/drv4.c TOOLS/realcodecs/ra.c TOOLS/realcodecs/rv30.c TOOLS/realcodecs/sipr.c configure |
diffstat | 11 files changed, 20 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- 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; }
--- 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) {
--- 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) {
--- 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) {
--- 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) {
--- 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) {
--- 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) {
--- 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) {
--- 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) {
--- 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) {
--- 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"