From 50eb784bfcf15ee3c6b0b53d747db92673395040 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 20 Feb 2017 00:05:34 -0800 Subject: Import Upstream version 5e3 --- time.c | 47 ++++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) (limited to 'time.c') diff --git a/time.c b/time.c index abb5684..75bf603 100644 --- a/time.c +++ b/time.c @@ -101,6 +101,9 @@ # include # include # include +# include +# include +# define CLKTCK (sysconf(_SC_CLK_TCK)) # define USE_GETTIMEOFDAY #endif #ifdef __MACH__ @@ -153,8 +156,8 @@ # define LACK_FTIME #endif #ifdef PLAN9 -#define LACK_FTIME -#define LACK_TIMES +# define LACK_FTIME +# define LACK_TIMES #endif #ifdef nosve # define LACK_FTIME @@ -219,30 +222,32 @@ # define LACK_FTIME #endif -#ifdef CLK_TCK -# define CLKTCK CLK_TCK -# ifdef CLOCKS_PER_SEC -# ifdef HAVE_UNIX -# ifndef ARM_ULIB -# include -# endif -# define LACK_CLOCK +#ifndef CLKTCK +# ifdef CLK_TCK +# define CLKTCK CLK_TCK +# ifdef CLOCKS_PER_SEC +# ifdef HAVE_UNIX +# ifndef ARM_ULIB +# include +# endif +# define LACK_CLOCK /* This is because clock() might be POSIX rather than ANSI. This occurs on HP-UX machines */ +# endif # endif -# endif -#else -# ifdef CLOCKS_PER_SEC -# define CLKTCK CLOCKS_PER_SEC # else -# define LACK_CLOCK -# ifdef AMIGA -# include -# define LACK_TIMES -# define LACK_FTIME -# define CLKTCK 1000 +# ifdef CLOCKS_PER_SEC +# define CLKTCK CLOCKS_PER_SEC # else -# define CLKTCK 60 +# define LACK_CLOCK +# ifdef AMIGA +# include +# define LACK_TIMES +# define LACK_FTIME +# define CLKTCK 1000 +# else +# define CLKTCK 60 +# endif # endif # endif #endif -- cgit v1.2.3