* types.h: Add initializer macros for 64-bit unsigned type.
authorDavid Shaw <dshaw@jabberwocky.com>
Wed, 14 May 2003 04:32:32 +0000 (04:32 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Wed, 14 May 2003 04:32:32 +0000 (04:32 +0000)
include/ChangeLog
include/types.h

index f495540..47f1b46 100644 (file)
@@ -1,3 +1,7 @@
+2003-05-14  David Shaw  <dshaw@jabberwocky.com>
+
+       * types.h: Add initializer macros for 64-bit unsigned type.
+
 2003-05-02  David Shaw  <dshaw@jabberwocky.com>
 
        * cipher.h: Add constants for compression algorithms.
index 0b4f6a4..83c0977 100644 (file)
@@ -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
   #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