diff options
author | Thomas Klausner <[email protected]> | 2012-10-27 17:56:11 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2012-11-06 16:55:31 +0000 |
commit | 6a41f385c496c180ee730ce80ff5653746410759 (patch) | |
tree | ff715aee63d6a3831d0dca5b9b5dfc5faded3dff | |
parent | Indent nested cpp directives for better readability. (diff) | |
download | gnupg-6a41f385c496c180ee730ce80ff5653746410759.tar.gz gnupg-6a41f385c496c180ee730ce80ff5653746410759.zip |
Handle systems which have uint64_t but not the UINT64_C macro.
* include/types.h (U64_C) [!UINT64_C]: Add simple replacement.
--
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.
-rw-r--r-- | include/types.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/types.h b/include/types.h index 7d938653a..6baccdbbb 100644 --- a/include/types.h +++ b/include/types.h @@ -101,9 +101,14 @@ 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)) -# define HAVE_U64_TYPEDEF -# elif SIZEOF_UNSIGNED_INT == 8 +# 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; # define U64_C(c) (c ## U) # define HAVE_U64_TYPEDEF |