Compare commits

...

2 Commits

Author SHA1 Message Date
da07531618 Merge of various bug fixes dealing with mis-detection of BSD on OSX. Fix some documentation typos.
[SVN r86315]
2013-10-15 05:23:53 +00:00
79a9679838 Merge Predef library to release.
[SVN r85618]
2013-09-09 04:06:52 +00:00
40 changed files with 509 additions and 614 deletions

View File

@ -1,13 +1,17 @@
/*=============================================================================
Copyright (c) 2004 Joel de Guzman
http://spirit.sourceforge.net/
Distributed under the Boost Software License, Version 1.0. (See accompany- /*=============================================================================
ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Copyright (c) 2004 Joel de Guzman
http://spirit.sourceforge.net/
Copyright 2013 Niall Douglas additions for colors and alignment.
Copyright 2013 Paul A. Bristow additions for more colors and alignments.
Distributed under the Boost Software License, Version 1.0. (See accompany-
ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/ =============================================================================*/
/*============================================================================= /*=============================================================================
Body defaults Body defaults
=============================================================================*/ =============================================================================*/
body body
@ -17,7 +21,7 @@
} }
/*============================================================================= /*=============================================================================
Paragraphs Paragraphs
=============================================================================*/ =============================================================================*/
p p
@ -28,7 +32,7 @@
} }
/*============================================================================= /*=============================================================================
Program listings Program listings
=============================================================================*/ =============================================================================*/
/* Code on paragraphs */ /* Code on paragraphs */
@ -58,11 +62,11 @@
td .screen td .screen
{ {
margin: 0pc 0pc 0pc 0pc; margin: 0pc 0pc 0pc 0pc;
padding: 0pc 0pc 0pc 0pc; padding: 0pc 0pc 0pc 0pc;
} }
/*============================================================================= /*=============================================================================
Headings Headings
=============================================================================*/ =============================================================================*/
h1, h2, h3, h4, h5, h6 h1, h2, h3, h4, h5, h6
@ -122,7 +126,7 @@
/*============================================================================= /*=============================================================================
Author Author
=============================================================================*/ =============================================================================*/
h3.author h3.author
@ -131,7 +135,7 @@
} }
/*============================================================================= /*=============================================================================
Lists Lists
=============================================================================*/ =============================================================================*/
li li
@ -153,7 +157,7 @@
} }
/*============================================================================= /*=============================================================================
Links Links
=============================================================================*/ =============================================================================*/
a a
@ -167,7 +171,7 @@
} }
/*============================================================================= /*=============================================================================
Spirit style navigation Spirit style navigation
=============================================================================*/ =============================================================================*/
.spirit-nav .spirit-nav
@ -187,7 +191,7 @@
} }
/*============================================================================= /*=============================================================================
Copyright footer Copyright footer
=============================================================================*/ =============================================================================*/
.copyright-footer .copyright-footer
{ {
@ -202,7 +206,7 @@
} }
/*============================================================================= /*=============================================================================
Table of contents Table of contents
=============================================================================*/ =============================================================================*/
div.toc div.toc
@ -227,7 +231,7 @@
.toc dl dl { margin: 0; } .toc dl dl { margin: 0; }
/*============================================================================= /*=============================================================================
Tables Tables
=============================================================================*/ =============================================================================*/
.table-title, .table-title,
@ -286,7 +290,7 @@
} }
/*============================================================================= /*=============================================================================
Blurbs Blurbs
=============================================================================*/ =============================================================================*/
div.note, div.note,
@ -309,7 +313,7 @@
} }
/*============================================================================= /*=============================================================================
Variable Lists Variable Lists
=============================================================================*/ =============================================================================*/
div.variablelist div.variablelist
@ -354,7 +358,7 @@
} }
/*============================================================================= /*=============================================================================
Misc Misc
=============================================================================*/ =============================================================================*/
/* Title of books and articles in bibliographies */ /* Title of books and articles in bibliographies */
@ -380,7 +384,7 @@
} }
/*============================================================================= /*=============================================================================
Colors Colors
=============================================================================*/ =============================================================================*/
@media screen @media screen
@ -391,16 +395,16 @@
} }
/* Syntax Highlighting */ /* Syntax Highlighting */
.keyword { color: #0000AA; } .keyword { color: #0000AA; }
.identifier { color: #000000; } .identifier { color: #000000; }
.special { color: #707070; } .special { color: #707070; }
.preprocessor { color: #402080; } .preprocessor { color: #402080; }
.char { color: teal; } .char { color: teal; }
.comment { color: #800000; } .comment { color: #800000; }
.string { color: teal; } .string { color: teal; }
.number { color: teal; } .number { color: teal; }
.white_bkd { background-color: #FFFFFF; } .white_bkd { background-color: #FFFFFF; }
.dk_grey_bkd { background-color: #999999; } .dk_grey_bkd { background-color: #999999; }
/* Links */ /* Links */
a, a .keyword, a .identifier, a .special, a .preprocessor a, a .keyword, a .identifier, a .special, a .preprocessor
@ -572,7 +576,7 @@
} }
/*============================================================================= /*=============================================================================
Images Images
=============================================================================*/ =============================================================================*/
span.inlinemediaobject img span.inlinemediaobject img
@ -581,16 +585,16 @@
} }
/*============================================================================== /*==============================================================================
Super and Subscript: style so that line spacing isn't effected, see Super and Subscript: style so that line spacing isn't effected, see
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=1&postId=5341 http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=1&postId=5341
==============================================================================*/ ==============================================================================*/
sup, sup,
sub { sub {
height: 0; height: 0;
line-height: 1; line-height: 1;
vertical-align: baseline; vertical-align: baseline;
position: relative; position: relative;
} }
@ -598,19 +602,19 @@ sub {
* html sup, * html sup,
* html sub { * html sub {
vertical-align: bottom; vertical-align: bottom;
} }
sup { sup {
bottom: 1ex; bottom: 1ex;
} }
sub { sub {
top: .5ex; top: .5ex;
} }
/*============================================================================== /*==============================================================================
Indexes: pretty much the same as the TOC. Indexes: pretty much the same as the TOC.
==============================================================================*/ ==============================================================================*/
.index .index
@ -644,3 +648,53 @@ sub {
font-weight: bold; font-weight: bold;
} }
/*==============================================================================
Alignment and coloring use 'role' feature, available from Quickbook 1.6 up.
Added from Niall Douglas for role color and alignment.
http://article.gmane.org/gmane.comp.lib.boost.devel/243318
*/
/* Add text alignment (see http://www.w3schools.com/cssref/pr_text_text-align.asp) */
span.aligncenter
{
display: inline-block; width: 100%; text-align: center;
}
span.alignright
{
display: inline-block; width: 100%; text-align: right;
}
/* alignleft is the default. */
span.alignleft
{
display: inline-block; width: 100%; text-align: left;
}
/* alignjustify stretches the word spacing so that each line has equal width
within a chosen fraction of page width (here arbitrarily 20%).
*Not* useful inside table items as the column width remains the total string width.
Nor very useful, except to temporarily restrict the width.
*/
span.alignjustify
{
display: inline-block; width: 20%; text-align: justify;
}
/* Text colors.
Names at http://www.w3.org/TR/2002/WD-css3-color-20020219/ 4.3. X11 color keywords.
Quickbook Usage: [role red Some red text]
*/
span.red { inline-block; color: red; }
span.green { color: green; }
span.lime { color: #00FF00; }
span.blue { color: blue; }
span.navy { color: navy; }
span.yellow { color: yellow; }
span.magenta { color: magenta; }
span.indigo { color: #4B0082; }
span.cyan { color: cyan; }
span.purple { color: purple; }
span.gold { color: gold; }
span.silver { color: silver; } /* lighter gray */
span.gray { color: #808080; } /* light gray */

View File

@ -1,275 +0,0 @@
/*
:Author: David Goodger
:Contact: goodger@python.org
:Date: $Date: 2007-04-16 23:44:59 -0500 (Mon, 16 Apr 2007) $
:Revision: $Revision: 37457 $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin-left: 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left {
clear: left }
img.align-right {
clear: right }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font-family: serif ;
font-size: 100% }
pre.literal-block, pre.doctest-block {
margin-left: 2em ;
margin-right: 2em }
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }

View File

@ -50,7 +50,7 @@
</div> </div>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: July 28, 2013 at 17:05:40 GMT</small></p></td> <td align="left"><p><small>Last revised: October 15, 2013 at 04:40:06 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td> <td align="right"><div class="copyright-footer"></div></td>
</tr></table> </tr></table>
<hr> <hr>

View File

@ -1,23 +0,0 @@
/*
<20> Copyright Beman Dawes, 2007
Distributed under the Boost Software License, Version 1.0.
See www.boost.org/LICENSE_1_0.txt
*/
body {
font-family: sans-serif;
margin: 1em;
max-width : 8.5in;
}
table { margin: 0.5em; }
pre { background-color:#D7EEFF }
ins { background-color:#A0FFA0 }
del { background-color:#FFA0A0 }
/*** end ***/

View File

@ -17,8 +17,8 @@
<a name="predef.acknoledgements"></a><a class="link" href="acknoledgements.html" title="Acknoledgements">Acknoledgements</a> <a name="predef.acknoledgements"></a><a class="link" href="acknoledgements.html" title="Acknoledgements">Acknoledgements</a>
</h2></div></div></div> </h2></div></div></div>
<p> <p>
The comprehensiveness of this library would not be possible without the existance The comprehensiveness of this library would not be possible without the existence
of the indispensible resource that is the <a href="http://sourceforge.net/p/predef/" target="_top">Pre-defined of the indispensable resource that is the <a href="http://sourceforge.net/p/predef/" target="_top">Pre-defined
C/C++ Compiler Macros</a> Project. It was, and continues to be, the primary C/C++ Compiler Macros</a> Project. It was, and continues to be, the primary
source of the definitions that make up this library. Thanks to Bjorn Reese source of the definitions that make up this library. Thanks to Bjorn Reese
and all the volunteers that make that resource possible. and all the volunteers that make that resource possible.

View File

@ -177,9 +177,9 @@ Documentation about what is detected.
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">predef</span><span class="special">/</span><span class="identifier">make</span><span class="special">.</span><span class="identifier">h</span><span class="special">&gt;</span> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">predef</span><span class="special">/</span><span class="identifier">make</span><span class="special">.</span><span class="identifier">h</span><span class="special">&gt;</span>
</pre> </pre>
<p> <p>
One will get a set of utlity macros to decompose common version macros as defined One will get a set of utility macros to decompose common version macros as
by compilers. For example the EDG compiler uses a simple 3-digit version macro defined by compilers. For example the EDG compiler uses a simple 3-digit version
(M,N,P). It can be decomesed and defined as: macro (M,N,P). It can be decomposed and defined as:
</p> </p>
<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_CCOMP_EDG</span> <span class="identifier">BOOST_PREDEF_MAKE_N_N_N</span><span class="special">(</span><span class="identifier">__EDG_VERSION__</span><span class="special">)</span> <pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_CCOMP_EDG</span> <span class="identifier">BOOST_PREDEF_MAKE_N_N_N</span><span class="special">(</span><span class="identifier">__EDG_VERSION__</span><span class="special">)</span>
</pre> </pre>

View File

@ -1,11 +0,0 @@
/*============================================================================
Copyright 2003-2004 Douglas Gregor
Distributed under the Boost Software License, Version 1.0. (See accompany-
ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
============================================================================*/
PRE.synopsis {
background-color: #e0ffff;
border: thin solid blue;
padding: 1em
}

View File

@ -398,9 +398,9 @@ By including:
#include <boost/predef/make.h> #include <boost/predef/make.h>
`` ``
One will get a set of utlity macros to decompose common version One will get a set of utility macros to decompose common version
macros as defined by compilers. For example the EDG compiler macros as defined by compilers. For example the EDG compiler
uses a simple 3-digit version macro (M,N,P). It can be decomesed uses a simple 3-digit version macro (M,N,P). It can be decomposed
and defined as: and defined as:
`` ``
@ -457,7 +457,7 @@ and "Y", "M", "D" for dates.
[section Acknoledgements] [section Acknoledgements]
The comprehensiveness of this library would not be The comprehensiveness of this library would not be
possible without the existance of the indispensible possible without the existence of the indispensable
resource that is the resource that is the
[@http://sourceforge.net/p/predef/ Pre-defined C/C++ Compiler Macros] [@http://sourceforge.net/p/predef/ Pre-defined C/C++ Compiler Macros]
Project. It was, and continues to be, the primary source Project. It was, and continues to be, the primary source

View File

@ -8,7 +8,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_PREDEF_DETAIL_ENDIAN_COMPAT_H #ifndef BOOST_PREDEF_DETAIL_ENDIAN_COMPAT_H
#define BOOST_PREDEF_DETAIL_ENDIAN_COMPAT_H #define BOOST_PREDEF_DETAIL_ENDIAN_COMPAT_H
#include <boost/predef/endian.h> #include <boost/predef/other/endian.h>
#if BOOST_ENDIAN_BIG_BYTE #if BOOST_ENDIAN_BIG_BYTE
# define BOOST_BIG_ENDIAN # define BOOST_BIG_ENDIAN

View File

@ -0,0 +1,10 @@
/*
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)
*/
#ifndef BOOST_PREDEF_DETAIL_OS_DETECTED
#define BOOST_PREDEF_DETAIL_OS_DETECTED 1
#endif

View File

@ -32,7 +32,9 @@ Version number available as major, minor, and patch.
#define BOOST_OS_AIX BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_AIX BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(_AIX) || defined(__TOS_AIX__) #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
defined(_AIX) || defined(__TOS_AIX__) \
)
# undef BOOST_OS_AIX # undef BOOST_OS_AIX
# if !defined(BOOST_OS_AIX) && defined(_AIX43) # if !defined(BOOST_OS_AIX) && defined(_AIX43)
# define BOOST_OS_AIX BOOST_VERSION_NUMBER(4,3,0) # define BOOST_OS_AIX BOOST_VERSION_NUMBER(4,3,0)
@ -53,6 +55,7 @@ Version number available as major, minor, and patch.
#if BOOST_OS_AIX #if BOOST_OS_AIX
# define BOOST_OS_AIX_AVAILABLE # define BOOST_OS_AIX_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_AIX_NAME "IBM AIX" #define BOOST_OS_AIX_NAME "IBM AIX"

View File

@ -26,13 +26,16 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_AMIGAOS BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_AMIGAOS BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(AMIGA) || defined(__amigaos__) #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
defined(AMIGA) || defined(__amigaos__) \
)
# undef BOOST_OS_AMIGAOS # undef BOOST_OS_AMIGAOS
# define BOOST_OS_AMIGAOS BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_OS_AMIGAOS BOOST_VERSION_NUMBER_AVAILABLE
#endif #endif
#if BOOST_OS_AMIGAOS #if BOOST_OS_AMIGAOS
# define BOOST_OS_AMIGAOS_AVAILABLE # define BOOST_OS_AMIGAOS_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_AMIGAOS_NAME "AmigaOS" #define BOOST_OS_AMIGAOS_NAME "AmigaOS"

View File

@ -25,13 +25,16 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_ANDROID BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_ANDROID BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__ANDROID__) #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
defined(__ANDROID__) \
)
# undef BOOST_OS_ANDROID # undef BOOST_OS_ANDROID
# define BOOST_OS_ANDROID BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_OS_ANDROID BOOST_VERSION_NUMBER_AVAILABLE
#endif #endif
#if BOOST_OS_ANDROID #if BOOST_OS_ANDROID
# define BOOST_OS_ANDROID_AVAILABLE # define BOOST_OS_ANDROID_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_ANDROID_NAME "Android" #define BOOST_OS_ANDROID_NAME "Android"

View File

@ -25,13 +25,16 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_BEOS BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_BEOS BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__BEOS__) #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
defined(__BEOS__) \
)
# undef BOOST_OS_BEOS # undef BOOST_OS_BEOS
# define BOOST_OS_BEOS BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_OS_BEOS BOOST_VERSION_NUMBER_AVAILABLE
#endif #endif
#if BOOST_OS_BEOS #if BOOST_OS_BEOS
# define BOOST_OS_BEOS_AVAILABLE # define BOOST_OS_BEOS_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_BEOS_NAME "BeOS" #define BOOST_OS_BEOS_NAME "BeOS"

View File

@ -8,6 +8,13 @@ http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_PREDEF_OS_BSD_H #ifndef BOOST_PREDEF_OS_BSD_H
#define BOOST_PREDEF_OS_BSD_H #define BOOST_PREDEF_OS_BSD_H
/* Special case: OSX will define BSD predefs if the sys/param.h
* header is included. We can guard against that, but only if we
* detect OSX first. Hence we will force include OSX detection
* before doing any BSD detection.
*/
#include <boost/predef/os/macos.h>
#include <boost/predef/version_number.h> #include <boost/predef/version_number.h>
#include <boost/predef/make.h> #include <boost/predef/make.h>
@ -42,20 +49,30 @@ of BSD. If the above variants is detected the corresponding macro is also set.]
] ]
*/ */
#define BOOST_OS_BSD BOOST_VERSION_NUMBER_NOT_AVAILABLE #include <boost/predef/os/bsd/bsdi.h>
#include <boost/predef/os/bsd/dragonfly.h>
#include <boost/predef/os/bsd/free.h>
#include <boost/predef/os/bsd/open.h>
#include <boost/predef/os/bsd/net.h>
#if defined(BSD) || \ #ifndef BOOST_OS_BSD
defined(_SYSTYPE_BSD) #define BOOST_OS_BSD BOOST_VERSION_NUMBER_NOT_AVAILABLE
#endif
#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
defined(BSD) || \
defined(_SYSTYPE_BSD) \
)
# undef BOOST_OS_BSD # undef BOOST_OS_BSD
# include <sys/param.h> # include <sys/param.h>
# if !defined(BOOST_OS_BSD) && defined(BSD4_2) # if !defined(BOOST_OS_BSD) && defined(BSD4_4)
# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,2,0) # define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,4,0)
# endif # endif
# if !defined(BOOST_OS_BSD) && defined(BSD4_3) # if !defined(BOOST_OS_BSD) && defined(BSD4_3)
# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,3,0) # define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,3,0)
# endif # endif
# if !defined(BOOST_OS_BSD) && defined(BSD4_4) # if !defined(BOOST_OS_BSD) && defined(BSD4_2)
# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,4,0) # define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,2,0)
# endif # endif
# if !defined(BOOST_OS_BSD) && defined(BSD) # if !defined(BOOST_OS_BSD) && defined(BSD)
# define BOOST_OS_BSD BOOST_PREDEF_MAKE_10_VVRR(BSD) # define BOOST_OS_BSD BOOST_PREDEF_MAKE_10_VVRR(BSD)
@ -67,6 +84,7 @@ of BSD. If the above variants is detected the corresponding macro is also set.]
#if BOOST_OS_BSD #if BOOST_OS_BSD
# define BOOST_OS_BSD_AVAILABLE # define BOOST_OS_BSD_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_BSD_NAME "BSD" #define BOOST_OS_BSD_NAME "BSD"
@ -74,10 +92,4 @@ of BSD. If the above variants is detected the corresponding macro is also set.]
#include <boost/predef/detail/test.h> #include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD,BOOST_OS_BSD_NAME) BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD,BOOST_OS_BSD_NAME)
#include <boost/predef/os/bsd/bsdi.h>
#include <boost/predef/os/bsd/dragonfly.h>
#include <boost/predef/os/bsd/free.h>
#include <boost/predef/os/bsd/open.h>
#include <boost/predef/os/bsd/net.h>
#endif #endif

View File

@ -24,9 +24,12 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_BSD_BSDI BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_BSD_BSDI BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__bsdi__) #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
# ifndef BOOST_OS_BSD defined(__bsdi__) \
)
# ifndef BOOST_OS_BSD_AVAILABLE
# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
# define BOOST_OS_BSD_AVAILABLE
# endif # endif
# undef BOOST_OS_BSD_BSDI # undef BOOST_OS_BSD_BSDI
# define BOOST_OS_BSD_BSDI BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_OS_BSD_BSDI BOOST_VERSION_NUMBER_AVAILABLE
@ -34,6 +37,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#if BOOST_OS_BSD_BSDI #if BOOST_OS_BSD_BSDI
# define BOOST_OS_BSD_BSDI_AVAILABLE # define BOOST_OS_BSD_BSDI_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_BSD_BSDI_NAME "BSDi BSD/OS" #define BOOST_OS_BSD_BSDI_NAME "BSDi BSD/OS"

View File

@ -24,9 +24,12 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_BSD_DRAGONFLY BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_BSD_DRAGONFLY BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__DragonFly__) #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
# ifndef BOOST_OS_BSD defined(__DragonFly__) \
)
# ifndef BOOST_OS_BSD_AVAILABLE
# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
# define BOOST_OS_BSD_AVAILABLE
# endif # endif
# undef BOOST_OS_BSD_DRAGONFLY # undef BOOST_OS_BSD_DRAGONFLY
# if defined(__DragonFly__) # if defined(__DragonFly__)
@ -36,6 +39,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#if BOOST_OS_BSD_DRAGONFLY #if BOOST_OS_BSD_DRAGONFLY
# define BOOST_OS_BSD_DRAGONFLY_AVAILABLE # define BOOST_OS_BSD_DRAGONFLY_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_BSD_DRAGONFLY_NAME "DragonFly BSD" #define BOOST_OS_BSD_DRAGONFLY_NAME "DragonFly BSD"

View File

@ -26,9 +26,12 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_BSD_FREE BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_BSD_FREE BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__FreeBSD__) #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
# ifndef BOOST_OS_BSD defined(__FreeBSD__) \
)
# ifndef BOOST_OS_BSD_AVAILABLE
# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
# define BOOST_OS_BSD_AVAILABLE
# endif # endif
# undef BOOST_OS_BSD_FREE # undef BOOST_OS_BSD_FREE
# if defined(__FreeBSD_version) # if defined(__FreeBSD_version)
@ -46,6 +49,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#if BOOST_OS_BSD_FREE #if BOOST_OS_BSD_FREE
# define BOOST_OS_BSD_FREE_AVAILABLE # define BOOST_OS_BSD_FREE_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_BSD_FREE_NAME "Free BSD" #define BOOST_OS_BSD_FREE_NAME "Free BSD"

View File

@ -31,9 +31,12 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__NETBSD__) || defined(__NetBSD__) #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
# ifndef BOOST_OS_BSD defined(__NETBSD__) || defined(__NetBSD__) \
)
# ifndef BOOST_OS_BSD_AVAILABLE
# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
# define BOOST_OS_BSD_AVAILABLE
# endif # endif
# undef BOOST_OS_BSD_NET # undef BOOST_OS_BSD_NET
# if defined(__NETBSD__) # if defined(__NETBSD__)
@ -70,6 +73,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#if BOOST_OS_BSD_NET #if BOOST_OS_BSD_NET
# define BOOST_OS_BSD_NET_AVAILABLE # define BOOST_OS_BSD_NET_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_BSD_NET_NAME "DragonFly BSD" #define BOOST_OS_BSD_NET_NAME "DragonFly BSD"

View File

@ -55,9 +55,12 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__OpenBSD__) #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
# ifndef BOOST_OS_BSD defined(__OpenBSD__) \
)
# ifndef BOOST_OS_BSD_AVAILABLE
# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
# define BOOST_OS_BSD_AVAILABLE
# endif # endif
# undef BOOST_OS_BSD_OPEN # undef BOOST_OS_BSD_OPEN
# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_0) # if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_0)
@ -157,6 +160,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#if BOOST_OS_BSD_OPEN #if BOOST_OS_BSD_OPEN
# define BOOST_OS_BSD_OPEN_AVAILABLE # define BOOST_OS_BSD_OPEN_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_BSD_OPEN_NAME "OpenBSD" #define BOOST_OS_BSD_OPEN_NAME "OpenBSD"

View File

@ -25,13 +25,16 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_CYGWIN BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_CYGWIN BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__CYGWIN__) #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
defined(__CYGWIN__) \
)
# undef BOOST_OS_CYGWIN # undef BOOST_OS_CYGWIN
# define BOOST_OS_CGYWIN BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_OS_CGYWIN BOOST_VERSION_NUMBER_AVAILABLE
#endif #endif
#if BOOST_OS_CYGWIN #if BOOST_OS_CYGWIN
# define BOOST_OS_CYGWIN_AVAILABLE # define BOOST_OS_CYGWIN_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_CYGWIN_NAME "Cygwin" #define BOOST_OS_CYGWIN_NAME "Cygwin"

View File

@ -27,13 +27,16 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_HPUX BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_HPUX BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(hpux) || defined(_hpux) || defined(__hpux) #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
defined(hpux) || defined(_hpux) || defined(__hpux) \
)
# undef BOOST_OS_HPUX # undef BOOST_OS_HPUX
# define BOOST_OS_HPUX BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_OS_HPUX BOOST_VERSION_NUMBER_AVAILABLE
#endif #endif
#if BOOST_OS_HPUX #if BOOST_OS_HPUX
# define BOOST_OS_HPUX_AVAILABLE # define BOOST_OS_HPUX_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_HPUX_NAME "HP-UX" #define BOOST_OS_HPUX_NAME "HP-UX"

View File

@ -26,13 +26,16 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_IRIX BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_IRIX BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(sgi) || defined(__sgi) #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
defined(sgi) || defined(__sgi) \
)
# undef BOOST_OS_IRIX # undef BOOST_OS_IRIX
# define BOOST_OS_IRIX BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_OS_IRIX BOOST_VERSION_NUMBER_AVAILABLE
#endif #endif
#if BOOST_OS_IRIX #if BOOST_OS_IRIX
# define BOOST_OS_IRIX_AVAILABLE # define BOOST_OS_IRIX_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_IRIX_NAME "IRIX" #define BOOST_OS_IRIX_NAME "IRIX"

View File

@ -26,13 +26,16 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_LINUX BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_LINUX BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(linux) || defined(__linux) #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
defined(linux) || defined(__linux) \
)
# undef BOOST_OS_LINUX # undef BOOST_OS_LINUX
# define BOOST_OS_LINUX BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_OS_LINUX BOOST_VERSION_NUMBER_AVAILABLE
#endif #endif
#if BOOST_OS_LINUX #if BOOST_OS_LINUX
# define BOOST_OS_LINUX_AVAILABLE # define BOOST_OS_LINUX_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_LINUX_NAME "Linux" #define BOOST_OS_LINUX_NAME "Linux"

View File

@ -31,8 +31,10 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_MACOS BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_MACOS BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(macintosh) || defined(Macintosh) || \ #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
(defined(__APPLE__) && defined(__MACH__)) defined(macintosh) || defined(Macintosh) || \
(defined(__APPLE__) && defined(__MACH__)) \
)
# undef BOOST_OS_MACOS # undef BOOST_OS_MACOS
# if !defined(BOOST_OS_MACOS) && defined(__APPLE__) && defined(__MACH__) # if !defined(BOOST_OS_MACOS) && defined(__APPLE__) && defined(__MACH__)
# define BOOST_OS_MACOS BOOST_VERSION_NUMBER(10,0,0) # define BOOST_OS_MACOS BOOST_VERSION_NUMBER(10,0,0)
@ -44,6 +46,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#if BOOST_OS_MACOS #if BOOST_OS_MACOS
# define BOOST_OS_MACOS_AVAILABLE # define BOOST_OS_MACOS_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_MACOS_NAME "Mac OS" #define BOOST_OS_MACOS_NAME "Mac OS"

View File

@ -25,13 +25,16 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_OS400 BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_OS400 BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__OS400__) #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
defined(__OS400__) \
)
# undef BOOST_OS_OS400 # undef BOOST_OS_OS400
# define BOOST_OS_OS400 BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_OS_OS400 BOOST_VERSION_NUMBER_AVAILABLE
#endif #endif
#if BOOST_OS_OS400 #if BOOST_OS_OS400
# define BOOST_OS_OS400_AVAILABLE # define BOOST_OS_OS400_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_OS400_NAME "IBM OS/400" #define BOOST_OS_OS400_NAME "IBM OS/400"

View File

@ -31,7 +31,9 @@ version 4 is specifically detected.
#define BOOST_OS_QNX BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_QNX BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__QNX__) || defined(__QNXNTO__) #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
defined(__QNX__) || defined(__QNXNTO__) \
)
# undef BOOST_OS_QNX # undef BOOST_OS_QNX
# if !defined(BOOST_OS_QNX) && defined(_NTO_VERSION) # if !defined(BOOST_OS_QNX) && defined(_NTO_VERSION)
# define BOOST_OS_QNX BOOST_PREDEF_MAKE_10_VVRR(_NTO_VERSION) # define BOOST_OS_QNX BOOST_PREDEF_MAKE_10_VVRR(_NTO_VERSION)
@ -46,6 +48,7 @@ version 4 is specifically detected.
#if BOOST_OS_QNX #if BOOST_OS_QNX
# define BOOST_OS_QNX_AVAILABLE # define BOOST_OS_QNX_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_QNX_NAME "QNX" #define BOOST_OS_QNX_NAME "QNX"

View File

@ -26,13 +26,16 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_SOLARIS BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_SOLARIS BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(sun) || defined(__sun) #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
defined(sun) || defined(__sun) \
)
# undef BOOST_OS_SOLARIS # undef BOOST_OS_SOLARIS
# define BOOST_OS_SOLARIS BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_OS_SOLARIS BOOST_VERSION_NUMBER_AVAILABLE
#endif #endif
#if BOOST_OS_SOLARIS #if BOOST_OS_SOLARIS
# define BOOST_OS_SOLARIS_AVAILABLE # define BOOST_OS_SOLARIS_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_SOLARIS_NAME "Solaris" #define BOOST_OS_SOLARIS_NAME "Solaris"

View File

@ -28,14 +28,17 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_UNIX BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_UNIX BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(unix) || defined(__unix) || \ #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) defined(unix) || defined(__unix) || \
defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) \
)
# undef BOOST_OS_UNIX # undef BOOST_OS_UNIX
# define BOOST_OS_UNIX BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_OS_UNIX BOOST_VERSION_NUMBER_AVAILABLE
#endif #endif
#if BOOST_OS_UNIX #if BOOST_OS_UNIX
# define BOOST_OS_UNIX_AVAILABLE # define BOOST_OS_UNIX_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_UNIX_NAME "Unix Environment" #define BOOST_OS_UNIX_NAME "Unix Environment"

View File

@ -28,7 +28,9 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_VMS BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_VMS BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(VMS) || defined(__VMS) #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
defined(VMS) || defined(__VMS) \
)
# undef BOOST_OS_VMS # undef BOOST_OS_VMS
# if defined(__VMS_VER) # if defined(__VMS_VER)
# define BOOST_OS_VMS BOOST_PREDEF_MAKE_10_VVRR00PP00(__VMS_VER) # define BOOST_OS_VMS BOOST_PREDEF_MAKE_10_VVRR00PP00(__VMS_VER)
@ -39,6 +41,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#if BOOST_OS_VMS #if BOOST_OS_VMS
# define BOOST_OS_VMS_AVAILABLE # define BOOST_OS_VMS_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_VMS_NAME "VMS" #define BOOST_OS_VMS_NAME "VMS"

View File

@ -29,15 +29,18 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_OS_WINDOWS BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_OS_WINDOWS BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(_WIN32) || defined(_WIN64) || \ #if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \
defined(_WIN32) || defined(_WIN64) || \
defined(__WIN32__) || defined(__TOS_WIN__) || \ defined(__WIN32__) || defined(__TOS_WIN__) || \
defined(__WINDOWS__) defined(__WINDOWS__) \
)
# undef BOOST_OS_WINDOWS # undef BOOST_OS_WINDOWS
# define BOOST_OS_WINDOWS BOOST_VERSION_NUMBER_AVAILABLE # define BOOST_OS_WINDOWS BOOST_VERSION_NUMBER_AVAILABLE
#endif #endif
#if BOOST_OS_WINDOWS #if BOOST_OS_WINDOWS
# define BOOST_OS_WINDOWS_AVAILABLE # define BOOST_OS_WINDOWS_AVAILABLE
# include <boost/predef/detail/os_detected.h>
#endif #endif
#define BOOST_OS_WINDOWS_NAME "Microsoft Windows" #define BOOST_OS_WINDOWS_NAME "Microsoft Windows"

View File

@ -11,6 +11,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#include <boost/predef/version_number.h> #include <boost/predef/version_number.h>
#include <boost/predef/make.h> #include <boost/predef/make.h>
#include <boost/predef/library/c/gnu.h> #include <boost/predef/library/c/gnu.h>
#include <boost/predef/os/macos.h>
#include <boost/predef/os/bsd.h> #include <boost/predef/os/bsd.h>
/*` /*`
@ -48,17 +49,22 @@ information and acquired knowledge:
#define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_NOT_AVAILABLE #define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_NOT_AVAILABLE
/* GNU libc provides a header defining __BYTE_ORDER, or _BYTE_ORDER. /* GNU libc provides a header defining __BYTE_ORDER, or _BYTE_ORDER.
* And some OSs provide some for of endian header also.
*/ */
#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ #if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \
!BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD
# if BOOST_LIB_C_GNU # if BOOST_LIB_C_GNU
# include <endian.h> # include <endian.h>
# else # else
# if BOOST_OS_BSD # if BOOST_OS_MACOS
# if BOOST_OS_BSD_OPEN # include <machine/endian.h>
# include <machine/endian.h> # else
# else # if BOOST_OS_BSD
# include <sys/endian.h> # if BOOST_OS_BSD_OPEN
# include <machine/endian.h>
# else
# include <sys/endian.h>
# endif
# endif # endif
# endif # endif
# endif # endif

View File

@ -49,6 +49,6 @@ Defines standard version numbers, with these properties:
BOOST_VERSION_NUMBER_MIN BOOST_VERSION_NUMBER_MIN
#define BOOST_VERSION_NUMBER_NOT_AVAILABLE \ #define BOOST_VERSION_NUMBER_NOT_AVAILABLE \
BOOST_VERSION_NUMBER_ZERO BOOST_VERSION_NUMBER_ZERO
#endif #endif

View File

@ -4,19 +4,34 @@
# (See accompanying file LICENSE_1_0.txt or copy at # (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt) # 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) 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 else
{ {
path-constant BOOST_PREDEF_INCLUDE_ROOT : $(BOOST_ROOT) ; predef-include-root = $(BOOST_ROOT) ;
predef-dependency = $(predef-include-root)/boost/predef.h ;
} }
project test project test
: requirements : requirements
<include>$(BOOST_PREDEF_INCLUDE_ROOT) <include>$(predef-include-root)
<dependency>$(BOOST_PREDEF_INCLUDE_ROOT)/boost/predef.h # Add explicit dependency since we don't have header scanner for
# .m and .mm files.
<dependency>$(predef-dependency)
; ;
using testing ; using testing ;
@ -28,4 +43,6 @@ test-suite predef :
[ run info_as_objc.m : : : <test-info>always_show_run_output ] [ run info_as_objc.m : : : <test-info>always_show_run_output ]
[ run version.cpp ] [ run version.cpp ]
[ run make.cpp ] [ run make.cpp ]
[ compile macos_endian.c ]
[ compile macos_vs_bsd.c ]
; ;

View File

@ -12,65 +12,65 @@ http://www.boost.org/LICENSE_1_0.txt)
typedef struct predef_info typedef struct predef_info
{ {
unsigned tag; unsigned tag;
char * name; char * name;
char * description; char * description;
unsigned value; unsigned value;
} predef_info; } predef_info;
predef_info first_predef_info = { 0x43210DEF , "-" , "-" , 0xFFFFFFFF }; predef_info first_predef_info = { 0x43210DEF , "-" , "-" , 0xFFFFFFFF };
#define BOOST_PREDEF_DECLARE_TEST(x,s) \ #define BOOST_PREDEF_DECLARE_TEST(x,s) \
predef_info x##_predef_info = { 0x67890DEF , #x , s , x }; predef_info x##_predef_info = { 0x67890DEF , #x , s , x };
#include <boost/predef.h> #include <boost/predef.h>
predef_info last_predef_info = { 0xFFFFFFFF , "-" , "-" , 0x43210DEF }; predef_info last_predef_info = { 0xFFFFFFFF , "-" , "-" , 0x43210DEF };
int predef_info_compare(const void * a, const void * b) int predef_info_compare(const void * a, const void * b)
{ {
const predef_info ** i = (const predef_info **)a; const predef_info ** i = (const predef_info **)a;
const predef_info ** j = (const predef_info **)b; const predef_info ** j = (const predef_info **)b;
return strcmp((*i)->name,(*j)->name); return strcmp((*i)->name,(*j)->name);
} }
int main() int main()
{ {
unsigned x = 0; unsigned x = 0;
predef_info ** predefs = 0; predef_info ** predefs = 0;
unsigned predef_count = 0; unsigned predef_count = 0;
unsigned * i = &first_predef_info.tag; unsigned * i = &first_predef_info.tag;
unsigned * e = &last_predef_info.tag; unsigned * e = &last_predef_info.tag;
while (i < e) while (i < e)
{ {
i += 1; i += 1;
if (*i == 0x67890DEF) if (*i == 0x67890DEF)
{ {
predef_count += 1; predef_count += 1;
predefs = realloc(predefs,predef_count*sizeof(predef_info*)); predefs = realloc(predefs,predef_count*sizeof(predef_info*));
predefs[predef_count-1] = (predef_info*)i; predefs[predef_count-1] = (predef_info*)i;
} }
} }
qsort(predefs,predef_count,sizeof(predef_info*),predef_info_compare); qsort(predefs,predef_count,sizeof(predef_info*),predef_info_compare);
puts("** Detected **"); puts("** Detected **");
for (x = 0; x < predef_count; ++x) for (x = 0; x < predef_count; ++x)
{ {
if (predefs[x]->value > 0) if (predefs[x]->value > 0)
printf("%s = %u (%u,%u,%u) | %s\n", printf("%s = %u (%u,%u,%u) | %s\n",
predefs[x]->name, predefs[x]->name,
predefs[x]->value, predefs[x]->value,
(predefs[x]->value/10000000)%100, (predefs[x]->value/10000000)%100,
(predefs[x]->value/100000)%100, (predefs[x]->value/100000)%100,
(predefs[x]->value)%100000, (predefs[x]->value)%100000,
predefs[x]->description); predefs[x]->description);
} }
puts("** Not Detected **"); puts("** Not Detected **");
for (x = 0; x < predef_count; ++x) for (x = 0; x < predef_count; ++x)
{ {
if (predefs[x]->value == 0) if (predefs[x]->value == 0)
printf("%s = %u | %s\n", printf("%s = %u | %s\n",
predefs[x]->name, predefs[x]->name,
predefs[x]->value, predefs[x]->value,
predefs[x]->description); predefs[x]->description);
} }
return 0; return 0;
} }

View File

@ -12,79 +12,79 @@ http://www.boost.org/LICENSE_1_0.txt)
namespace namespace
{ {
struct predef_info struct predef_info
{ {
std::string name; std::string name;
std::string description; std::string description;
unsigned value; unsigned value;
predef_info( predef_info(
std::string const & n, std::string const & n,
std::string const & d, std::string const & d,
unsigned v); unsigned v);
predef_info( predef_info(
predef_info const & other) predef_info const & other)
: name(other.name) : name(other.name)
, description(other.description) , description(other.description)
, value(other.value) , value(other.value)
{ {
} }
bool operator < (predef_info const & other) const bool operator < (predef_info const & other) const
{ {
return name < other.name; return name < other.name;
} }
}; };
std::set<predef_info> * predefs = 0; std::set<predef_info> * predefs = 0;
predef_info::predef_info( predef_info::predef_info(
std::string const & n, std::string const & n,
std::string const & d, std::string const & d,
unsigned v) unsigned v)
: name(n) : name(n)
, description(d) , description(d)
, value(v) , value(v)
{ {
if (!predefs) if (!predefs)
{ {
predefs = new std::set<predef_info>(); predefs = new std::set<predef_info>();
} }
predefs->insert(*this); predefs->insert(*this);
} }
} }
#define BOOST_PREDEF_DECLARE_TEST(x,s) \ #define BOOST_PREDEF_DECLARE_TEST(x,s) \
namespace { \ namespace { \
predef_info x##_predef_init(#x,s,x); \ predef_info x##_predef_init(#x,s,x); \
} }
#include <boost/predef.h> #include <boost/predef.h>
int main() int main()
{ {
std::set<predef_info>::iterator i; std::set<predef_info>::iterator i;
std::set<predef_info>::iterator e = predefs->end(); std::set<predef_info>::iterator e = predefs->end();
std::cout << "** Detected **" << std::endl; std::cout << "** Detected **" << std::endl;
for (i = predefs->begin(); i != e; ++i) for (i = predefs->begin(); i != e; ++i)
{ {
if (i->value > 0) if (i->value > 0)
std::cout std::cout
<< i->name << " = " << i->name << " = "
<< i->value << i->value
<< " (" << (i->value/10000000)%100 << "," << (i->value/100000)%100 << "," << (i->value)%100000 << ") | " << " (" << (i->value/10000000)%100 << "," << (i->value/100000)%100 << "," << (i->value)%100000 << ") | "
<< i->description << i->description
<< std::endl; << std::endl;
} }
std::cout << "** Not Detected **" << std::endl; std::cout << "** Not Detected **" << std::endl;
for (i = predefs->begin(); i != e; ++i) for (i = predefs->begin(); i != e; ++i)
{ {
if (i->value == 0) if (i->value == 0)
std::cout std::cout
<< i->name << " = " << i->name << " = "
<< i->value << " | " << i->value << " | "
<< i->description << i->description
<< std::endl; << std::endl;
} }
return 0; return 0;
} }

21
test/macos_endian.c Normal file
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
test/macos_vs_bsd.c Normal file
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

View File

@ -13,75 +13,75 @@ http://www.boost.org/LICENSE_1_0.txt)
namespace namespace
{ {
struct test_info struct test_info
{ {
std::string value; std::string value;
bool passed; bool passed;
test_info(std::string const & v, bool p) : value(v), passed(p) {} test_info(std::string const & v, bool p) : value(v), passed(p) {}
test_info(test_info const & o) : value(o.value), passed(o.passed) {} test_info(test_info const & o) : value(o.value), passed(o.passed) {}
}; };
std::vector<test_info> test_results; std::vector<test_info> test_results;
} }
#define PREDEF_CHECK(X) test_results.push_back(test_info(#X,(X))) #define PREDEF_CHECK(X) test_results.push_back(test_info(#X,(X)))
void test_BOOST_VERSION_NUMBER() void test_BOOST_VERSION_NUMBER()
{ {
PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VRP(0xFFF) == BOOST_VERSION_NUMBER(0xF,0xF,0xF)); PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VRP(0xFFF) == BOOST_VERSION_NUMBER(0xF,0xF,0xF));
PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VVRP(0xFFFF) == BOOST_VERSION_NUMBER(0xFF,0xF,0xF)); PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VVRP(0xFFFF) == BOOST_VERSION_NUMBER(0xFF,0xF,0xF));
PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VRPP(0xFFFF) == BOOST_VERSION_NUMBER(0xF,0xF,0xFF)); PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VRPP(0xFFFF) == BOOST_VERSION_NUMBER(0xF,0xF,0xFF));
PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VVRR(0xFFFF) == BOOST_VERSION_NUMBER(0xFF,0xFF,0x0)); PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VVRR(0xFFFF) == BOOST_VERSION_NUMBER(0xFF,0xFF,0x0));
PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VRRPPPP(0xFFFFFFF) == BOOST_VERSION_NUMBER(0xF,0xFF,0xFFFF)); PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VRRPPPP(0xFFFFFFF) == BOOST_VERSION_NUMBER(0xF,0xFF,0xFFFF));
PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VVRRP(0xFFFFF) == BOOST_VERSION_NUMBER(0xFF,0xFF,0xF)); PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VVRRP(0xFFFFF) == BOOST_VERSION_NUMBER(0xFF,0xFF,0xF));
PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VRRPP000(0xFFFFF000) == BOOST_VERSION_NUMBER(0xF,0xFF,0xFF)); PREDEF_CHECK(BOOST_PREDEF_MAKE_0X_VRRPP000(0xFFFFF000) == BOOST_VERSION_NUMBER(0xF,0xFF,0xFF));
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRP(999) == BOOST_VERSION_NUMBER(9,9,9)); PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRP(999) == BOOST_VERSION_NUMBER(9,9,9));
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VPPP(9999) == BOOST_VERSION_NUMBER(9,0,999)); PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VPPP(9999) == BOOST_VERSION_NUMBER(9,0,999));
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRRPP(999999) == BOOST_VERSION_NUMBER(99,99,99)); PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRRPP(999999) == BOOST_VERSION_NUMBER(99,99,99));
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRR(9999) == BOOST_VERSION_NUMBER(99,99,0)); PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRR(9999) == BOOST_VERSION_NUMBER(99,99,0));
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRPP(9999) == BOOST_VERSION_NUMBER(9,9,99)); PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRPP(9999) == BOOST_VERSION_NUMBER(9,9,99));
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRRPP(99999) == BOOST_VERSION_NUMBER(9,99,99)); 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_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_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(2199009900u) == 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(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_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_VV00(9900) == BOOST_VERSION_NUMBER(99,00,00));
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRR0PPPP(999909999) == BOOST_VERSION_NUMBER(99,99,9999)); PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VVRR0PPPP(999909999) == BOOST_VERSION_NUMBER(99,99,9999));
PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRR(999) == BOOST_VERSION_NUMBER(9,99,00)); PREDEF_CHECK(BOOST_PREDEF_MAKE_10_VRR(999) == BOOST_VERSION_NUMBER(9,99,00));
PREDEF_CHECK(BOOST_PREDEF_MAKE_DATE(1971,1,1) == BOOST_VERSION_NUMBER(1,1,1)); PREDEF_CHECK(BOOST_PREDEF_MAKE_DATE(1971,1,1) == BOOST_VERSION_NUMBER(1,1,1));
PREDEF_CHECK(BOOST_PREDEF_MAKE_YYYYMMDD(19700101) == BOOST_VERSION_NUMBER(0,1,1)); PREDEF_CHECK(BOOST_PREDEF_MAKE_YYYYMMDD(19700101) == BOOST_VERSION_NUMBER(0,1,1));
PREDEF_CHECK(BOOST_PREDEF_MAKE_YYYYMMDD(19710101) == BOOST_VERSION_NUMBER(1,1,1)); PREDEF_CHECK(BOOST_PREDEF_MAKE_YYYYMMDD(19710101) == BOOST_VERSION_NUMBER(1,1,1));
PREDEF_CHECK(BOOST_PREDEF_MAKE_YYYYMMDD(20691231) == BOOST_VERSION_NUMBER(99,12,31)); PREDEF_CHECK(BOOST_PREDEF_MAKE_YYYYMMDD(20691231) == BOOST_VERSION_NUMBER(99,12,31));
PREDEF_CHECK(BOOST_PREDEF_MAKE_YYYYMM(197001) == BOOST_VERSION_NUMBER(0,1,1)); PREDEF_CHECK(BOOST_PREDEF_MAKE_YYYYMM(197001) == BOOST_VERSION_NUMBER(0,1,1));
PREDEF_CHECK(BOOST_PREDEF_MAKE_YYYYMM(197101) == BOOST_VERSION_NUMBER(1,1,1)); PREDEF_CHECK(BOOST_PREDEF_MAKE_YYYYMM(197101) == BOOST_VERSION_NUMBER(1,1,1));
PREDEF_CHECK(BOOST_PREDEF_MAKE_YYYYMM(206912) == BOOST_VERSION_NUMBER(99,12,1)); PREDEF_CHECK(BOOST_PREDEF_MAKE_YYYYMM(206912) == BOOST_VERSION_NUMBER(99,12,1));
} }
int main() int main()
{ {
test_BOOST_VERSION_NUMBER(); test_BOOST_VERSION_NUMBER();
unsigned fail_count = 0; unsigned fail_count = 0;
std::vector<test_info>::iterator i = test_results.begin(); std::vector<test_info>::iterator i = test_results.begin();
std::vector<test_info>::iterator e = test_results.end(); std::vector<test_info>::iterator e = test_results.end();
for (; i != e; ++i) for (; i != e; ++i)
{ {
std::cout std::cout
<< (i->passed ? "[passed]" : "[failed]") << (i->passed ? "[passed]" : "[failed]")
<< " " << i->value << " " << i->value
<< std::endl; << std::endl;
fail_count += i->passed ? 0 : 1; fail_count += i->passed ? 0 : 1;
} }
std::cout std::cout
<< std::endl << std::endl
<< "TOTAL: " << "TOTAL: "
<< "passed " << (test_results.size()-fail_count) << ", " << "passed " << (test_results.size()-fail_count) << ", "
<< "failed " << (fail_count) << ", " << "failed " << (fail_count) << ", "
<< "of " << (test_results.size()) << "of " << (test_results.size())
<< std::endl; << std::endl;
return fail_count; return fail_count;
} }

View File

@ -12,51 +12,51 @@ http://www.boost.org/LICENSE_1_0.txt)
namespace namespace
{ {
struct test_info struct test_info
{ {
std::string value; std::string value;
bool passed; bool passed;
test_info(std::string const & v, bool p) : value(v), passed(p) {} test_info(std::string const & v, bool p) : value(v), passed(p) {}
test_info(test_info const & o) : value(o.value), passed(o.passed) {} test_info(test_info const & o) : value(o.value), passed(o.passed) {}
}; };
std::vector<test_info> test_results; std::vector<test_info> test_results;
} }
#define PREDEF_CHECK(X) test_results.push_back(test_info(#X,(X))) #define PREDEF_CHECK(X) test_results.push_back(test_info(#X,(X)))
void test_BOOST_VERSION_NUMBER() void test_BOOST_VERSION_NUMBER()
{ {
PREDEF_CHECK(BOOST_VERSION_NUMBER(0,0,1) == 1L); PREDEF_CHECK(BOOST_VERSION_NUMBER(0,0,1) == 1L);
PREDEF_CHECK(BOOST_VERSION_NUMBER(99,99,99999) == 999999999L); PREDEF_CHECK(BOOST_VERSION_NUMBER(99,99,99999) == 999999999L);
PREDEF_CHECK(BOOST_VERSION_NUMBER(299,99,99999) != 2999999999L); PREDEF_CHECK(BOOST_VERSION_NUMBER(299,99,99999) != 2999999999L);
PREDEF_CHECK(BOOST_VERSION_NUMBER(100,99,99999) != 1009999999L); PREDEF_CHECK(BOOST_VERSION_NUMBER(100,99,99999) != 1009999999L);
PREDEF_CHECK(BOOST_VERSION_NUMBER(100,99,99999) == 9999999L); PREDEF_CHECK(BOOST_VERSION_NUMBER(100,99,99999) == 9999999L);
PREDEF_CHECK(BOOST_VERSION_NUMBER(100,100,100000) == 0L); PREDEF_CHECK(BOOST_VERSION_NUMBER(100,100,100000) == 0L);
} }
int main() int main()
{ {
test_BOOST_VERSION_NUMBER(); test_BOOST_VERSION_NUMBER();
unsigned fail_count = 0; unsigned fail_count = 0;
std::vector<test_info>::iterator i = test_results.begin(); std::vector<test_info>::iterator i = test_results.begin();
std::vector<test_info>::iterator e = test_results.end(); std::vector<test_info>::iterator e = test_results.end();
for (; i != e; ++i) for (; i != e; ++i)
{ {
std::cout std::cout
<< (i->passed ? "[passed]" : "[failed]") << (i->passed ? "[passed]" : "[failed]")
<< " " << i->value << " " << i->value
<< std::endl; << std::endl;
fail_count += i->passed ? 0 : 1; fail_count += i->passed ? 0 : 1;
} }
std::cout std::cout
<< std::endl << std::endl
<< "TOTAL: " << "TOTAL: "
<< "passed " << (test_results.size()-fail_count) << ", " << "passed " << (test_results.size()-fail_count) << ", "
<< "failed " << (fail_count) << ", " << "failed " << (fail_count) << ", "
<< "of " << (test_results.size()) << "of " << (test_results.size())
<< std::endl; << std::endl;
return fail_count; return fail_count;
} }