Add alternate timestamp implementations

Add mach_absolute_time and gettimeofday timestamp implementations, and
fix clock_gettime check so that it can actually succeed
This commit is contained in:
Quentin Smith
2012-02-26 00:29:29 -05:00
committed by Keith Winstein
parent 26e9e91adb
commit 582bf347c9
4 changed files with 45 additions and 3 deletions
+8 -1
View File
@@ -70,7 +70,14 @@ AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_MBRTOWC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([clock_gettime gettimeofday inet_ntoa iswprint memchr memset nl_langinfo setenv setlocale socket strchr strdup strerror strtol wcwidth])
AC_CHECK_FUNCS([gettimeofday inet_ntoa iswprint memchr memset nl_langinfo setenv setlocale socket strchr strdup strerror strtol wcwidth])
AC_SEARCH_LIBS([clock_gettime], [rt], [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Define if clock_gettime is available.])])
AC_CHECK_DECL([mach_absolute_time],
[AC_DEFINE([HAVE_MACH_ABSOLUTE_TIME], [1],
[Define if mach_absolute_time is available.])],
, [[#include <mach/mach_time.h>]])
AC_CHECK_DECL([htobe64],
[AC_DEFINE([HAVE_HTOBE64], [1],