aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/__support
diff options
context:
space:
mode:
authorAlexSm <alex@ydb.tech>2023-12-27 23:31:58 +0100
committerGitHub <noreply@github.com>2023-12-27 23:31:58 +0100
commitd67bfb4b4b7549081543e87a31bc6cb5c46ac973 (patch)
tree8674f2f1570877cb653e7ddcff37ba00288de15a /contrib/libs/cxxsupp/libcxx/include/__support
parent1f6bef05ed441c3aa2d565ac792b26cded704ac7 (diff)
downloadydb-d67bfb4b4b7549081543e87a31bc6cb5c46ac973.tar.gz
Import libs 4 (#758)
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__support')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/android/locale_bionic.h12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/ibm/limits.h98
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/ibm/support.h53
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/ibm/xlocale.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__posix_l_fallback.h78
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__strtonum_fallback.h24
6 files changed, 60 insertions, 208 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/android/locale_bionic.h b/contrib/libs/cxxsupp/libcxx/include/__support/android/locale_bionic.h
index 535bad7856..c41e26420f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/android/locale_bionic.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/android/locale_bionic.h
@@ -46,18 +46,18 @@ extern "C" {
extern "C" {
#endif
-inline _LIBCPP_INLINE_VISIBILITY float strtof_l(const char* __nptr, char** __endptr,
- locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI float
+strtof_l(const char* __nptr, char** __endptr, locale_t) {
return ::strtof(__nptr, __endptr);
}
-inline _LIBCPP_INLINE_VISIBILITY double strtod_l(const char* __nptr,
- char** __endptr, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI double
+strtod_l(const char* __nptr, char** __endptr, locale_t) {
return ::strtod(__nptr, __endptr);
}
-inline _LIBCPP_INLINE_VISIBILITY long strtol_l(const char* __nptr, char** __endptr,
- int __base, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI long
+strtol_l(const char* __nptr, char** __endptr, int __base, locale_t) {
return ::strtol(__nptr, __endptr, __base);
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/ibm/limits.h b/contrib/libs/cxxsupp/libcxx/include/__support/ibm/limits.h
deleted file mode 100644
index 45f1f1e368..0000000000
--- a/contrib/libs/cxxsupp/libcxx/include/__support/ibm/limits.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// -*- C++ -*-
-//===-----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef _LIBCPP_SUPPORT_IBM_LIMITS_H
-#define _LIBCPP_SUPPORT_IBM_LIMITS_H
-
-#if !defined(_AIX) // Linux
-#include <math.h> // for HUGE_VAL, HUGE_VALF, HUGE_VALL, and NAN
-
-static const unsigned int _QNAN_F = 0x7fc00000;
-#define NANF (*((float *)(&_QNAN_F)))
-static const unsigned int _QNAN_LDBL128[4] = {0x7ff80000, 0x0, 0x0, 0x0};
-#define NANL (*((long double *)(&_QNAN_LDBL128)))
-static const unsigned int _SNAN_F= 0x7f855555;
-#define NANSF (*((float *)(&_SNAN_F)))
-static const unsigned int _SNAN_D[2] = {0x7ff55555, 0x55555555};
-#define NANS (*((double *)(&_SNAN_D)))
-static const unsigned int _SNAN_LDBL128[4] = {0x7ff55555, 0x55555555, 0x0, 0x0};
-#define NANSL (*((long double *)(&_SNAN_LDBL128)))
-
-#define __builtin_huge_val() HUGE_VAL
-#define __builtin_huge_valf() HUGE_VALF
-#define __builtin_huge_vall() HUGE_VALL
-#define __builtin_nan(__dummy) NAN
-#define __builtin_nanf(__dummy) NANF
-#define __builtin_nanl(__dummy) NANL
-#define __builtin_nans(__dummy) NANS
-#define __builtin_nansf(__dummy) NANSF
-#define __builtin_nansl(__dummy) NANSL
-
-#else
-
-#include <math.h>
-#include <float.h> // limit constants
-
-#define __builtin_huge_val() HUGE_VAL //0x7ff0000000000000
-#define __builtin_huge_valf() HUGE_VALF //0x7f800000
-#define __builtin_huge_vall() HUGE_VALL //0x7ff0000000000000
-#define __builtin_nan(__dummy) nan(__dummy) //0x7ff8000000000000
-#define __builtin_nanf(__dummy) nanf(__dummy) // 0x7ff80000
-#define __builtin_nanl(__dummy) nanl(__dummy) //0x7ff8000000000000
-#define __builtin_nans(__dummy) DBL_SNAN //0x7ff5555555555555
-#define __builtin_nansf(__dummy) FLT_SNAN //0x7f855555
-#define __builtin_nansl(__dummy) DBL_SNAN //0x7ff5555555555555
-
-#define __FLT_MANT_DIG__ FLT_MANT_DIG
-#define __FLT_DIG__ FLT_DIG
-#define __FLT_RADIX__ FLT_RADIX
-#define __FLT_MIN_EXP__ FLT_MIN_EXP
-#define __FLT_MIN_10_EXP__ FLT_MIN_10_EXP
-#define __FLT_MAX_EXP__ FLT_MAX_EXP
-#define __FLT_MAX_10_EXP__ FLT_MAX_10_EXP
-#define __FLT_MIN__ FLT_MIN
-#define __FLT_MAX__ FLT_MAX
-#define __FLT_EPSILON__ FLT_EPSILON
-// predefined by XLC on LoP
-#define __FLT_DENORM_MIN__ 1.40129846e-45F
-
-#define __DBL_MANT_DIG__ DBL_MANT_DIG
-#define __DBL_DIG__ DBL_DIG
-#define __DBL_MIN_EXP__ DBL_MIN_EXP
-#define __DBL_MIN_10_EXP__ DBL_MIN_10_EXP
-#define __DBL_MAX_EXP__ DBL_MAX_EXP
-#define __DBL_MAX_10_EXP__ DBL_MAX_10_EXP
-#define __DBL_MIN__ DBL_MIN
-#define __DBL_MAX__ DBL_MAX
-#define __DBL_EPSILON__ DBL_EPSILON
-// predefined by XLC on LoP
-#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
-
-#define __LDBL_MANT_DIG__ LDBL_MANT_DIG
-#define __LDBL_DIG__ LDBL_DIG
-#define __LDBL_MIN_EXP__ LDBL_MIN_EXP
-#define __LDBL_MIN_10_EXP__ LDBL_MIN_10_EXP
-#define __LDBL_MAX_EXP__ LDBL_MAX_EXP
-#define __LDBL_MAX_10_EXP__ LDBL_MAX_10_EXP
-#define __LDBL_MIN__ LDBL_MIN
-#define __LDBL_MAX__ LDBL_MAX
-#define __LDBL_EPSILON__ LDBL_EPSILON
-// predefined by XLC on LoP
-#if __LONGDOUBLE128
-#define __LDBL_DENORM_MIN__ 4.94065645841246544176568792868221e-324L
-#else
-#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
-#endif
-
-// predefined by XLC on LoP
-#define __CHAR_BIT__ 8
-
-#endif // _AIX
-
-#endif // _LIBCPP_SUPPORT_IBM_LIMITS_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/ibm/support.h b/contrib/libs/cxxsupp/libcxx/include/__support/ibm/support.h
deleted file mode 100644
index a7751b0176..0000000000
--- a/contrib/libs/cxxsupp/libcxx/include/__support/ibm/support.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// -*- C++ -*-
-//===-----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef _LIBCPP_SUPPORT_IBM_SUPPORT_H
-#define _LIBCPP_SUPPORT_IBM_SUPPORT_H
-
-extern "builtin" int __popcnt4(unsigned int);
-extern "builtin" int __popcnt8(unsigned long long);
-extern "builtin" unsigned int __cnttz4(unsigned int);
-extern "builtin" unsigned int __cnttz8(unsigned long long);
-extern "builtin" unsigned int __cntlz4(unsigned int);
-extern "builtin" unsigned int __cntlz8(unsigned long long);
-
-// Builtin functions for counting population
-#define __builtin_popcount(x) __popcnt4(x)
-#define __builtin_popcountll(x) __popcnt8(x)
-#if defined(__64BIT__)
-#define __builtin_popcountl(x) __builtin_popcountll(x)
-#else
-#define __builtin_popcountl(x) __builtin_popcount(x)
-#endif
-
-// Builtin functions for counting trailing zeros
-#define __builtin_ctz(x) __cnttz4(x)
-#define __builtin_ctzll(x) __cnttz8(x)
-#if defined(__64BIT__)
-#define __builtin_ctzl(x) __builtin_ctzll(x)
-#else
-#define __builtin_ctzl(x) __builtin_ctz(x)
-#endif
-
-// Builtin functions for counting leading zeros
-#define __builtin_clz(x) __cntlz4(x)
-#define __builtin_clzll(x) __cntlz8(x)
-#if defined(__64BIT__)
-#define __builtin_clzl(x) __builtin_clzll(x)
-#else
-#define __builtin_clzl(x) __builtin_clz(x)
-#endif
-
-#if defined(__64BIT__)
-#define __SIZE_WIDTH__ 64
-#else
-#define __SIZE_WIDTH__ 32
-#endif
-
-#endif // _LIBCPP_SUPPORT_IBM_SUPPORT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/ibm/xlocale.h b/contrib/libs/cxxsupp/libcxx/include/__support/ibm/xlocale.h
index 11c1847e4c..5a09212c6a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/ibm/xlocale.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/ibm/xlocale.h
@@ -10,7 +10,10 @@
#ifndef _LIBCPP_SUPPORT_IBM_XLOCALE_H
#define _LIBCPP_SUPPORT_IBM_XLOCALE_H
+#if defined(__MVS__)
#include <__support/ibm/locale_mgmt_zos.h>
+#endif // defined(__MVS__)
+
#include <stdarg.h>
#include "cstdlib"
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__posix_l_fallback.h b/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__posix_l_fallback.h
index e2b1f62f57..294149eb8f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__posix_l_fallback.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__posix_l_fallback.h
@@ -19,141 +19,141 @@
extern "C" {
#endif
-inline _LIBCPP_INLINE_VISIBILITY int isalnum_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isalnum_l(int __c, locale_t) {
return ::isalnum(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int isalpha_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isalpha_l(int __c, locale_t) {
return ::isalpha(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int isblank_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isblank_l(int __c, locale_t) {
return ::isblank(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int iscntrl_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iscntrl_l(int __c, locale_t) {
return ::iscntrl(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int isdigit_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isdigit_l(int __c, locale_t) {
return ::isdigit(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int isgraph_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isgraph_l(int __c, locale_t) {
return ::isgraph(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int islower_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int islower_l(int __c, locale_t) {
return ::islower(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int isprint_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isprint_l(int __c, locale_t) {
return ::isprint(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int ispunct_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int ispunct_l(int __c, locale_t) {
return ::ispunct(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int isspace_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isspace_l(int __c, locale_t) {
return ::isspace(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int isupper_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isupper_l(int __c, locale_t) {
return ::isupper(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int isxdigit_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isxdigit_l(int __c, locale_t) {
return ::isxdigit(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int iswalnum_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswalnum_l(wint_t __c, locale_t) {
return ::iswalnum(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int iswalpha_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswalpha_l(wint_t __c, locale_t) {
return ::iswalpha(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int iswblank_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswblank_l(wint_t __c, locale_t) {
return ::iswblank(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int iswcntrl_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswcntrl_l(wint_t __c, locale_t) {
return ::iswcntrl(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int iswdigit_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswdigit_l(wint_t __c, locale_t) {
return ::iswdigit(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int iswgraph_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswgraph_l(wint_t __c, locale_t) {
return ::iswgraph(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int iswlower_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswlower_l(wint_t __c, locale_t) {
return ::iswlower(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int iswprint_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswprint_l(wint_t __c, locale_t) {
return ::iswprint(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int iswpunct_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswpunct_l(wint_t __c, locale_t) {
return ::iswpunct(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int iswspace_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswspace_l(wint_t __c, locale_t) {
return ::iswspace(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int iswupper_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswupper_l(wint_t __c, locale_t) {
return ::iswupper(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int iswxdigit_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswxdigit_l(wint_t __c, locale_t) {
return ::iswxdigit(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int toupper_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int toupper_l(int __c, locale_t) {
return ::toupper(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int tolower_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int tolower_l(int __c, locale_t) {
return ::tolower(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY wint_t towupper_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI wint_t towupper_l(wint_t __c, locale_t) {
return ::towupper(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY wint_t towlower_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI wint_t towlower_l(wint_t __c, locale_t) {
return ::towlower(__c);
}
-inline _LIBCPP_INLINE_VISIBILITY int strcoll_l(const char *__s1, const char *__s2,
- locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int
+strcoll_l(const char *__s1, const char *__s2, locale_t) {
return ::strcoll(__s1, __s2);
}
-inline _LIBCPP_INLINE_VISIBILITY size_t strxfrm_l(char *__dest, const char *__src,
- size_t __n, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI size_t
+strxfrm_l(char *__dest, const char *__src, size_t __n, locale_t) {
return ::strxfrm(__dest, __src, __n);
}
-inline _LIBCPP_INLINE_VISIBILITY size_t strftime_l(char *__s, size_t __max,
- const char *__format,
- const struct tm *__tm, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI size_t
+strftime_l(char *__s, size_t __max, const char *__format, const struct tm *__tm,
+ locale_t) {
return ::strftime(__s, __max, __format, __tm);
}
-inline _LIBCPP_INLINE_VISIBILITY int wcscoll_l(const wchar_t *__ws1,
- const wchar_t *__ws2, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int
+wcscoll_l(const wchar_t *__ws1, const wchar_t *__ws2, locale_t) {
return ::wcscoll(__ws1, __ws2);
}
-inline _LIBCPP_INLINE_VISIBILITY size_t wcsxfrm_l(wchar_t *__dest, const wchar_t *__src,
- size_t __n, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI size_t
+wcsxfrm_l(wchar_t *__dest, const wchar_t *__src, size_t __n, locale_t) {
return ::wcsxfrm(__dest, __src, __n);
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__strtonum_fallback.h b/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__strtonum_fallback.h
index 497148a662..19780909b2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__strtonum_fallback.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/xlocale/__strtonum_fallback.h
@@ -19,43 +19,43 @@
extern "C" {
#endif
-inline _LIBCPP_INLINE_VISIBILITY float strtof_l(const char *__nptr,
- char **__endptr, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI float
+strtof_l(const char *__nptr, char **__endptr, locale_t) {
return ::strtof(__nptr, __endptr);
}
-inline _LIBCPP_INLINE_VISIBILITY double strtod_l(const char *__nptr,
- char **__endptr, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI double
+strtod_l(const char *__nptr, char **__endptr, locale_t) {
return ::strtod(__nptr, __endptr);
}
-inline _LIBCPP_INLINE_VISIBILITY long double strtold_l(const char *__nptr,
- char **__endptr, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI long double
+strtold_l(const char *__nptr, char **__endptr, locale_t) {
return ::strtold(__nptr, __endptr);
}
-inline _LIBCPP_INLINE_VISIBILITY long long
+inline _LIBCPP_HIDE_FROM_ABI long long
strtoll_l(const char *__nptr, char **__endptr, int __base, locale_t) {
return ::strtoll(__nptr, __endptr, __base);
}
-inline _LIBCPP_INLINE_VISIBILITY unsigned long long
+inline _LIBCPP_HIDE_FROM_ABI unsigned long long
strtoull_l(const char *__nptr, char **__endptr, int __base, locale_t) {
return ::strtoull(__nptr, __endptr, __base);
}
-inline _LIBCPP_INLINE_VISIBILITY long long
+inline _LIBCPP_HIDE_FROM_ABI long long
wcstoll_l(const wchar_t *__nptr, wchar_t **__endptr, int __base, locale_t) {
return ::wcstoll(__nptr, __endptr, __base);
}
-inline _LIBCPP_INLINE_VISIBILITY unsigned long long
+inline _LIBCPP_HIDE_FROM_ABI unsigned long long
wcstoull_l(const wchar_t *__nptr, wchar_t **__endptr, int __base, locale_t) {
return ::wcstoull(__nptr, __endptr, __base);
}
-inline _LIBCPP_INLINE_VISIBILITY long double wcstold_l(const wchar_t *__nptr,
- wchar_t **__endptr, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI long double
+wcstold_l(const wchar_t *__nptr, wchar_t **__endptr, locale_t) {
return ::wcstold(__nptr, __endptr);
}