Chris@16: // (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) Chris@16: // (C) Copyright 2003-2007 Jonathan Turkanis Chris@16: // Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) Chris@16: Chris@16: // See http://www.boost.org/libs/iostreams for documentation. Chris@16: Chris@16: #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED Chris@16: #define BOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: #if defined(_MSC_VER) && (_MSC_VER >= 1020) Chris@16: # pragma once Chris@16: #endif Chris@16: Chris@16: //------------------Support for codecvt with user-defined state types---------// Chris@16: Chris@16: #if defined(__MSL_CPP__) || defined(__LIBCOMO__) || \ Chris@16: BOOST_WORKAROUND(_STLPORT_VERSION, <= 0x450) \ Chris@16: /**/ Chris@16: # define BOOST_IOSTREAMS_NO_PRIMARY_CODECVT_DEFINITION Chris@16: #endif Chris@16: Chris@16: #if defined(__GLIBCPP__) || defined(__GLIBCXX__) || \ Chris@16: BOOST_WORKAROUND(_STLPORT_VERSION, > 0x450) \ Chris@16: /**/ Chris@16: # define BOOST_IOSTREAMS_EMPTY_PRIMARY_CODECVT_DEFINITION Chris@16: #endif Chris@16: Chris@16: //------------------Check for codecvt ctor taking a reference count-----------// Chris@16: Chris@16: #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) || \ Chris@16: BOOST_WORKAROUND(_STLPORT_VERSION, < 0x461) \ Chris@16: /**/ Chris@16: # define BOOST_IOSTREAMS_NO_CODECVT_CTOR_FROM_SIZE_T Chris@16: #endif Chris@16: Chris@16: //------------------Normalize codecvt::length---------------------------------// Chris@16: Chris@16: #if !defined(__MSL_CPP__) && !defined(__LIBCOMO__) && \ Chris@16: (!defined(BOOST_RWSTD_VER) || BOOST_RWSTD_VER < 0x04010300) && \ Chris@16: (!defined(__MACH__) || !defined(__INTEL_COMPILER)) Chris@16: /**/ Chris@16: # define BOOST_IOSTREAMS_CODECVT_CV_QUALIFIER const Chris@16: #else Chris@16: # define BOOST_IOSTREAMS_CODECVT_CV_QUALIFIER Chris@16: #endif Chris@16: Chris@16: //------------------Check for codecvt::max_length-----------------------------// Chris@16: Chris@16: #if BOOST_WORKAROUND(_STLPORT_VERSION, < 0x461) Chris@16: # define BOOST_IOSTREAMS_NO_CODECVT_MAX_LENGTH Chris@16: #endif Chris@16: Chris@16: //------------------Put mbstate_t and codecvt in std--------------------------// Chris@16: Chris@16: #ifndef BOOST_IOSTREAMS_NO_LOCALE Chris@16: # include Chris@16: #endif Chris@16: Chris@16: // From Robert Ramey's version of utf8_codecvt_facet. Chris@16: namespace std { Chris@16: Chris@16: #if defined(__LIBCOMO__) Chris@16: using ::mbstate_t; Chris@16: #elif defined(BOOST_DINKUMWARE_STDLIB) && !defined(__BORLANDC__) Chris@16: using ::mbstate_t; Chris@16: #elif defined(__SGI_STL_PORT) Chris@16: #elif defined(BOOST_NO_STDC_NAMESPACE) Chris@16: using ::codecvt; Chris@16: using ::mbstate_t; Chris@16: #endif Chris@16: Chris@16: } // End namespace std. Chris@16: Chris@16: #endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED