mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-28 18:40:03 +01:00
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:
parent
2c958470d2
commit
233611fe42
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user