Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d58fcca

Browse filesBrowse files
xnoxgrafikrobot
authored andcommitted
os/linux: add more linux detection defines. (boostorg#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.
1 parent aa94d69 commit d58fcca
Copy full SHA for d58fcca

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Collapse file

‎include/boost/predef/os/linux.h‎

Copy file name to clipboardExpand all lines: include/boost/predef/os/linux.h
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,16 @@ Distributed under the Boost Software License, Version 1.0.
2121
2222
[[`linux`] [__predef_detection__]]
2323
[[`__linux`] [__predef_detection__]]
24+
[[`__linux__`] [__predef_detection__]]
25+
[[`__gnu_linux__`] [__predef_detection__]]
2426
]
2527
*/
2628

2729
#define BOOST_OS_LINUX BOOST_VERSION_NUMBER_NOT_AVAILABLE
2830

2931
#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
30-
defined(linux) || defined(__linux) \
32+
defined(linux) || defined(__linux) || \
33+
defined(__linux__) || defined(__gnu_linux__) \
3134
)
3235
# undef BOOST_OS_LINUX
3336
# define BOOST_OS_LINUX BOOST_VERSION_NUMBER_AVAILABLE

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.