os/ossrv/ossrv_pub/boost_apis/boost/archive/wcslen.hpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/archive/wcslen.hpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,56 @@
     1.4 +#ifndef BOOST_ARCHIVE_WCSLEN_HPP
     1.5 +#define BOOST_ARCHIVE_WCSLEN_HPP
     1.6 +
     1.7 +// MS compatible compilers support #pragma once
     1.8 +#if defined(_MSC_VER) && (_MSC_VER >= 1020)
     1.9 +# pragma once
    1.10 +#endif
    1.11 +
    1.12 +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
    1.13 +// wcslen.hpp:
    1.14 +
    1.15 +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . 
    1.16 +// Use, modification and distribution is subject to the Boost Software
    1.17 +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
    1.18 +// http://www.boost.org/LICENSE_1_0.txt)
    1.19 +
    1.20 +//  See http://www.boost.org for updates, documentation, and revision history.
    1.21 +
    1.22 +#include <cstddef> // size_t
    1.23 +#include <boost/config.hpp>
    1.24 +#if defined(BOOST_NO_STDC_NAMESPACE)
    1.25 +namespace std{ 
    1.26 +    using ::size_t; 
    1.27 +} // namespace std
    1.28 +#endif
    1.29 +
    1.30 +#ifndef BOOST_NO_CWCHAR
    1.31 +
    1.32 +// a couple of libraries which include wchar_t don't include
    1.33 +// wcslen
    1.34 +
    1.35 +#if defined(BOOST_DINKUMWARE_STDLIB) && BOOST_DINKUMWARE_STDLIB < 306 \
    1.36 +|| defined(__LIBCOMO__) 
    1.37 +
    1.38 +namespace std {
    1.39 +inline std::size_t wcslen(const wchar_t * ws)
    1.40 +{
    1.41 +    const wchar_t * eows = ws;
    1.42 +    while(* eows != 0)
    1.43 +        ++eows;
    1.44 +    return eows - ws;
    1.45 +}
    1.46 +} // namespace std
    1.47 +
    1.48 +#else
    1.49 +
    1.50 +#include <cwchar>
    1.51 +#ifdef BOOST_NO_STDC_NAMESPACE
    1.52 +namespace std{ using ::wcslen; }
    1.53 +#endif
    1.54 +
    1.55 +#endif // wcslen
    1.56 +
    1.57 +#endif //BOOST_NO_CWCHAR
    1.58 +
    1.59 +#endif //BOOST_ARCHIVE_WCSLEN_HPP