[PATCH 5/5] Handle systems which have uint64_t but not the UINT64_C macro.

Thomas Klausner tk at giga.or.at
Sat Oct 27 19:56:11 CEST 2012


From: Thomas Klausner <wiz at NetBSD.org>

This could happen with UNIX98-type systems, such as the code on
the netbsd-1-5 branch, and would prevent this package from building
on such systems.
---
 include/types.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/types.h b/include/types.h
index d6cd073..aea5515 100644
--- a/include/types.h
+++ b/include/types.h
@@ -102,7 +102,12 @@ typedef unsigned long u32;
 #undef u64	    /* maybe there is a macro with this name */
 #if SIZEOF_UINT64_T == 8
 typedef uint64_t u64;
+#ifdef UINT64_C
 #define U64_C(c) (UINT64_C(c))
+#else
+	/* make a best guess, could happen with UNIX98 <inttypes.h> */
+#define U64_C(c) (c)
+#endif
 #define HAVE_U64_TYPEDEF
 #elif SIZEOF_UNSIGNED_INT == 8
 typedef unsigned int u64;
-- 
1.7.12.2




More information about the Gnupg-devel mailing list