From 911cc7e6ab85bb0622bd54a639941b407f0366e7 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Wed, 12 Feb 2003 04:45:51 +0000 Subject: [PATCH] * types.h: Try and use uint64_t for a 64-bit type. --- include/ChangeLog | 4 ++++ include/types.h | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/include/ChangeLog b/include/ChangeLog index f043ddc5c..97ae7b63f 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2003-02-11 David Shaw + + * types.h: Try and use uint64_t for a 64-bit type. + 2003-02-04 David Shaw * cipher.h: Add constants for new SHAs. diff --git a/include/types.h b/include/types.h index b41109ee5..0b4f6a485 100644 --- a/include/types.h +++ b/include/types.h @@ -21,6 +21,10 @@ #ifndef G10_TYPES_H #define G10_TYPES_H +#if HAVE_INTTYPES_H +/* For uint64_t */ +#include +#endif /* The AC_CHECK_SIZEOF() in configure fails for some machines. * we provide some fallback values here */ @@ -106,6 +110,9 @@ #elif SIZEOF_UNSIGNED_LONG_LONG == 8 typedef unsigned long long u64; #define HAVE_U64_TYPEDEF + #elif SIZEOF_UINT64_T == 8 + typedef uint64_t u64; + #define HAVE_U64_TYPEDEF #endif #endif