#include <ctime>
#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
#include <support/win32/locale_win32.h>
-#else // _LIBCPP_MSVCRT
+#elif !defined(__ANDROID__)
#include <nl_types.h>
-#endif // !_LIBCPP_MSVCRT
+#endif
#ifdef __APPLE__
#include <Availability.h>
// and failbit is set in __err.
// Else an iterator pointing to the matching keyword is found. If more than
// one keyword matches, an iterator to the first matching keyword is returned.
-// If on exit __b == __e, eofbit is set in __err. If __case_senstive is false,
+// If on exit __b == __e, eofbit is set in __err. If __case_sensitive is false,
// __ct is used to force to lower case before comparing characters.
// Examples:
// Keywords: "a", "abb"
break;
}
// Stage 3
- __a[sizeof(__a)-1] = 0;
+ __buf.resize(__a_end - __a);
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
- if (sscanf_l(__a, _LIBCPP_GET_C_LOCALE, "%p", &__v) != 1)
+ if (sscanf_l(__buf.c_str(), _LIBCPP_GET_C_LOCALE, "%p", &__v) != 1)
#else
- if (__sscanf_l(__a, __cloc(), "%p", &__v) != 1)
+ if (__sscanf_l(__buf.c_str(), __cloc(), "%p", &__v) != 1)
#endif
__err = ios_base::failbit;
// EOF checked
};
template <class _CharT>
-class _LIBCPP_TYPE_VIS __time_get_c_storage
+class _LIBCPP_TYPE_VIS_ONLY __time_get_c_storage
{
protected:
typedef basic_string<_CharT> string_type;
locale::id
time_get<_CharT, _InputIterator>::id;
-// time_get primatives
+// time_get primitives
template <class _CharT, class _InputIterator>
void
__err |= ios_base::eofbit;
}
-// time_get end primatives
+// time_get end primitives
template <class _CharT, class _InputIterator>
_InputIterator
};
template <class _CharT>
-class _LIBCPP_TYPE_VIS __time_get_storage
+class _LIBCPP_TYPE_VIS_ONLY __time_get_storage
: public __time_get
{
protected:
typename messages<_CharT>::catalog
messages<_CharT>::do_open(const basic_string<char>& __nm, const locale&) const
{
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__ANDROID__)
return -1;
-#else // _WIN32
+#else // _WIN32 || __ANDROID__
catalog __cat = (catalog)catopen(__nm.c_str(), NL_CAT_LOCALE);
if (__cat != -1)
__cat = static_cast<catalog>((static_cast<size_t>(__cat) >> 1));
return __cat;
-#endif // _WIN32
+#endif // _WIN32 || __ANDROID__
}
template <class _CharT>
messages<_CharT>::do_get(catalog __c, int __set, int __msgid,
const string_type& __dflt) const
{
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__ANDROID__)
return __dflt;
#else // _WIN32
string __ndflt;
void
messages<_CharT>::do_close(catalog __c) const
{
-#if !defined(_WIN32)
+#if !defined(_WIN32) && !defined(__ANDROID__)
if (__c != -1)
__c <<= 1;
nl_catd __cat = (nl_catd)__c;