From 809a64d5911496a24617e3158e719e93c161e582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Sun, 17 Sep 2006 13:01:07 +0000 Subject: DVDNAV changes: improve MinGW support, kFreeBSD support define HAVE_* when provided replacement functions in xine-lib CVS patchset: 8268 CVS date: 2006/09/17 13:01:07 --- src/input/libdvdnav/dvdnav_internal.h | 41 +++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 12 deletions(-) (limited to 'src/input/libdvdnav/dvdnav_internal.h') diff --git a/src/input/libdvdnav/dvdnav_internal.h b/src/input/libdvdnav/dvdnav_internal.h index 35d9f3470..d6e8bef5b 100644 --- a/src/input/libdvdnav/dvdnav_internal.h +++ b/src/input/libdvdnav/dvdnav_internal.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: dvdnav_internal.h,v 1.15 2004/09/20 19:30:04 valtri Exp $ + * $Id: dvdnav_internal.h,v 1.16 2006/09/17 13:01:08 valtri Exp $ * */ @@ -34,6 +34,34 @@ #include #include +#ifndef HAVE_GETTIMEOFDAY +# ifdef WIN32 +# include +struct timezone; +# else +# include +# endif +/* replacement gettimeofday implementation */ +#include +static inline int dvdnav_private_gettimeofday( struct timeval *tv, void *tz ) +{ + struct timeb t; + ftime( &t ); + tv->tv_sec = t.time; + tv->tv_usec = t.millitm * 1000; + return 0; +} +#define gettimeofday(TV, TZ) dvdnav_private_gettimeofday((TV), (TZ)) +#define HAVE_GETTIMEOFDAY 1 +#endif + +#ifndef HAVE_SNPRINTF +# ifdef HAVE__SNPRINTF +# define snprintf _snprintf +# define HAVE_SNPRINTF 1 +# endif +#endif + #ifdef WIN32 /* pthread_mutex_* wrapper for win32 */ @@ -45,17 +73,6 @@ typedef CRITICAL_SECTION pthread_mutex_t; #define pthread_mutex_unlock(a) LeaveCriticalSection(a) #define pthread_mutex_destroy(a) -/* replacement gettimeofday implementation */ -#include -static inline int _private_gettimeofday( struct timeval *tv, void *tz ) -{ - struct timeb t; - ftime( &t ); - tv->tv_sec = t.time; - tv->tv_usec = t.millitm * 1000; - return 0; -} -#define gettimeofday(TV, TZ) _private_gettimeofday((TV), (TZ)) #include /* read() */ #define lseek64 _lseeki64 -- cgit v1.2.3