From 5e9b4bd1599af9709b0e1c6588ca0f6ecdfd14ce Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Wed, 30 Apr 2003 20:05:52 +0000 Subject: [PATCH] use autoconf to check for struct timespec --- ChangeLog | 3 +++ configure.ac | 1 + libmve/mveplay.c | 16 +++++++++------- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 16041038..c9b4a49c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ 2003-04-30 Bradley Bell + * configure.ac, libmve/mveplay.c: use autoconf to check for struct + timespec + * Makefile.am, NEWS, README, configure.ac: fix linking bug, increment version number diff --git a/configure.ac b/configure.ac index d842bb28..948b0cca 100644 --- a/configure.ac +++ b/configure.ac @@ -37,6 +37,7 @@ AC_STDC_HEADERS AC_PATH_PROGS(NASM, nasm nasmw, no) AC_C_BIGENDIAN AC_CHECK_DECLS(nanosleep) +AC_CHECK_TYPES(struct timespec) case $host_cpu in sparc) diff --git a/libmve/mveplay.c b/libmve/mveplay.c index 8c6d48b9..b377a394 100644 --- a/libmve/mveplay.c +++ b/libmve/mveplay.c @@ -1,4 +1,4 @@ -/* $Id: mveplay.c,v 1.10 2003-04-29 08:05:41 btb Exp $ */ +/* $Id: mveplay.c,v 1.11 2003-04-30 20:05:52 btb Exp $ */ #ifdef HAVE_CONFIG_H #include #endif @@ -130,6 +130,14 @@ static int micro_frame_delay=0; static int timer_started=0; static struct timeval timer_expire = {0, 0}; +#if !HAVE_STRUCT_TIMESPEC +struct timespec +{ + long int tv_sec; /* Seconds. */ + long int tv_nsec; /* Nanoseconds. */ +}; +#endif + #if defined(HAVE_DECL_NANOSLEEP) && !HAVE_DECL_NANOSLEEP int nanosleep(struct timespec *ts, void *rem); #endif @@ -137,12 +145,6 @@ int nanosleep(struct timespec *ts, void *rem); #ifdef __WIN32 #include -struct timespec -{ - long int tv_sec; /* Seconds. */ - long int tv_nsec; /* Nanoseconds. */ -}; - int gettimeofday(struct timeval *tv, void *tz) { static int counter = 0; -- 2.39.2