Bug 900965 - compile failures with gcc 4.6.3 on std::atomic enum support from bug 888548 r=waldo

This commit is contained in:
Nathan Froyd 2013-08-02 18:18:41 -07:00
parent ccba191386
commit a53f776d48

View File

@ -43,12 +43,17 @@
# endif
/*
* Android uses a different C++ standard library that does not provide
* support for <atomic>
* support for <atomic>.
*
* GCC 4.5.x and 4.6.x's unspecialized std::atomic template doesn't include
* inline definitions for the functions declared therein. This oversight
* leads to linking errors when using atomic enums. We therefore require
* GCC 4.7 or higher.
*/
#elif defined(__GNUC__) && !defined(__ANDROID__)
# include "mozilla/Compiler.h"
# if (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) && \
MOZ_GCC_VERSION_AT_LEAST(4, 5, 2)
MOZ_GCC_VERSION_AT_LEAST(4, 7, 0)
# define MOZ_HAVE_CXX11_ATOMICS
# endif
#elif defined(_MSC_VER) && _MSC_VER >= 1700