[MPlayer-cvslog] r35998 - in trunk: 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/real...

diego subversion at mplayerhq.hu
Sun Mar 17 23:47:31 CET 2013


Author: diego
Date: Sun Mar 17 23:47:31 2013
New Revision: 35998

Log:
Avoid usage of obsolete and BSD-specific "struct timezone".

Modified:
   trunk/TOOLS/fastmemcpybench.c
   trunk/TOOLS/realcodecs/14_4.c
   trunk/TOOLS/realcodecs/28_8.c
   trunk/TOOLS/realcodecs/cook.c
   trunk/TOOLS/realcodecs/drv2.c
   trunk/TOOLS/realcodecs/drv3.c
   trunk/TOOLS/realcodecs/drv4.c
   trunk/TOOLS/realcodecs/ra.c
   trunk/TOOLS/realcodecs/rv30.c
   trunk/TOOLS/realcodecs/sipr.c
   trunk/configure

Modified: trunk/TOOLS/fastmemcpybench.c
==============================================================================
--- trunk/TOOLS/fastmemcpybench.c	Sun Mar 17 23:47:17 2013	(r35997)
+++ trunk/TOOLS/fastmemcpybench.c	Sun Mar 17 23:47:31 2013	(r35998)
@@ -175,9 +175,8 @@ static int mga_init(void)
 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;
 }

Modified: trunk/TOOLS/realcodecs/14_4.c
==============================================================================
--- trunk/TOOLS/realcodecs/14_4.c	Sun Mar 17 23:47:17 2013	(r35997)
+++ trunk/TOOLS/realcodecs/14_4.c	Sun Mar 17 23:47:31 2013	(r35998)
@@ -112,16 +112,15 @@ void _init(void) {
 	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) {

Modified: trunk/TOOLS/realcodecs/28_8.c
==============================================================================
--- trunk/TOOLS/realcodecs/28_8.c	Sun Mar 17 23:47:17 2013	(r35997)
+++ trunk/TOOLS/realcodecs/28_8.c	Sun Mar 17 23:47:31 2013	(r35998)
@@ -112,16 +112,15 @@ void _init(void) {
 	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) {

Modified: trunk/TOOLS/realcodecs/cook.c
==============================================================================
--- trunk/TOOLS/realcodecs/cook.c	Sun Mar 17 23:47:17 2013	(r35997)
+++ trunk/TOOLS/realcodecs/cook.c	Sun Mar 17 23:47:31 2013	(r35998)
@@ -159,16 +159,15 @@ void _init(void) {
 	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) {

Modified: trunk/TOOLS/realcodecs/drv2.c
==============================================================================
--- trunk/TOOLS/realcodecs/drv2.c	Sun Mar 17 23:47:17 2013	(r35997)
+++ trunk/TOOLS/realcodecs/drv2.c	Sun Mar 17 23:47:31 2013	(r35998)
@@ -136,16 +136,15 @@ void _init(void) {
 	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) {

Modified: trunk/TOOLS/realcodecs/drv3.c
==============================================================================
--- trunk/TOOLS/realcodecs/drv3.c	Sun Mar 17 23:47:17 2013	(r35997)
+++ trunk/TOOLS/realcodecs/drv3.c	Sun Mar 17 23:47:31 2013	(r35998)
@@ -136,16 +136,15 @@ void _init(void) {
 	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) {

Modified: trunk/TOOLS/realcodecs/drv4.c
==============================================================================
--- trunk/TOOLS/realcodecs/drv4.c	Sun Mar 17 23:47:17 2013	(r35997)
+++ trunk/TOOLS/realcodecs/drv4.c	Sun Mar 17 23:47:31 2013	(r35998)
@@ -108,16 +108,15 @@ void _init(void) {
 	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) {

Modified: trunk/TOOLS/realcodecs/ra.c
==============================================================================
--- trunk/TOOLS/realcodecs/ra.c	Sun Mar 17 23:47:17 2013	(r35997)
+++ trunk/TOOLS/realcodecs/ra.c	Sun Mar 17 23:47:31 2013	(r35998)
@@ -158,16 +158,15 @@ void _init(void) {
 	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) {

Modified: trunk/TOOLS/realcodecs/rv30.c
==============================================================================
--- trunk/TOOLS/realcodecs/rv30.c	Sun Mar 17 23:47:17 2013	(r35997)
+++ trunk/TOOLS/realcodecs/rv30.c	Sun Mar 17 23:47:31 2013	(r35998)
@@ -187,16 +187,15 @@ void _init(void) {
 	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) {

Modified: trunk/TOOLS/realcodecs/sipr.c
==============================================================================
--- trunk/TOOLS/realcodecs/sipr.c	Sun Mar 17 23:47:17 2013	(r35997)
+++ trunk/TOOLS/realcodecs/sipr.c	Sun Mar 17 23:47:31 2013	(r35998)
@@ -181,16 +181,15 @@ void _init(void) {
 	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) {

Modified: trunk/configure
==============================================================================
--- trunk/configure	Sun Mar 17 23:47:17 2013	(r35997)
+++ trunk/configure	Sun Mar 17 23:47:31 2013	(r35998)
@@ -4143,7 +4143,7 @@ echores "$_select"
 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"
 


More information about the MPlayer-cvslog mailing list