From: Olivier Hainque Date: Sun, 5 Jan 2020 12:45:54 +0000 (+0000) Subject: Guard inclusion of vxAtomicLib.h from gthr-vxworks.h X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5205a4456b555b5b123ee3ec759e5c74dbd01057;p=gcc.git Guard inclusion of vxAtomicLib.h from gthr-vxworks.h 2020-01-05 Olivier Hainque * config/gthr-vxworks.h: Guard #include vxAtomicLib.h by IN_LIBGCC2. From-SVN: r279885 --- diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index e2e67ab9c3f..ae2099d4e5b 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2020-01-05 Olivier Hainque + + * config/gthr-vxworks.h: Guard #include vxAtomicLib.h + by IN_LIBGCC2. + 2020-01-01 Jakub Jelinek Update copyright years. diff --git a/libgcc/config/gthr-vxworks.h b/libgcc/config/gthr-vxworks.h index 4b2cd769cac..8b55fc55407 100644 --- a/libgcc/config/gthr-vxworks.h +++ b/libgcc/config/gthr-vxworks.h @@ -70,7 +70,14 @@ typedef volatile unsigned char __vx_tas_t; #define __TAS(x) vxAtomicCas ((x), 0, 1) typedef atomic_t __vx_tas_t; +/* Our implementation will need the system headers to use the vxAtomic + primitives. Other includers won't and could actually be incompatible + with this inclusion, for instance libstdc++ sources compiled in C++ + 98 mode while AtomicLib for C++ requires C++ 11 at least. */ + +#if defined(IN_LIBGCC2) #include +#endif #endif