4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-21 00:07:36 +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
..
2020-09-23 15:08:59 -04:00
2018-03-14 10:46:32 -05:00
2018-01-17 11:47:30 -06:00
2016-04-04 10:25:27 -05:00
2020-07-16 11:27:38 +02:00
2018-09-06 14:11:45 +02:00
2016-11-22 14:21:35 +01:00
2018-01-17 11:47:13 -06:00
2016-10-25 16:24:05 +02:00
2016-04-04 10:25:29 -05:00