1 // (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and
2 // distribute this software is granted provided this copyright notice appears
3 // in all copies. This software is provided "as is" without express or implied
4 // warranty, and with no claim as to its suitability for any purpose.
6 // See http://www.boost.org for most recent version.
8 // Win32 specific config options:
10 #define BOOST_PLATFORM "Win32"
12 #if defined BOOST_DECL_EXPORTS
13 # if defined BOOST_DECL_IMPORTS
14 # error Not valid to define both BOOST_DECL_EXPORTS and BOOST_DECL_IMPORTS
16 # define BOOST_DECL __declspec(dllexport)
17 #elif defined BOOST_DECL_IMPORTS
18 # define BOOST_DECL __declspec(dllimport)
23 #if defined(__GNUC__) && !defined(BOOST_NO_SWPRINTF)
24 # define BOOST_NO_SWPRINTF
27 #ifndef BOOST_DISABLE_WIN32
29 // Win32 will normally be using native Win32 threads,
30 // but there is a pthread library avaliable as an option:
32 #ifndef BOOST_HAS_PTHREADS
33 # define BOOST_HAS_WINTHREADS
37 #define BOOST_HAS_FTIME
42 // disable min/max macros:
56 // Apparently, something in the Microsoft libraries requires the "long"
57 // overload, because it calls the min/max functions with arguments of
58 // slightly different type. (If this proves to be incorrect, this
59 // whole "BOOST_MSVC" section can be removed.)
60 inline long min(long __a, long __b) {
61 return __b < __a ? __b : __a;
63 inline long max(long __a, long __b) {
64 return __a < __b ? __b : __a;
66 // The "long double" overload is required, otherwise user code calling
67 // min/max for floating-point numbers will use the "long" overload.
68 // (SourceForge bug #495495)
69 inline long double min(long double __a, long double __b) {
70 return __b < __a ? __b : __a;
72 inline long double max(long double __a, long double __b) {
73 return __a < __b ? __b : __a;