From 2e22d6d78d636d0f5a1d2602d4906a3192ab3da6 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Wed, 26 Jul 2023 16:49:16 -0400 Subject: [PATCH] Fix #1396, do not use intmax_t/uintmax_t types Replace these with long and unsigned long, respectively, as some old systems might not have these types even if it does provide stdint.h --- ut_assert/src/utassert.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ut_assert/src/utassert.c b/ut_assert/src/utassert.c index ae298ff4c..aaec81cf3 100644 --- a/ut_assert/src/utassert.c +++ b/ut_assert/src/utassert.c @@ -45,8 +45,8 @@ static char CurrentSegment[64]; typedef union { - intmax_t s; /**< If value is signed */ - uintmax_t u; /**< If value is unsigned */ + long s; /**< If value is signed */ + unsigned long u; /**< If value is unsigned */ } UtAssert_IntBuf_t; #define UT_COMPARE_TYPE(t, s) (((t) << 1) | (s)) @@ -417,7 +417,7 @@ static const char *UtAssert_GetValueText(char *TempBuf, size_t TempSz, UT_IntChe return TempBuf; } -static bool UtAssert_DoCompare(intmax_t ActualValueIn, UtAssert_Compare_t CompareType, UT_IntCheck_t ReferenceValueIn, +static bool UtAssert_DoCompare(long ActualValueIn, UtAssert_Compare_t CompareType, UT_IntCheck_t ReferenceValueIn, bool IsUnsigned) { bool Result;