aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/ChangeLog4
-rw-r--r--include/types.h6
2 files changed, 9 insertions, 1 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index f495540f9..47f1b4661 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2003-05-14 David Shaw <[email protected]>
+
+ * types.h: Add initializer macros for 64-bit unsigned type.
+
2003-05-02 David Shaw <[email protected]>
* cipher.h: Add constants for compression algorithms.
diff --git a/include/types.h b/include/types.h
index 0b4f6a485..83c0977da 100644
--- a/include/types.h
+++ b/include/types.h
@@ -21,7 +21,7 @@
#ifndef G10_TYPES_H
#define G10_TYPES_H
-#if HAVE_INTTYPES_H
+#ifdef HAVE_INTTYPES_H
/* For uint64_t */
#include <inttypes.h>
#endif
@@ -103,15 +103,19 @@
#undef u64 /* maybe there is a macro with this name */
#if SIZEOF_UNSIGNED_INT == 8
typedef unsigned int u64;
+ #define U64_C(c) (c ## U)
#define HAVE_U64_TYPEDEF
#elif SIZEOF_UNSIGNED_LONG == 8
typedef unsigned long u64;
+ #define U64_C(c) (c ## UL)
#define HAVE_U64_TYPEDEF
#elif SIZEOF_UNSIGNED_LONG_LONG == 8
typedef unsigned long long u64;
+ #define U64_C(c) (c ## ULL)
#define HAVE_U64_TYPEDEF
#elif SIZEOF_UINT64_T == 8
typedef uint64_t u64;
+ #define U64_C(c) (UINT64_C(c))
#define HAVE_U64_TYPEDEF
#endif
#endif