]> git.lyx.org Git - lyx.git/blob - boost/boost/format/detail/config_macros.hpp
64-bit fix to boost::format.
[lyx.git] / boost / boost / format / detail / config_macros.hpp
1 // -*- C++ -*-
2 //  Boost general library 'format'   ---------------------------
3 //  See http://www.boost.org for updates, documentation, and revision history.
4
5 //  (C) Samuel Krempp 2001
6 //  Permission to copy, use, modify, sell and
7 //  distribute this software is granted provided this copyright notice appears
8 //  in all copies. This software is provided "as is" without express or implied
9 //  warranty, and with no claim as to its suitability for any purpose.
10
11 // ------------------------------------------------------------------------------
12 // config_macros.hpp : configuration macros for the format library
13 //   only BOOST_IO_STD is absolutely needed. other are just used to trigger workaround
14 //   codes here and there.
15 // ------------------------------------------------------------------------------
16
17 #ifndef BOOST_FORMAT_CONFIG_MACROS_HPP
18 #define BOOST_FORMAT_CONFIG_MACROS_HPP
19
20 #include <boost/config.hpp>
21 #include <boost/detail/workaround.hpp>
22
23 // make sure our local macros wont override something :
24 #if defined(BOOST_NO_LOCALE_ISDIGIT) || defined(BOOST_OVERLOAD_FOR_NON_CONST) \
25   || defined(BOOST_IO_STD) || defined( BOOST_IO_NEEDS_USING_DECLARATION )
26 #error "boost::format defines a local macro that would overwrite a previously defined macro."
27 #endif
28
29 // specific workarounds. each header can define BOOS_IO_STD if it 
30 // needs. (e.g. because of IO_NEEDS_USING_DECLARATION)
31 #include <boost/format/detail/workarounds_gcc-2.95.hpp>
32 #include <boost/format/detail/workarounds_stlport.hpp>  // stlport workarounds
33
34 #ifndef BOOST_IO_STD
35 #  define BOOST_IO_STD std::
36 #endif
37
38 #if defined(BOOST_NO_STD_LOCALE) || \
39  ( BOOST_WORKAROUND(__BORLANDC__, <= 0x564) \
40    || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT( 0x570 ) )  )
41 // some future __BORLANDC__ >0x564  versions might not need this
42 // 0x570 is Borland's kylix branch
43 #define BOOST_NO_LOCALE_ISIDIGIT
44 #endif
45
46 #if  BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570) ) || BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT(1300))
47 #define BOOST_NO_OVERLOAD_FOR_NON_CONST
48 #endif
49
50 // gcc-2.95's stringstream is not usable, unless it's the one from STLPORT :
51 #if BOOST_WORKAROUND(__GNUC__, < 3) && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) 
52 #define BOOST_FORMAT_IGNORE_STRINGSTREAM  
53 #endif
54
55
56 // **** Workaround for io streams, stlport and msvc.
57 #ifdef BOOST_IO_NEEDS_USING_DECLARATION
58 namespace boost {
59   using std::char_traits;
60   using std::basic_ostream;
61   using std::basic_ostringstream;
62   namespace io {
63     using std::basic_ostream;
64     namespace detail {
65       using std::basic_ios;
66       using std::basic_ostream;
67       using std::basic_ostringstream;
68     }
69   }
70 }
71 #endif
72
73 // ------------------------------------------------------------------------------
74
75 #endif // BOOST_FORMAT_MACROS_DEFAULT_HPP