mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-02-04 01:47:02 +03:00
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
This commit is contained in:
parent
f5a457a3ac
commit
8c1ae606be
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
25
xmllint.c
25
xmllint.c
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user