1 // boost/system/config.hpp -------------------------------------------------//
\r
3 // Copyright Beman Dawes 2003, 2006
\r
5 // Distributed under the Boost Software License, Version 1.0. (See accompanying
\r
6 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
\r
8 // See http://www.boost.org/libs/system for documentation.
\r
10 #ifndef BOOST_SYSTEM_CONFIG_HPP
\r
11 #define BOOST_SYSTEM_CONFIG_HPP
\r
13 #include <boost/config.hpp>
\r
15 // BOOST_POSIX_API or BOOST_WINDOWS_API specify which API to use.
\r
16 // If not specified, a sensible default will be applied.
\r
18 # if defined( BOOST_WINDOWS_API ) && defined( BOOST_POSIX_API )
\r
19 # error both BOOST_WINDOWS_API and BOOST_POSIX_API are defined
\r
20 # elif !defined( BOOST_WINDOWS_API ) && !defined( BOOST_POSIX_API )
\r
21 # if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)
\r
22 # define BOOST_WINDOWS_API
\r
24 # define BOOST_POSIX_API
\r
28 // enable dynamic linking on Windows ---------------------------------------//
\r
30 //# if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)) && defined(__BORLANDC__) && defined(__WIN32__)
\r
31 //# error Dynamic linking Boost.System does not work for Borland; use static linking instead
\r
34 #ifdef BOOST_HAS_DECLSPEC // defined in config system
\r
35 // we need to import/export our code only if the user has specifically
\r
36 // asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
\r
37 // libraries to be dynamically linked, or BOOST_SYSTEM_DYN_LINK
\r
38 // if they want just this one to be dynamically liked:
\r
39 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
\r
40 // export if this is our own source, otherwise import:
\r
41 #ifdef BOOST_SYSTEM_SOURCE
\r
42 # define BOOST_SYSTEM_DECL __declspec(dllexport)
\r
44 # define BOOST_SYSTEM_DECL __declspec(dllimport)
\r
45 #endif // BOOST_SYSTEM_SOURCE
\r
47 #endif // BOOST_HAS_DECLSPEC
\r
49 // if BOOST_SYSTEM_DECL isn't defined yet define it now:
\r
50 #ifndef BOOST_SYSTEM_DECL
\r
51 #define BOOST_SYSTEM_DECL
\r
54 // enable automatic library variant selection ------------------------------//
\r
56 #if !defined(BOOST_SYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SYSTEM_NO_LIB)
\r
58 // Set the name of our library, this will get undef'ed by auto_link.hpp
\r
59 // once it's done with it:
\r
61 #define BOOST_LIB_NAME boost_system
\r
63 // If we're importing code from a dll, then tell auto_link.hpp about it:
\r
65 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
\r
66 # define BOOST_DYN_LINK
\r
69 // And include the header that does the work:
\r
71 #include <boost/config/auto_link.hpp>
\r
72 #endif // auto-linking disabled
\r
74 #endif // BOOST_SYSTEM_CONFIG_HPP
\r