4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-03-05 22:46:03 +08:00
jhb c25de3a3c5 Make the system C11 atomics headers fully compatible with external GCC.
The <sys/cdefs.h> and <stdatomic.h> headers already included support for
C11 atomics via intrinsincs in modern versions of GCC, but these versions
tried to "hide" atomic variables inside a wrapper structure.  This wrapper
is not compatible with GCC's internal <stdatomic.h> header, so that if
GCC's <stdatomic.h> was used together with <sys/cdefs.h>, use of C11
atomics would fail to compile.  Fix this by not hiding atomic variables
in a structure for modern versions of GCC.  The headers already avoid
using a wrapper structure on clang.

Note that this wrapper was only used if C11 was not enabled (e.g.
via -std=c99), so this also fixes compile failures if a modern version
of GCC was used with -std=c11 but with FreeBSD's <stdatomic.h> instead
of GCC's <stdatomic.h> and this change fixes that case as well.

Reported by:	Mark Millard
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D16585
2020-10-26 14:18:45 +01:00
..
2016-10-25 16:24:05 +02:00
2019-11-04 07:03:15 +01:00
2018-01-17 11:47:13 -06:00
2018-01-17 11:47:17 -06:00
2018-01-17 11:47:17 -06:00
2019-11-04 07:03:15 +01:00
2018-01-17 11:47:13 -06:00
2019-06-07 09:13:13 +02:00
2020-08-25 20:54:33 +02:00
2015-05-28 16:40:43 +02:00