]> git.draconx.ca Git - cdecl99.git/commitdiff
libcdecl: Try unsigned __int64 for a 64-bit type.
authorNick Bowler <nbowler@draconx.ca>
Sat, 27 Jan 2024 03:59:21 +0000 (22:59 -0500)
committerNick Bowler <nbowler@draconx.ca>
Sat, 27 Jan 2024 03:59:21 +0000 (22:59 -0500)
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.

configure.ac
src/cdecl.h
t/test.h

index aed400e86e0150fe2397ef348129e9a3b489a61a..8e4286b7cb49c1b9dba01c7a60e67d48d0a9b87d 100644 (file)
@@ -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
index 952b0aab6020a6b4a5bc68cf6b12356d2bc77026..39902f5607e35c3c9365a921fe9ffe71a13613db 100644 (file)
@@ -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
index 32b4e8cb959fdf4600eeddb779c104089d53e6be..2a872f7f22450dbfd9d557c4fefc28af552bdfe2 100644 (file)
--- 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