Fix redef of OS_BSD predef.

When a BSD sub-os header is included directly the general
OS_BSD predef is inidially defined as not-available. Which
warns as the sub-os header defines it. The fix is to unconditionally
un-def the OS_BSD predef.

fixes https://github.com/boostorg/predef/issues/111
This commit is contained in:
Rene Rivera
2021-01-04 14:37:33 -06:00
parent e697cafd12
commit d990549214
8 changed files with 79 additions and 6 deletions
+1
View File
@@ -29,6 +29,7 @@ http://en.wikipedia.org/wiki/BSD/OS[BSDi BSD/OS] operating system.
defined(__bsdi__) \
)
# ifndef BOOST_OS_BSD_AVAILABLE
# undef BOOST_OS_BSD
# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
# define BOOST_OS_BSD_AVAILABLE
# endif
+1
View File
@@ -29,6 +29,7 @@ http://en.wikipedia.org/wiki/DragonFly_BSD[DragonFly BSD] operating system.
defined(__DragonFly__) \
)
# ifndef BOOST_OS_BSD_AVAILABLE
# undef BOOST_OS_BSD
# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
# define BOOST_OS_BSD_AVAILABLE
# endif
+1
View File
@@ -31,6 +31,7 @@ http://en.wikipedia.org/wiki/Freebsd[FreeBSD] operating system.
defined(__FreeBSD__) \
)
# ifndef BOOST_OS_BSD_AVAILABLE
# undef BOOST_OS_BSD
# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
# define BOOST_OS_BSD_AVAILABLE
# endif
+1
View File
@@ -36,6 +36,7 @@ http://en.wikipedia.org/wiki/Netbsd[NetBSD] operating system.
defined(__NETBSD__) || defined(__NetBSD__) \
)
# ifndef BOOST_OS_BSD_AVAILABLE
# undef BOOST_OS_BSD
# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
# define BOOST_OS_BSD_AVAILABLE
# endif
+1
View File
@@ -80,6 +80,7 @@ http://en.wikipedia.org/wiki/Openbsd[OpenBSD] operating system.
defined(__OpenBSD__) \
)
# ifndef BOOST_OS_BSD_AVAILABLE
# undef BOOST_OS_BSD
# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
# define BOOST_OS_BSD_AVAILABLE
# endif