os/ossrv/ossrv_pub/boost_apis/boost/thread/detail/config.hpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (C) 2001-2003
sl@0
     2
// William E. Kempf
sl@0
     3
//
sl@0
     4
//  Distributed under the Boost Software License, Version 1.0. (See accompanying 
sl@0
     5
//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
sl@0
     6
sl@0
     7
#ifndef BOOST_THREAD_CONFIG_WEK01032003_HPP
sl@0
     8
#define BOOST_THREAD_CONFIG_WEK01032003_HPP
sl@0
     9
sl@0
    10
#include <boost/config.hpp>
sl@0
    11
#include <boost/detail/workaround.hpp>
sl@0
    12
sl@0
    13
#if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
sl@0
    14
#  pragma warn -8008 // Condition always true/false
sl@0
    15
#  pragma warn -8080 // Identifier declared but never used
sl@0
    16
#  pragma warn -8057 // Parameter never used
sl@0
    17
#  pragma warn -8066 // Unreachable code
sl@0
    18
#endif
sl@0
    19
sl@0
    20
// insist on threading support being available:
sl@0
    21
#include <boost/config/requires_threads.hpp>
sl@0
    22
sl@0
    23
// compatibility with the rest of Boost's auto-linking code:
sl@0
    24
#if defined(BOOST_THREAD_DYN_DLL) || defined(BOOST_ALL_DYN_LINK)
sl@0
    25
# undef  BOOST_THREAD_USE_LIB
sl@0
    26
# define BOOST_THREAD_USE_DLL
sl@0
    27
#endif
sl@0
    28
sl@0
    29
#if defined(BOOST_THREAD_BUILD_DLL)   //Build dll
sl@0
    30
#elif defined(BOOST_THREAD_BUILD_LIB) //Build lib
sl@0
    31
#elif defined(BOOST_THREAD_USE_DLL)   //Use dll
sl@0
    32
#elif defined(BOOST_THREAD_USE_LIB)   //Use lib
sl@0
    33
#else //Use default
sl@0
    34
#   if defined(BOOST_HAS_WINTHREADS)
sl@0
    35
#       if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN)
sl@0
    36
            //For compilers supporting auto-tss cleanup
sl@0
    37
            //with Boost.Threads lib, use Boost.Threads lib
sl@0
    38
#           define BOOST_THREAD_USE_LIB
sl@0
    39
#       else
sl@0
    40
            //For compilers not yet supporting auto-tss cleanup
sl@0
    41
            //with Boost.Threads lib, use Boost.Threads dll
sl@0
    42
#           define BOOST_THREAD_USE_DLL
sl@0
    43
#       endif
sl@0
    44
#   else
sl@0
    45
#       define BOOST_THREAD_USE_LIB
sl@0
    46
#   endif
sl@0
    47
#endif
sl@0
    48
sl@0
    49
#if defined(BOOST_HAS_DECLSPEC)
sl@0
    50
#   if defined(BOOST_THREAD_BUILD_DLL) //Build dll
sl@0
    51
#       define BOOST_THREAD_DECL __declspec(dllexport)
sl@0
    52
#   elif defined(BOOST_THREAD_USE_DLL) //Use dll
sl@0
    53
#       define BOOST_THREAD_DECL __declspec(dllimport)
sl@0
    54
#   else
sl@0
    55
#       define BOOST_THREAD_DECL
sl@0
    56
#   endif
sl@0
    57
#else
sl@0
    58
#   define BOOST_THREAD_DECL
sl@0
    59
#endif // BOOST_HAS_DECLSPEC
sl@0
    60
sl@0
    61
//
sl@0
    62
// Automatically link to the correct build variant where possible.
sl@0
    63
//
sl@0
    64
#if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_THREAD_NO_LIB) && !defined(BOOST_THREAD_BUILD_DLL) && !defined(BOOST_THREAD_BUILD_LIB)
sl@0
    65
//
sl@0
    66
// Tell the autolink to link dynamically, this will get undef'ed by auto_link.hpp
sl@0
    67
// once it's done with it: 
sl@0
    68
//
sl@0
    69
#if defined(BOOST_THREAD_USE_DLL)
sl@0
    70
#   define BOOST_DYN_LINK
sl@0
    71
#endif
sl@0
    72
//
sl@0
    73
// Set the name of our library, this will get undef'ed by auto_link.hpp
sl@0
    74
// once it's done with it:
sl@0
    75
//
sl@0
    76
#if defined(BOOST_THREAD_LIB_NAME)
sl@0
    77
#    define BOOST_LIB_NAME BOOST_THREAD_LIB_NAME
sl@0
    78
#else
sl@0
    79
#    define BOOST_LIB_NAME boost_thread
sl@0
    80
#endif
sl@0
    81
//
sl@0
    82
// If we're importing code from a dll, then tell auto_link.hpp about it:
sl@0
    83
//
sl@0
    84
// And include the header that does the work:
sl@0
    85
//
sl@0
    86
#include <boost/config/auto_link.hpp>
sl@0
    87
#endif  // auto-linking disabled
sl@0
    88
sl@0
    89
#endif // BOOST_THREAD_CONFIG_WEK1032003_HPP
sl@0
    90
sl@0
    91
// Change Log:
sl@0
    92
//   22 Jan 05 Roland Schwarz (speedsnail)
sl@0
    93
//      Usage of BOOST_HAS_DECLSPEC macro.
sl@0
    94
//      Default again is static lib usage.
sl@0
    95
//      BOOST_DYN_LINK only defined when autolink included.