]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/log/build/log-platform-config.jam
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / log / build / log-platform-config.jam
1 # log-platform-config.jam
2 #
3 # Copyright 2017 Andrey Semashev
4 #
5 # Distributed under the Boost Software License Version 1.0. (See
6 # accompanying file LICENSE_1_0.txt or copy at
7 # http://www.boost.org/LICENSE_1_0.txt)
8
9 import configure ;
10 import project ;
11 import path ;
12 import property ;
13 import feature ;
14
15 local here = [ modules.binding $(__name__) ] ;
16
17 project.push-current [ project.current ] ;
18 project.load [ path.join [ path.make $(here:D) ] ../config/xopen-source-600 ] ;
19 project.pop-current ;
20
21 rule set-platform-defines ( properties * )
22 {
23 local result = ;
24
25 if ( <target-os>windows in $(properties) ) || ( <target-os>cygwin in $(properties) )
26 {
27 result += <define>NOMINMAX ;
28 result += <define>WIN32_LEAN_AND_MEAN ;
29 result += <define>SECURITY_WIN32 ;
30 result += <define>BOOST_USE_WINDOWS_H ;
31
32 if <target-os>cygwin in $(properties)
33 {
34 result += <define>__USE_W32_SOCKETS ;
35 result += <define>_XOPEN_SOURCE=600 ;
36 }
37 }
38 else if <target-os>solaris in $(properties)
39 {
40 # Solaris headers are broken and cannot be included in C++03 when _XOPEN_SOURCE=600. At the same time, they cannot be included with _XOPEN_SOURCE=500 in C++11 and later.
41 # This is because the system headers check the C language version and error out if the version does not match. We have to test if we can request _XOPEN_SOURCE=600.
42 if [ configure.builds /boost/log/xopen-source-600//xopen_source_600 : $(properties) : xopen-source-600-supported ]
43 {
44 result += <define>_XOPEN_SOURCE=600 ;
45 }
46 else
47 {
48 result += <define>_XOPEN_SOURCE=500 ;
49 }
50
51 result += <define>__EXTENSIONS__ ;
52 }
53 else if ( <target-os>linux in $(properties) ) || ( <target-os>hpux in $(properties) )
54 {
55 result += <define>_XOPEN_SOURCE=600 ;
56 }
57
58 return $(result) ;
59 }