Update contrib.
1 // Copyright (C) 2001-2003
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 #ifndef BOOST_THREAD_CONFIG_WEK01032003_HPP
8 #define BOOST_THREAD_CONFIG_WEK01032003_HPP
10 #include <boost/config.hpp>
11 #include <boost/detail/workaround.hpp>
13 #if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
14 # pragma warn -8008 // Condition always true/false
15 # pragma warn -8080 // Identifier declared but never used
16 # pragma warn -8057 // Parameter never used
17 # pragma warn -8066 // Unreachable code
20 // insist on threading support being available:
21 #include <boost/config/requires_threads.hpp>
23 // compatibility with the rest of Boost's auto-linking code:
24 #if defined(BOOST_THREAD_DYN_DLL) || defined(BOOST_ALL_DYN_LINK)
25 # undef BOOST_THREAD_USE_LIB
26 # define BOOST_THREAD_USE_DLL
29 #if defined(BOOST_THREAD_BUILD_DLL) //Build dll
30 #elif defined(BOOST_THREAD_BUILD_LIB) //Build lib
31 #elif defined(BOOST_THREAD_USE_DLL) //Use dll
32 #elif defined(BOOST_THREAD_USE_LIB) //Use lib
34 # if defined(BOOST_HAS_WINTHREADS)
35 # if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN)
36 //For compilers supporting auto-tss cleanup
37 //with Boost.Threads lib, use Boost.Threads lib
38 # define BOOST_THREAD_USE_LIB
40 //For compilers not yet supporting auto-tss cleanup
41 //with Boost.Threads lib, use Boost.Threads dll
42 # define BOOST_THREAD_USE_DLL
45 # define BOOST_THREAD_USE_LIB
49 #if defined(BOOST_HAS_DECLSPEC)
50 # if defined(BOOST_THREAD_BUILD_DLL) //Build dll
51 # define BOOST_THREAD_DECL __declspec(dllexport)
52 # elif defined(BOOST_THREAD_USE_DLL) //Use dll
53 # define BOOST_THREAD_DECL __declspec(dllimport)
55 # define BOOST_THREAD_DECL
58 # define BOOST_THREAD_DECL
59 #endif // BOOST_HAS_DECLSPEC
62 // Automatically link to the correct build variant where possible.
64 #if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_THREAD_NO_LIB) && !defined(BOOST_THREAD_BUILD_DLL) && !defined(BOOST_THREAD_BUILD_LIB)
66 // Tell the autolink to link dynamically, this will get undef'ed by auto_link.hpp
67 // once it's done with it:
69 #if defined(BOOST_THREAD_USE_DLL)
70 # define BOOST_DYN_LINK
73 // Set the name of our library, this will get undef'ed by auto_link.hpp
74 // once it's done with it:
76 #if defined(BOOST_THREAD_LIB_NAME)
77 # define BOOST_LIB_NAME BOOST_THREAD_LIB_NAME
79 # define BOOST_LIB_NAME boost_thread
82 // If we're importing code from a dll, then tell auto_link.hpp about it:
84 // And include the header that does the work:
86 #include <boost/config/auto_link.hpp>
87 #endif // auto-linking disabled
89 #endif // BOOST_THREAD_CONFIG_WEK1032003_HPP
92 // 22 Jan 05 Roland Schwarz (speedsnail)
93 // Usage of BOOST_HAS_DECLSPEC macro.
94 // Default again is static lib usage.
95 // BOOST_DYN_LINK only defined when autolink included.