os/linux: add more linux detection defines. (#91)

Some releases of g++, on some platforms, whilst running under some
standards, may not define neither linux, nor __linux. Add detections
for __linux__ and __gnu_linux__ for robustness.
This commit is contained in:
Dimitri John Ledkov
2018-11-26 14:15:55 +00:00
committed by Rene Rivera
parent aa94d69718
commit d58fcca2d5

View File

@ -21,13 +21,16 @@ http://www.boost.org/LICENSE_1_0.txt)
[[`linux`] [__predef_detection__]]
[[`__linux`] [__predef_detection__]]
[[`__linux__`] [__predef_detection__]]
[[`__gnu_linux__`] [__predef_detection__]]
]
*/
#define BOOST_OS_LINUX BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
defined(linux) || defined(__linux) \
defined(linux) || defined(__linux) || \
defined(__linux__) || defined(__gnu_linux__) \
)
# undef BOOST_OS_LINUX
# define BOOST_OS_LINUX BOOST_VERSION_NUMBER_AVAILABLE