From: Nick Bowler Date: Sat, 27 Jan 2024 03:59:21 +0000 (-0500) Subject: libcdecl: Try unsigned __int64 for a 64-bit type. X-Git-Tag: v1.3~17 X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/commitdiff_plain/9786185611c072036751fdfcc1731158a0c2d20c libcdecl: Try unsigned __int64 for a 64-bit type. Windows compilers provide __int64 which may be available even if long long is not. While we don't yet build out of the box on these compilers, let's try to avoid having the library ABI degrade to 32-bit unsigned long when the build failures are fixed. --- diff --git a/configure.ac b/configure.ac index aed400e..8e4286b 100644 --- a/configure.ac +++ b/configure.ac @@ -29,6 +29,7 @@ gl_EARLY AC_HEADER_ASSERT AC_TYPE_UNSIGNED_LONG_LONG_INT +AC_CHECK_TYPES([unsigned __int64]) AC_C_FLEXIBLE_ARRAY_MEMBER AC_C_INLINE DX_C_FOR_DECLARATIONS diff --git a/src/cdecl.h b/src/cdecl.h index 952b0aa..39902f5 100644 --- a/src/cdecl.h +++ b/src/cdecl.h @@ -35,6 +35,8 @@ typedef signed char cdecl_bool; #if HAVE_UNSIGNED_LONG_LONG_INT typedef unsigned long long cdecl_uintmax; +#elif HAVE_UNSIGNED___INT64 +typedef unsigned __int64 cdecl_uintmax; #else typedef unsigned long cdecl_uintmax; #endif diff --git a/t/test.h b/t/test.h index 32b4e8c..2a872f7 100644 --- a/t/test.h +++ b/t/test.h @@ -36,6 +36,8 @@ */ #if HAVE_UNSIGNED_LONG_LONG_INT typedef unsigned long long test_uintmax; +#elif HAVE_UNSIGNED___INT64 +typedef unsigned __int64 test_uintmax; #else typedef unsigned long test_uintmax; #endif