From 5ef3b00332e134a574ed264b142ed7e9263febc5 Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Sat, 20 Oct 2001 21:28:09 +0000 Subject: [PATCH] Add check for stdint.h, since Solaris doesn't have it. This is needed on Linux for uint64_t, but Solaris defines this in sys/types.h. Use check where appropriate, and also add typedefs for Win32. svn path=/trunk/timing/; revision=2206 --- timing/timing.c | 6 ++++-- timing/timing.h | 9 ++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/timing/timing.c b/timing/timing.c index 9ac5d7b..2e3ff0d 100644 --- a/timing/timing.c +++ b/timing/timing.c @@ -3,13 +3,15 @@ */ #include -#include #include #include #include +#ifdef HAVE_STDINT_H +# include +#endif #ifdef _WIN32 -#include +# include #endif #include "timing.h" diff --git a/timing/timing.h b/timing/timing.h index 051d911..1febca1 100644 --- a/timing/timing.h +++ b/timing/timing.h @@ -1,7 +1,14 @@ #ifndef __TIMING_H__ #define __TIMING_H__ -#include +#include +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef _WIN32 +typedef int64_t __int64; +typedef uint64_t unsigned __int64; +#endif uint64_t timing_get_time(void); void timing_sleep(uint64_t sleeptime);