Boost.Ratio/Chrono: Added boost/ratio/include.hpp file and make use of boost/ratio/ratio.hpp when all the files are not needed

[SVN r68183]
This commit is contained in:
Vicente J. Botet Escriba
2011-01-16 12:07:26 +00:00
parent 2e93f04826
commit 322e46fc49
3 changed files with 36 additions and 15 deletions

View File

@ -21,22 +21,29 @@
//--------------------------------------------------------------------------------------// //--------------------------------------------------------------------------------------//
#ifndef BOOST_SYSTEM_API_CONFIG_HPP #ifndef BOOST_SYSTEM_API_CONFIG_HPP
#define BOOST_SYSTEM_API_CONFIG_HPP #define BOOST_SYSTEM_API_CONFIG_HPP
# if defined(BOOST_POSIX_API) || defined(BOOST_WINDOWS_API) # if defined(BOOST_SYSTEM_POSIX_API) || defined(BOOST_SYSTEM_WINDOWS_API)
# error user defined BOOST_POSIX_API or BOOST_WINDOWS_API not supported # error user defined BOOST_SYSTEM_POSIX_API or BOOST_SYSTEM_WINDOWS_API not supported
# endif # endif
// BOOST_POSIX_API or BOOST_WINDOWS_API specify which API to use // BOOST_SYSTEM_POSIX_API or BOOST_SYSTEM_WINDOWS_API specify which API to use
// Cygwin/MinGW does not predefine _WIN32. // Cygwin/MinGW does not predefine _WIN32.
// Standalone MinGW and all other known Windows compilers do predefine _WIN32 // Standalone MinGW and all other known Windows compilers do predefine _WIN32
// Compilers that predefine _WIN32 or __MINGW32__ do so for Windows 64-bit builds too. // Compilers that predefine _WIN32 or __MINGW32__ do so for Windows 64-bit builds too.
# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32) )
# define BOOST_SYSTEM_WINDOWS_API
# else
# define BOOST_SYSTEM_POSIX_API
# endif
//# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__))
# if defined(_WIN32) || defined(__CYGWIN__) // Windows default, including MinGW and Cygwin # if defined(_WIN32) || defined(__CYGWIN__) // Windows default, including MinGW and Cygwin
# define BOOST_WINDOWS_API # define BOOST_WINDOWS_API
# else # else
# define BOOST_POSIX_API # define BOOST_POSIX_API
# endif # endif
#endif // BOOST_SYSTEM_API_CONFIG_HPP #endif // BOOST_SYSTEM_API_CONFIG_HPP

View File

@ -7,11 +7,23 @@
// See http://www.boost.org/libs/system for documentation. // See http://www.boost.org/libs/system for documentation.
#ifndef BOOST_SYSTEM_CONFIG_HPP #ifndef BOOST_SYSTEM_CONFIG_HPP
#define BOOST_SYSTEM_CONFIG_HPP #define BOOST_SYSTEM_CONFIG_HPP
#include <boost/config.hpp> #include <boost/config.hpp>
#include <boost/system/api_config.hpp> // for BOOST_POSIX_API or BOOST_WINDOWS_API
#if defined(BOOST_SYSTEM_SOURCE) && !defined(BOOST_USE_WINDOWS_H)
#define BOOST_USE_WINDOWS_H
#endif
#include <boost/system/api_config.hpp> // for BOOST_SYSTEM_POSIX_API or BOOST_SYSTEM_WINDOWS_API
#ifdef BOOST_SYSTEM_INLINED
#define BOOST_SYSTEM_INLINE inline
#define BOOST_SYSTEM_DECL
#else
#define BOOST_SYSTEM_INLINE
// This header implements separate compilation features as described in // This header implements separate compilation features as described in
// http://www.boost.org/more/separate_compilation.html // http://www.boost.org/more/separate_compilation.html
@ -21,14 +33,14 @@
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK) #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
# if defined(BOOST_SYSTEM_SOURCE) # if defined(BOOST_SYSTEM_SOURCE)
# define BOOST_SYSTEM_DECL BOOST_SYMBOL_EXPORT # define BOOST_SYSTEM_DECL BOOST_SYMBOL_EXPORT
# else # else
# define BOOST_SYSTEM_DECL BOOST_SYMBOL_IMPORT # define BOOST_SYSTEM_DECL BOOST_SYMBOL_IMPORT
# endif # endif
#else #else
# define BOOST_SYSTEM_DECL # define BOOST_SYSTEM_DECL
#endif #endif
// enable automatic library variant selection ----------------------------------------// // enable automatic library variant selection ----------------------------------------//
#if !defined(BOOST_SYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SYSTEM_NO_LIB) #if !defined(BOOST_SYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SYSTEM_NO_LIB)
// //
@ -48,5 +60,7 @@
#include <boost/config/auto_link.hpp> #include <boost/config/auto_link.hpp>
#endif // auto-linking disabled #endif // auto-linking disabled
#endif // BOOST_SYSTEM_INLINED
#endif // BOOST_SYSTEM_CONFIG_HPP #endif // BOOST_SYSTEM_CONFIG_HPP

View File

@ -7,8 +7,8 @@
// See library home page at http://www.boost.org/libs/system // See library home page at http://www.boost.org/libs/system
#ifndef BOOST_CYGWIN_ERROR_HPP #ifndef BOOST_SYSTEM_CYGWIN_ERROR_HPP
#define BOOST_CYGWIN_ERROR_HPP #define BOOST_SYSTEM_CYGWIN_ERROR_HPP
// This header is effectively empty for compiles on operating systems where // This header is effectively empty for compiles on operating systems where
// it is not applicable. // it is not applicable.
@ -27,7 +27,7 @@ namespace boost
// User code should use the portable "posix" enums for POSIX errors; this // User code should use the portable "posix" enums for POSIX errors; this
// allows such code to be portable to non-POSIX systems. For the non-POSIX // allows such code to be portable to non-POSIX systems. For the non-POSIX
// errno values that POSIX-based systems typically provide in addition to // errno values that POSIX-based systems typically provide in addition to
// POSIX values, use the system specific enums below. // POSIX values, use the system specific enums below.
namespace cygwin_error namespace cygwin_error
@ -53,4 +53,4 @@ namespace boost
#endif // __CYGWIN__ #endif // __CYGWIN__
#endif // BOOST_CYGWIN_ERROR_HPP #endif // BOOST_SYSTEM_CYGWIN_ERROR_HPP