diff options
author | armenqa <armenqa@yandex-team.com> | 2024-01-19 12:23:50 +0300 |
---|---|---|
committer | armenqa <armenqa@yandex-team.com> | 2024-01-19 13:10:03 +0300 |
commit | 2de0149d0151c514b22bca0760b95b26c9b0b578 (patch) | |
tree | 2bfed9f3bce7e643ddf048bb61ce3dc0a714bcc2 /contrib/libs/cxxsupp/libcxx/include/string.h | |
parent | a8c06d218f12b2406fbce24d194885c5d7b68503 (diff) | |
download | ydb-2de0149d0151c514b22bca0760b95b26c9b0b578.tar.gz |
feat contrib: aiogram 3
Relates: https://st.yandex-team.ru/, https://st.yandex-team.ru/
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/string.h')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/string.h | 72 |
1 files changed, 37 insertions, 35 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/string.h b/contrib/libs/cxxsupp/libcxx/include/string.h index 082c632a29..3ec877bad3 100644 --- a/contrib/libs/cxxsupp/libcxx/include/string.h +++ b/contrib/libs/cxxsupp/libcxx/include/string.h @@ -57,7 +57,9 @@ size_t strlen(const char* s); # pragma GCC system_header #endif -#include_next <string.h> +#if __has_include_next(<string.h>) +# include_next <string.h> +#endif // MSVCRT, GNU libc and its derivates may already have the correct prototype in // <string.h>. This macro can be defined by users if their C library provides @@ -69,41 +71,41 @@ size_t strlen(const char* s); #if defined(__cplusplus) && !defined(_LIBCPP_STRING_H_HAS_CONST_OVERLOADS) && defined(_LIBCPP_PREFERRED_OVERLOAD) extern "C++" { -inline _LIBCPP_INLINE_VISIBILITY -char* __libcpp_strchr(const char* __s, int __c) {return (char*)strchr(__s, __c);} -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD -const char* strchr(const char* __s, int __c) {return __libcpp_strchr(__s, __c);} -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD - char* strchr( char* __s, int __c) {return __libcpp_strchr(__s, __c);} - -inline _LIBCPP_INLINE_VISIBILITY -char* __libcpp_strpbrk(const char* __s1, const char* __s2) {return (char*)strpbrk(__s1, __s2);} -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD -const char* strpbrk(const char* __s1, const char* __s2) {return __libcpp_strpbrk(__s1, __s2);} -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD - char* strpbrk( char* __s1, const char* __s2) {return __libcpp_strpbrk(__s1, __s2);} - -inline _LIBCPP_INLINE_VISIBILITY -char* __libcpp_strrchr(const char* __s, int __c) {return (char*)strrchr(__s, __c);} -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD -const char* strrchr(const char* __s, int __c) {return __libcpp_strrchr(__s, __c);} -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD - char* strrchr( char* __s, int __c) {return __libcpp_strrchr(__s, __c);} - -inline _LIBCPP_INLINE_VISIBILITY -void* __libcpp_memchr(const void* __s, int __c, size_t __n) {return (void*)memchr(__s, __c, __n);} -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD -const void* memchr(const void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);} -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD - void* memchr( void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);} - -inline _LIBCPP_INLINE_VISIBILITY -char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);} -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD -const char* strstr(const char* __s1, const char* __s2) {return __libcpp_strstr(__s1, __s2);} -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD - char* strstr( char* __s1, const char* __s2) {return __libcpp_strstr(__s1, __s2);} +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strchr(const char* __s, int __c) { + return __builtin_strchr(__s, __c); +} +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strchr(char* __s, int __c) { + return __builtin_strchr(__s, __c); +} + +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strpbrk(const char* __s1, const char* __s2) { + return __builtin_strpbrk(__s1, __s2); +} +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strpbrk(char* __s1, const char* __s2) { + return __builtin_strpbrk(__s1, __s2); +} + +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strrchr(const char* __s, int __c) { + return __builtin_strrchr(__s, __c); +} +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strrchr(char* __s, int __c) { + return __builtin_strrchr(__s, __c); +} + +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const void* memchr(const void* __s, int __c, size_t __n) { + return __builtin_memchr(__s, __c, __n); +} +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD void* memchr(void* __s, int __c, size_t __n) { + return __builtin_memchr(__s, __c, __n); +} + +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strstr(const char* __s1, const char* __s2) { + return __builtin_strstr(__s1, __s2); +} +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strstr(char* __s1, const char* __s2) { + return __builtin_strstr(__s1, __s2); } +} // extern "C++" #endif #endif // _LIBCPP_STRING_H |