From 233611fe421df9dcdf59b50288504519d9a3ee8d Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 6 Jan 2022 13:22:23 +0000 Subject: [PATCH] tests: Fix compilation failure on msys2-mingw64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Fixes: #2565 --- glib/tests/array-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/tests/array-test.c b/glib/tests/array-test.c index 79c5c31c3..284ac0809 100644 --- a/glib/tests/array-test.c +++ b/glib/tests/array-test.c @@ -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;