{
(*__p)->__c_ = nullptr;
if (--__c->end_ != __p)
- memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
+ _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
}
}
__get_db()->unlock();
{
(*__dp)->__c_ = nullptr;
if (--__c->end_ != __dp)
- memmove(__dp, __dp+1, (__c->end_ - __dp)*sizeof(__i_node*));
+ _VSTD::memmove(__dp, __dp+1, (__c->end_ - __dp)*sizeof(__i_node*));
}
}
__get_db()->unlock();
// locale name, otherwise it will be a semicolon-separated string listing
// each category. In the second case, we know at least one category won't
// be what we want, so we only have to check the first case.
- if (strcmp(__l.__get_locale(), __lc) != 0) {
+ if (_VSTD::strcmp(__l.__get_locale(), __lc) != 0) {
__locale_all = _strdup(__lc);
if (__locale_all == nullptr)
__throw_bad_alloc();
#include <__config>
#include <algorithm> // for search and min
-#include <cstdio> // For EOF.
+#include <cstdio> // for EOF
+#include <cstring> // for memcpy
+#include <cwchar> // for wmemcpy
#include <memory> // for __murmur2_or_cityhash
#include <__debug>
{
return __libcpp_is_constant_evaluated()
? _VSTD::__move_constexpr(__s1, __s2, __n)
- : __n == 0 ? __s1 : (char_type*)memmove(__s1, __s2, __n);
+ : __n == 0 ? __s1 : (char_type*)_VSTD::memmove(__s1, __s2, __n);
}
static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
_LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
return __libcpp_is_constant_evaluated()
? _VSTD::__copy_constexpr(__s1, __s2, __n)
- : __n == 0 ? __s1 : (char_type*)memcpy(__s1, __s2, __n);
+ : __n == 0 ? __s1 : (char_type*)_VSTD::memcpy(__s1, __s2, __n);
}
static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT
{
return __libcpp_is_constant_evaluated()
? _VSTD::__assign_constexpr(__s, __n, __a)
- : __n == 0 ? __s : (char_type*)memset(__s, to_int_type(__a), __n);
+ : __n == 0 ? __s : (char_type*)_VSTD::memset(__s, to_int_type(__a), __n);
}
static inline _LIBCPP_CONSTEXPR int_type not_eof(int_type __c) _NOEXCEPT
#if __has_feature(cxx_constexpr_string_builtins)
return __builtin_memcmp(__s1, __s2, __n);
#elif _LIBCPP_STD_VER <= 14
- return memcmp(__s1, __s2, __n);
+ return _VSTD::memcmp(__s1, __s2, __n);
#else
for (; __n; --__n, ++__s1, ++__s2)
{
#if __has_feature(cxx_constexpr_string_builtins)
return __builtin_char_memchr(__s, to_int_type(__a), __n);
#elif _LIBCPP_STD_VER <= 14
- return (const char_type*) memchr(__s, to_int_type(__a), __n);
+ return (const char_type*) _VSTD::memchr(__s, to_int_type(__a), __n);
#else
for (; __n; --__n)
{
{
return __libcpp_is_constant_evaluated()
? _VSTD::__move_constexpr(__s1, __s2, __n)
- : __n == 0 ? __s1 : wmemmove(__s1, __s2, __n);
+ : __n == 0 ? __s1 : _VSTD::wmemmove(__s1, __s2, __n);
}
static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
_LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
return __libcpp_is_constant_evaluated()
? _VSTD::__copy_constexpr(__s1, __s2, __n)
- : __n == 0 ? __s1 : wmemcpy(__s1, __s2, __n);
+ : __n == 0 ? __s1 : _VSTD::wmemcpy(__s1, __s2, __n);
}
static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT
{
return __libcpp_is_constant_evaluated()
? _VSTD::__assign_constexpr(__s, __n, __a)
- : __n == 0 ? __s : wmemset(__s, __a, __n);
+ : __n == 0 ? __s : _VSTD::wmemset(__s, __a, __n);
}
static inline _LIBCPP_CONSTEXPR int_type not_eof(int_type __c) _NOEXCEPT
{return eq_int_type(__c, eof()) ? ~eof() : __c;}
#if __has_feature(cxx_constexpr_string_builtins)
return __builtin_wmemcmp(__s1, __s2, __n);
#elif _LIBCPP_STD_VER <= 14
- return wmemcmp(__s1, __s2, __n);
+ return _VSTD::wmemcmp(__s1, __s2, __n);
#else
for (; __n; --__n, ++__s1, ++__s2)
{
#if __has_feature(cxx_constexpr_string_builtins)
return __builtin_wcslen(__s);
#elif _LIBCPP_STD_VER <= 14
- return wcslen(__s);
+ return _VSTD::wcslen(__s);
#else
size_t __len = 0;
for (; !eq(*__s, char_type(0)); ++__s)
#if __has_feature(cxx_constexpr_string_builtins)
return __builtin_wmemchr(__s, __a, __n);
#elif _LIBCPP_STD_VER <= 14
- return wmemchr(__s, __a, __n);
+ return _VSTD::wmemchr(__s, __a, __n);
#else
for (; __n; --__n)
{
{
return __libcpp_is_constant_evaluated()
? _VSTD::__move_constexpr(__s1, __s2, __n)
- : __n == 0 ? __s1 : (char_type*)memmove(__s1, __s2, __n);
+ : __n == 0 ? __s1 : (char_type*)_VSTD::memmove(__s1, __s2, __n);
}
static _LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
return __libcpp_is_constant_evaluated()
? _VSTD::__copy_constexpr(__s1, __s2, __n)
- : __n == 0 ? __s1 : (char_type*)memcpy(__s1, __s2, __n);
+ : __n == 0 ? __s1 : (char_type*)_VSTD::memcpy(__s1, __s2, __n);
}
static _LIBCPP_CONSTEXPR_AFTER_CXX17
{
return __libcpp_is_constant_evaluated()
? _VSTD::__assign_constexpr(__s, __n, __a)
- : __n == 0 ? __s : (char_type*)memset(__s, to_int_type(__a), __n);
+ : __n == 0 ? __s : (char_type*)_VSTD::memset(__s, to_int_type(__a), __n);
}
static inline constexpr int_type not_eof(int_type __c) noexcept
template <typename _Tp> _LIBCPP_INLINE_VISIBILITY
bool __cxx_nonatomic_compare_equal(_Tp const& __lhs, _Tp const& __rhs) {
- return memcmp(&__lhs, &__rhs, sizeof(_Tp)) == 0;
+ return _VSTD::memcmp(&__lhs, &__rhs, sizeof(_Tp)) == 0;
}
static_assert((is_same<underlying_type<memory_order>::type, __memory_order_underlying_t>::value),
_Tp __temp;
__a->__lock();
__cxx_atomic_assign_volatile(__temp, __a->__a_value);
- bool __ret = (memcmp(&__temp, __expected, sizeof(_Tp)) == 0);
+ bool __ret = (_VSTD::memcmp(&__temp, __expected, sizeof(_Tp)) == 0);
if(__ret)
__cxx_atomic_assign_volatile(__a->__a_value, __value);
else
bool __cxx_atomic_compare_exchange_strong(__cxx_atomic_lock_impl<_Tp>* __a,
_Tp* __expected, _Tp __value, memory_order, memory_order) {
__a->__lock();
- bool __ret = (memcmp(&__a->__a_value, __expected, sizeof(_Tp)) == 0);
+ bool __ret = (_VSTD::memcmp(&__a->__a_value, __expected, sizeof(_Tp)) == 0);
if(__ret)
- memcpy(&__a->__a_value, &__value, sizeof(_Tp));
+ _VSTD::memcpy(&__a->__a_value, &__value, sizeof(_Tp));
else
- memcpy(__expected, &__a->__a_value, sizeof(_Tp));
+ _VSTD::memcpy(__expected, &__a->__a_value, sizeof(_Tp));
__a->__unlock();
return __ret;
}
_Tp __temp;
__a->__lock();
__cxx_atomic_assign_volatile(__temp, __a->__a_value);
- bool __ret = (memcmp(&__temp, __expected, sizeof(_Tp)) == 0);
+ bool __ret = (_VSTD::memcmp(&__temp, __expected, sizeof(_Tp)) == 0);
if(__ret)
__cxx_atomic_assign_volatile(__a->__a_value, __value);
else
bool __cxx_atomic_compare_exchange_weak(__cxx_atomic_lock_impl<_Tp>* __a,
_Tp* __expected, _Tp __value, memory_order, memory_order) {
__a->__lock();
- bool __ret = (memcmp(&__a->__a_value, __expected, sizeof(_Tp)) == 0);
+ bool __ret = (_VSTD::memcmp(&__a->__a_value, __expected, sizeof(_Tp)) == 0);
if(__ret)
- memcpy(&__a->__a_value, &__value, sizeof(_Tp));
+ _VSTD::memcpy(&__a->__a_value, &__value, sizeof(_Tp));
else
- memcpy(__expected, &__a->__a_value, sizeof(_Tp));
+ _VSTD::memcpy(__expected, &__a->__a_value, sizeof(_Tp));
__a->__unlock();
return __ret;
}
int_type __c = traits_type::eof();
if (this->gptr() == this->egptr())
{
- memmove(this->eback(), this->egptr() - __unget_sz, __unget_sz * sizeof(char_type));
+ _VSTD::memmove(this->eback(), this->egptr() - __unget_sz, __unget_sz * sizeof(char_type));
if (__always_noconv_)
{
size_t __nmemb = static_cast<size_t>(this->egptr() - this->eback() - __unget_sz);
{
_LIBCPP_ASSERT ( !(__extbufnext_ == NULL && (__extbufend_ != __extbufnext_)), "underflow moving from NULL" );
if (__extbufend_ != __extbufnext_)
- memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_);
+ _VSTD::memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_);
__extbufnext_ = __extbuf_ + (__extbufend_ - __extbufnext_);
__extbufend_ = __extbuf_ + (__extbuf_ == __extbuf_min_ ? sizeof(__extbuf_min_) : __ebs_);
size_t __nmemb = _VSTD::min(static_cast<size_t>(__ibs_ - __unget_sz),
{
__cn2->__add(*__p);
if (--__cn1->end_ != __p)
- memmove(__p, __p+1, (__cn1->end_ - __p)*sizeof(__i_node*));
+ _VSTD::memmove(__p, __p+1, (__cn1->end_ - __p)*sizeof(__i_node*));
}
else
(*__p)->__c_ = __cn1;
{
__cn1->__add(*__p);
if (--__cn2->end_ != __p)
- memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*));
+ _VSTD::memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*));
}
else
(*__p)->__c_ = __cn2;
{
(*__p)->__c_ = nullptr;
if (--__c->end_ != __p)
- memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
+ _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
}
}
__get_db()->unlock();
{
(*__p)->__c_ = nullptr;
if (--__c->end_ != __p)
- memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
+ _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
}
}
__get_db()->unlock();
{
(*__ip)->__c_ = nullptr;
if (--__c->end_ != __ip)
- memmove(__ip, __ip+1, (__c->end_ - __ip)*sizeof(__i_node*));
+ _VSTD::memmove(__ip, __ip+1, (__c->end_ - __ip)*sizeof(__i_node*));
}
}
__get_db()->unlock();
{
(*__p)->__c_ = nullptr;
if (--__c->end_ != __p)
- memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
+ _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
}
}
__get_db()->unlock();
__cn1->__add(*__ip);
(*__ip)->__c_ = __cn1;
if (--__cn2->end_ != __ip)
- memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*));
+ _VSTD::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*));
}
}
__db->unlock();
__cn1->__add(*__ip);
(*__ip)->__c_ = __cn1;
if (--__cn2->end_ != __ip)
- memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*));
+ _VSTD::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*));
}
}
__db->unlock();
__cn1->__add(*__ip);
(*__ip)->__c_ = __cn1;
if (--__cn2->end_ != __ip)
- memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*));
+ _VSTD::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*));
}
}
}
__cn1->__add(*__p);
(*__p)->__c_ = __cn1;
if (--__cn2->end_ != __p)
- memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*));
+ _VSTD::memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*));
}
}
__db->unlock();
char* __n = catgets(__cat, __set, __msgid, __ndflt.c_str());
string_type __w;
__widen_from_utf8<sizeof(char_type)*__CHAR_BIT__>()(back_inserter(__w),
- __n, __n + strlen(__n));
+ __n, __n + _VSTD::strlen(__n));
return __w;
#else // !_LIBCPP_HAS_CATOPEN
_LIBCPP_UNUSED_VAR(__c);
int_type __c = traits_type::eof();
if (this->gptr() == this->egptr())
{
- memmove(this->eback(), this->egptr() - __unget_sz, __unget_sz * sizeof(char_type));
+ _VSTD::memmove(this->eback(), this->egptr() - __unget_sz, __unget_sz * sizeof(char_type));
if (__always_noconv_)
{
streamsize __nmemb = static_cast<streamsize>(this->egptr() - this->eback() - __unget_sz);
{
_LIBCPP_ASSERT(!(__extbufnext_ == NULL && (__extbufend_ != __extbufnext_)), "underflow moving from NULL" );
if (__extbufend_ != __extbufnext_)
- memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_);
+ _VSTD::memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_);
__extbufnext_ = __extbuf_ + (__extbufend_ - __extbufnext_);
__extbufend_ = __extbuf_ + (__extbuf_ == __extbuf_min_ ? sizeof(__extbuf_min_) : __ebs_);
streamsize __nmemb = _VSTD::min(static_cast<streamsize>(this->egptr() - this->eback() - __unget_sz),
{
(*__p)->__c_ = nullptr;
if (--__c->end_ != __p)
- memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
+ _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
}
}
__get_db()->unlock();
_LIBCPP_INLINE_VISIBILITY
ostrstream(char* __s, int __n, ios_base::openmode __mode = ios_base::out)
: ostream(&__sb_),
- __sb_(__s, __n, __s + (__mode & ios::app ? strlen(__s) : 0))
+ __sb_(__s, __n, __s + (__mode & ios::app ? _VSTD::strlen(__s) : 0))
{}
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
strstream(char* __s, int __n, ios_base::openmode __mode = ios_base::in | ios_base::out)
: iostream(&__sb_),
- __sb_(__s, __n, __s + (__mode & ios::app ? strlen(__s) : 0))
+ __sb_(__s, __n, __s + (__mode & ios::app ? _VSTD::strlen(__s) : 0))
{}
#ifndef _LIBCPP_CXX03_LANG
if (__i->base() > __new_last) {
(*__p)->__c_ = nullptr;
if (--__c->end_ != __p)
- memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
+ _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
}
}
__get_db()->unlock();