# log-platform-config.jam # # Copyright 2017 Andrey Semashev # # 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) import configure ; import project ; import path ; import property ; import feature ; local here = [ modules.binding $(__name__) ] ; project.push-current [ project.current ] ; project.load [ path.join [ path.make $(here:D) ] ../config/xopen-source-600 ] ; project.pop-current ; rule set-platform-defines ( properties * ) { local result = ; if ( windows in $(properties) ) || ( cygwin in $(properties) ) { result += NOMINMAX ; result += WIN32_LEAN_AND_MEAN ; result += SECURITY_WIN32 ; result += BOOST_USE_WINDOWS_H ; if cygwin in $(properties) { result += __USE_W32_SOCKETS ; result += _XOPEN_SOURCE=600 ; } } else if solaris in $(properties) { # 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. # 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. if [ configure.builds /boost/log/xopen-source-600//xopen_source_600 : $(properties) : xopen-source-600-supported ] { result += _XOPEN_SOURCE=600 ; } else { result += _XOPEN_SOURCE=500 ; } result += __EXTENSIONS__ ; } else if ( linux in $(properties) ) || ( hpux in $(properties) ) { result += _XOPEN_SOURCE=600 ; } return $(result) ; }