Incorrect test for lock-free atomics
gatomic.h uses __sync_bool_compare_and_swap in its definition of g_atomic_int_compare_and_exchange. meson.build correctly tests for it. gatomic.c then fails to build if the macro __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 which isn't used is defined or not.
Use of __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 should just be jettisoned.
This could become a long list of operating systems.
c.f.
- http://gnats.netbsd.org/54298
- http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/glib2/patches/patch-glib_gatomic.h
- http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/glib2/patches/patch-glib_gatomic.c
- (part of) http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/glib2/patches/patch-meson.build
(I find it amusing that clang defines that __GCC macro - presumably to get around such tests.)