Commit 8c1ae606 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

trying to fix #71457 for timing precision when gettimeofday() is not

* configure.in xmllint.c: trying to fix #71457 for timing
  precision when gettimeofday() is not availble but ftime() is
Daniel
parent f5a457a3
Thu Mar 7 12:19:36 CET 2002 Daniel Veillard <daniel@veillard.com>
* configure.in xmllint.c: trying to fix #71457 for timing
precision when gettimeofday() is not availble but ftime() is
Thu Mar 7 11:24:02 CET 2002 Daniel Veillard <daniel@veillard.com>
* libxml.spec.in doc/Makefile.am: Fixed #73408 missing images
......
......@@ -87,7 +87,7 @@ AC_CHECK_HEADERS(stdarg.h sys/stat.h sys/types.h time.h ansidecl.h)
AC_CHECK_HEADERS(ieeefp.h nan.h math.h fp_class.h float.h)
AC_CHECK_HEADERS(stdlib.h sys/socket.h netinet/in.h arpa/inet.h)
AC_CHECK_HEADERS(netdb.h sys/time.h sys/select.h sys/mman.h)
AC_CHECK_HEADERS(signal.h)
AC_CHECK_HEADERS(sys/timeb.h signal.h)
dnl Specific dir for HTML output ?
if test "x$with_html_dir" = "x" ; then
......@@ -102,7 +102,7 @@ dnl Checks for library functions.
AC_FUNC_STRFTIME
AC_CHECK_FUNCS(strdup strndup strerror)
AC_CHECK_FUNCS(finite isnand fp_class class fpclass)
AC_CHECK_FUNCS(strftime localtime)
AC_CHECK_FUNCS(strftime localtime ftime)
AC_CHECK_FUNCS(stat _stat signal)
dnl Checking the standard string functions availability
......
......@@ -129,6 +129,31 @@ static const char *output = NULL;
* function calls
*/
#ifndef HAVE_GETTIMEOFDAY
#ifdef HAVE_SYS_TIMEB_H
#ifdef HAVE_SYS_TIME_H
#ifdef HAVE_FTIME
int
my_gettimeofday(struct timeval *tvp, void *tzp)
{
struct timeb timebuffer;
ftime(&timebuffer);
if (tvp) {
tvp->tv_sec = timebuffer.time;
tvp->tv_usec = timebuffer.millitm * 1000L;
}
return (0);
}
#define HAVE_GETTIMEOFDAY 1
#define gettimeofday my_gettimeofday
#endif /* HAVE_FTIME */
#endif /* HAVE_SYS_TIME_H */
#endif /* HAVE_SYS_TIMEB_H */
#endif /* !HAVE_GETTIMEOFDAY */
#if defined(HAVE_GETTIMEOFDAY)
static struct timeval begin, end;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment