From d58fcca2d59faae030d3cbeb68da6a7c63c906d7 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Mon, 26 Nov 2018 14:15:55 +0000 Subject: [PATCH] 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. --- include/boost/predef/os/linux.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/boost/predef/os/linux.h b/include/boost/predef/os/linux.h index a297d08..f945f01 100644 --- a/include/boost/predef/os/linux.h +++ b/include/boost/predef/os/linux.h @@ -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