Merge of various bug fixes dealing with mis-detection of BSD on OSX. Fix some documentation typos.

[SVN r86315]
This commit is contained in:
Rene Rivera
2013-10-15 05:23:53 +00:00
parent 79a9679838
commit da07531618
32 changed files with 310 additions and 106 deletions
+21 -4
View File
@@ -4,19 +4,34 @@
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
local predef-include-root ;
local predef-dependency ;
# When using modular layout, header files are not present in $root/boost
# unlink links are created, therefore instead of direct dependency on
# a header, we need to use dependency on metatarget.
if $(BOOST_PREDEF_ROOT)
{
path-constant BOOST_PREDEF_INCLUDE_ROOT : $(BOOST_PREDEF_ROOT)/include ;
predef-include-root = $(BOOST_PREDEF_ROOT)/include ;
predef-dependency = $(predef-include-root)/boost/predef.h ;
}
else if $(BOOST_MODULARLAYOUT)
{
predef-include-root = $(BOOST_ROOT)/include ;
predef-dependency = /boost//predef-headers ;
}
else
{
path-constant BOOST_PREDEF_INCLUDE_ROOT : $(BOOST_ROOT) ;
predef-include-root = $(BOOST_ROOT) ;
predef-dependency = $(predef-include-root)/boost/predef.h ;
}
project test
: requirements
<include>$(BOOST_PREDEF_INCLUDE_ROOT)
<dependency>$(BOOST_PREDEF_INCLUDE_ROOT)/boost/predef.h
<include>$(predef-include-root)
# Add explicit dependency since we don't have header scanner for
# .m and .mm files.
<dependency>$(predef-dependency)
;
using testing ;
@@ -28,4 +43,6 @@ test-suite predef :
[ run info_as_objc.m : : : <test-info>always_show_run_output ]
[ run version.cpp ]
[ run make.cpp ]
[ compile macos_endian.c ]
[ compile macos_vs_bsd.c ]
;
+21
View File
@@ -0,0 +1,21 @@
/*
Copyright Redshift Software Inc. 2013
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
/*
* OSX can define the BSD symbols if sys/param.h is included
* before detection. This causes the endian detection to misfire
* as both MACOS and BSD are "detected" (currently). This just
* tests that the sys/param.h include can be included before
* endian detection and still have it work correctly.
*/
#if defined(__APPLE__)
# include <sys/param.h>
# include <boost/predef/os/bsd.h>
# include <boost/predef/os/macos.h>
# include <boost/predef/other/endian.h>
#endif
+19
View File
@@ -0,0 +1,19 @@
/*
Copyright Redshift Software Inc. 2013
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
/*
* OSX can masquerade as BSD when sys/param.h is previously included.
* So we test that we only detect OSX in this combination.
*/
#if defined(__APPLE__)
# include <sys/param.h>
# include <boost/predef/os/bsd.h>
# include <boost/predef/os/macos.h>
# if !BOOST_OS_MACOS || BOOST_OS_BSD
# error "BOOST_OS_MACOS not detected and/or BOOST_OS_BSD mis-detected."
# endif
#endif
+2 -2
View File
@@ -45,8 +45,8 @@ void test_BOOST_VERSION_NUMBER()
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRRPP(99999) == BOOST_VERSION_NUMBER(9,99,99));
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRP000(999000) == BOOST_VERSION_NUMBER(9,9,9));
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRR000(999000) == BOOST_VERSION_NUMBER(9,99,0));
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRR00PP00(2199009900) == BOOST_VERSION_NUMBER(21,99,99));
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRR00PP00(9999009900L) == BOOST_VERSION_NUMBER(99,99,99));
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRR00PP00(2199009900u) == BOOST_VERSION_NUMBER(21,99,99));
/* PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRR00PP00(9999009900ull) == BOOST_VERSION_NUMBER(99,99,99)); */
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRR0PP00(999909900) == BOOST_VERSION_NUMBER(99,99,99));
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VV00(9900) == BOOST_VERSION_NUMBER(99,00,00));
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRR0PPPP(999909999) == BOOST_VERSION_NUMBER(99,99,9999));