Don't assume UINT64_C available
David Shaw
dshaw at jabberwocky.com
Tue Sep 2 21:51:01 CEST 2003
On Tue, Sep 02, 2003 at 01:27:07PM -0500, Albert Chin wrote:
> Tru64 UNIX doesn't have the UINT64_C() macro.
Tru64 has uint64_t but not UINT64_C ? I think that violates POSIX.
I like this patch better since it doesn't assume that uint64_t is an
unsigned long long (which may not be true):
Index: include/types.h
===================================================================
RCS file: /cvs/gnupg/gnupg/include/types.h,v
retrieving revision 1.15.2.3
diff -u -r1.15.2.3 types.h
--- include/types.h 26 Jun 2003 20:25:28 -0000 1.15.2.3
+++ include/types.h 2 Sep 2003 18:48:03 -0000
@@ -101,7 +101,7 @@
*/
#ifndef HAVE_U64_TYPEDEF
#undef u64 /* maybe there is a macro with this name */
-#if SIZEOF_UINT64_T == 8
+#if SIZEOF_UINT64_T == 8 && defined(UINT64_C)
typedef uint64_t u64;
#define U64_C(c) (UINT64_C(c))
#define HAVE_U64_TYPEDEF
David
More information about the Gnupg-devel
mailing list