tests: Fix compilation failure on msys2-mingw64

This is a follow-up from commit 995823b9d9, which added the condition
```
```
to the array test. On most platforms, both of those symbols are numeric
literals, but on 64-bit Windows `G_MAXSIZE` includes some widening
casts, which means it can’t be used in a preprocessor condition.

We don’t expose an appropriate symbol in `glibconfig.h` which could be
used instead, but the standard `*_WIDTH` symbols from `limits.h` will be
identical and can be used instead.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #2565
This commit is contained in:
Philip Withnall 2022-01-06 13:22:23 +00:00
parent 2c958470d2
commit 233611fe42

View File

@ -1685,7 +1685,7 @@ pointer_array_steal_index (void)
static void
byte_array_new_take_overflow (void)
{
#if G_MAXSIZE <= G_MAXUINT
#if SIZE_WIDTH <= UINT_WIDTH
g_test_skip ("Overflow test requires G_MAXSIZE > G_MAXUINT.");
#else
GByteArray* arr;