From: Robert Pengelly Date: Mon, 26 Jan 2026 23:53:50 +0000 (+0000) Subject: Fix for 64-bit check X-Git-Url: https://git.candlhat.org/?a=commitdiff_plain;h=c8eeaf1ac604368a1006545b28ddcb417bb78ebd;p=sasm.git Fix for 64-bit check --- diff --git a/inttypes.h b/inttypes.h index 34d387c..2ff8fed 100644 --- a/inttypes.h +++ b/inttypes.h @@ -9,7 +9,7 @@ # define I64_FMT "I64" #elif defined (__PRI_64_LENGTH_MODIFIER__) /* Mac */ # define I64_FMT __PRI_64_LENGTH_MODIFIER__ -#elif (defined (SIZEOF_LONG) && SIZEOF_LONG >= 8) || ULONG_MAX > 4294967295UL +#elif (defined (SIZEOF_LONG) && SIZEOF_LONG >= 8) || ((ULONG_MAX >> 16) >> 16) == 0xffffffff # define I64_FMT "l" #else # define I64_FMT "ll" diff --git a/stdint.h b/stdint.h index fc8eb0a..164c733 100644 --- a/stdint.h +++ b/stdint.h @@ -28,7 +28,7 @@ typedef unsigned long uint32_t; #ifndef _INT64_T #define _INT64_T -#if defined (NO_LONG_LONG) || ULONG_MAX > 4294967295UL +#if defined (NO_LONG_LONG) || ((ULONG_MAX >> 16) >> 16) == 0xffffffff typedef signed long int64_t; #else typedef signed long long int64_t; @@ -37,7 +37,7 @@ typedef signed long long int64_t; #ifndef _UINT64_T #define _UINT64_T -#if defined (NO_LONG_LONG) || ULONG_MAX > 4294967295UL +#if defined (NO_LONG_LONG) || ((ULONG_MAX >> 16) >> 16) == 0xffffffff typedef unsigned long uint64_t; #else typedef unsigned long long uint64_t;