aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxxmsvc/.yandex_meta/patches/18-locale-win32.patch
diff options
context:
space:
mode:
authormaxim-yurchuk <maxim-yurchuk@yandex-team.com>2024-10-09 12:29:46 +0300
committermaxim-yurchuk <maxim-yurchuk@yandex-team.com>2024-10-09 13:14:22 +0300
commit9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 (patch)
treea8fb3181d5947c0d78cf402aa56e686130179049 /contrib/libs/cxxsupp/libcxxmsvc/.yandex_meta/patches/18-locale-win32.patch
parenta44b779cd359f06c3ebbef4ec98c6b38609d9d85 (diff)
downloadydb-9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80.tar.gz
publishFullContrib: true for ydb
<HIDDEN_URL> commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
Diffstat (limited to 'contrib/libs/cxxsupp/libcxxmsvc/.yandex_meta/patches/18-locale-win32.patch')
-rw-r--r--contrib/libs/cxxsupp/libcxxmsvc/.yandex_meta/patches/18-locale-win32.patch124
1 files changed, 124 insertions, 0 deletions
diff --git a/contrib/libs/cxxsupp/libcxxmsvc/.yandex_meta/patches/18-locale-win32.patch b/contrib/libs/cxxsupp/libcxxmsvc/.yandex_meta/patches/18-locale-win32.patch
new file mode 100644
index 0000000000..189f0cf864
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxxmsvc/.yandex_meta/patches/18-locale-win32.patch
@@ -0,0 +1,124 @@
+diff --git a/include/__support/win32/locale_win32.h b/include/__support/win32/locale_win32.h
+index 3824d66..8456b05 100644
+--- a/include/__support/win32/locale_win32.h
++++ b/include/__support/win32/locale_win32.h
+@@ -40,12 +40,8 @@
+ #define LC_NUMERIC_MASK _M_NUMERIC
+ #define LC_TIME_MASK _M_TIME
+ #define LC_MESSAGES_MASK _M_MESSAGES
+-#define LC_ALL_MASK ( LC_COLLATE_MASK \
+- | LC_CTYPE_MASK \
+- | LC_MESSAGES_MASK \
+- | LC_MONETARY_MASK \
+- | LC_NUMERIC_MASK \
+- | LC_TIME_MASK )
++#define LC_MESSAGES _X_MESSAGES
++#define LC_ALL_MASK _M_ALL
+
+ class __lconv_storage {
+ public:
+@@ -193,21 +189,21 @@ locale_t newlocale( int mask, const char * locale, locale_t base );
+ // We can still implement raii even without uselocale though.
+
+
+-lconv *localeconv_l( locale_t &loc );
+-size_t mbrlen_l( const char *__restrict s, size_t n,
+- mbstate_t *__restrict ps, locale_t loc);
+-size_t mbsrtowcs_l( wchar_t *__restrict dst, const char **__restrict src,
+- size_t len, mbstate_t *__restrict ps, locale_t loc );
+-size_t wcrtomb_l( char *__restrict s, wchar_t wc, mbstate_t *__restrict ps,
+- locale_t loc);
+-size_t mbrtowc_l( wchar_t *__restrict pwc, const char *__restrict s,
+- size_t n, mbstate_t *__restrict ps, locale_t loc);
+-size_t mbsnrtowcs_l( wchar_t *__restrict dst, const char **__restrict src,
+- size_t nms, size_t len, mbstate_t *__restrict ps, locale_t loc);
+-size_t wcsnrtombs_l( char *__restrict dst, const wchar_t **__restrict src,
+- size_t nwc, size_t len, mbstate_t *__restrict ps, locale_t loc);
+-wint_t btowc_l( int c, locale_t loc );
+-int wctob_l( wint_t c, locale_t loc );
++lconv *localeconv_l( locale_t &__loc );
++size_t mbrlen_l( const char *__restrict __s, size_t __n,
++ mbstate_t *__restrict __ps, locale_t __loc);
++size_t mbsrtowcs_l( wchar_t *__restrict __dst, const char **__restrict __src,
++ size_t __len, mbstate_t *__restrict __ps, locale_t __loc );
++size_t wcrtomb_l( char *__restrict s, wchar_t __wc, mbstate_t *__restrict __ps,
++ locale_t __loc);
++size_t mbrtowc_l( wchar_t *__restrict __pwc, const char *__restrict __s,
++ size_t __n, mbstate_t *__restrict __ps, locale_t __loc);
++size_t mbsnrtowcs_l( wchar_t *__restrict __dst, const char **__restrict __src,
++ size_t __nms, size_t __len, mbstate_t *__restrict __ps, locale_t __loc);
++size_t wcsnrtombs_l( char *__restrict __dst, const wchar_t **__restrict __src,
++ size_t __nwc, size_t __len, mbstate_t *__restrict __ps, locale_t __loc);
++wint_t btowc_l( int __c, locale_t __loc );
++int wctob_l( wint_t __c, locale_t __loc );
+
+ decltype(MB_CUR_MAX) MB_CUR_MAX_L( locale_t __l );
+
+@@ -218,25 +214,14 @@ decltype(MB_CUR_MAX) MB_CUR_MAX_L( locale_t __l );
+ #define strtod_l _strtod_l
+ #if defined(_LIBCPP_MSVCRT)
+ #define strtof_l _strtof_l
+-#define strtold_l _strtold_l
++#define strtold_l _strtod_l
+ #else
+ _LIBCPP_FUNC_VIS float strtof_l(const char*, char**, locale_t);
+ _LIBCPP_FUNC_VIS long double strtold_l(const char*, char**, locale_t);
+ #endif
+-inline _LIBCPP_INLINE_VISIBILITY
+-int
+-islower_l(int c, _locale_t loc)
+-{
+- return _islower_l((int)c, loc);
+-}
+-
+-inline _LIBCPP_INLINE_VISIBILITY
+-int
+-isupper_l(int c, _locale_t loc)
+-{
+- return _isupper_l((int)c, loc);
+-}
+-
++#define isupper_l _isupper_l
++#define islower_l _islower_l
++#define isblank_l _isblank_l
+ #define isdigit_l _isdigit_l
+ #define isxdigit_l _isxdigit_l
+ #define strcoll_l _strcoll_l
+@@ -250,6 +235,7 @@ isupper_l(int c, _locale_t loc)
+ #define iswcntrl_l _iswcntrl_l
+ #define iswupper_l _iswupper_l
+ #define iswlower_l _iswlower_l
++#define iswblank_l _iswblank_l
+ #define iswalpha_l _iswalpha_l
+ #define iswdigit_l _iswdigit_l
+ #define iswpunct_l _iswpunct_l
+@@ -262,22 +248,12 @@ _LIBCPP_FUNC_VIS size_t strftime_l(char *ret, size_t n, const char *format,
+ #else
+ #define strftime_l _strftime_l
+ #endif
+-#define sscanf_l( __s, __l, __f, ...) _sscanf_l( __s, __f, __l, __VA_ARGS__ )
+-#define sprintf_l( __s, __l, __f, ... ) _sprintf_l( __s, __f, __l, __VA_ARGS__ )
+-#define vsprintf_l( __s, __l, __f, ... ) _vsprintf_l( __s, __f, __l, __VA_ARGS__ )
+-#define vsnprintf_l( __s, __n, __l, __f, ... ) _vsnprintf_l( __s, __n, __f, __l, __VA_ARGS__ )
+-_LIBCPP_FUNC_VIS int snprintf_l(char *ret, size_t n, locale_t loc, const char *format, ...);
+-_LIBCPP_FUNC_VIS int asprintf_l( char **ret, locale_t loc, const char *format, ... );
+-_LIBCPP_FUNC_VIS int vasprintf_l( char **ret, locale_t loc, const char *format, va_list ap );
+-
+-// not-so-pressing FIXME: use locale to determine blank characters
+-inline int isblank_l( int c, locale_t /*loc*/ )
+-{
+- return ( c == ' ' || c == '\t' );
+-}
+-inline int iswblank_l( wint_t c, locale_t /*loc*/ )
+-{
+- return ( c == L' ' || c == L'\t' );
+-}
++#define sscanf_l( __s, __l, __f, ...) _sscanf_l( __s, __f, __l, ##__VA_ARGS__ )
++#define sprintf_l( __s, __l, __f, ... ) _sprintf_l( __s, __f, __l, ##__VA_ARGS__ )
++#define vsprintf_l( __s, __l, __f, ... ) _vsprintf_l( __s, __f, __l, ##__VA_ARGS__ )
++#define vsnprintf_l( __s, __n, __l, __f, ... ) _vsnprintf_l( __s, __n, __f, __l, ##__VA_ARGS__ )
++#define snprintf_l(__s, __n, __l, __f, ...) _snprintf_l( __s, __n, __f, __l, ##__VA_ARGS__ )
++_LIBCPP_FUNC_VIS int asprintf_l( char **__ret, locale_t __loc, const char *__format, ... );
++_LIBCPP_FUNC_VIS int vasprintf_l( char **__ret, locale_t __loc, const char *__format, va_list __ap );
+
+ #endif // _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H