From: 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://gcc.gnu.org/git/?a=commitdiff_plain;h=12c458dd55aea24a9a135bc859190e7e577870ed;p=gcc-old.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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@279885 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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