aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgemtmp <gemtmp@yandex-team.com>2023-03-15 22:05:34 +0300
committergemtmp <gemtmp@yandex-team.com>2023-03-15 22:05:34 +0300
commitaf0ccdb33dabd69888206ac64acf95b632ac1b21 (patch)
tree4645de43b4c9714bd44d30bfc2a278cfb52b3a38
parent375bf331910edc492b41e0bae27b5ed1dd334ac4 (diff)
downloadydb-af0ccdb33dabd69888206ac64acf95b632ac1b21.tar.gz
add glibc-2.37 code for string and memory functions
-rw-r--r--build/sysincl/misc.yml131
-rw-r--r--contrib/libs/glibcasm/glibc/bits/libc-header-start.h110
-rw-r--r--contrib/libs/glibcasm/glibc/bits/stdint-intn.h29
-rw-r--r--contrib/libs/glibcasm/glibc/bits/stdint-uintn.h29
-rw-r--r--contrib/libs/glibcasm/glibc/bits/time64.h36
-rw-r--r--contrib/libs/glibcasm/glibc/bits/wchar.h49
-rw-r--r--contrib/libs/glibcasm/glibc/include/bits/types.h1
-rw-r--r--contrib/libs/glibcasm/glibc/include/features-time64.h1
-rw-r--r--contrib/libs/glibcasm/glibc/include/features.h518
-rw-r--r--contrib/libs/glibcasm/glibc/include/gnu/stubs.h2
-rw-r--r--contrib/libs/glibcasm/glibc/include/stdc-predef.h64
-rw-r--r--contrib/libs/glibcasm/glibc/include/stdint.h1
-rw-r--r--contrib/libs/glibcasm/glibc/include/sys/cdefs.h45
-rw-r--r--contrib/libs/glibcasm/glibc/misc/sys/cdefs.h705
-rw-r--r--contrib/libs/glibcasm/glibc/posix/bits/types.h228
-rw-r--r--contrib/libs/glibcasm/glibc/stdlib/stdint.h319
-rw-r--r--contrib/libs/glibcasm/glibc/sysdeps/ieee754/ldbl-96/bits/long-double.h21
-rw-r--r--contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/features-time64.h37
-rw-r--r--contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/x86/bits/timesize.h27
-rw-r--r--contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h106
-rw-r--r--contrib/libs/glibcasm/glibc/sysdeps/x86/bits/wordsize.h17
21 files changed, 2476 insertions, 0 deletions
diff --git a/build/sysincl/misc.yml b/build/sysincl/misc.yml
index 4911f5889c..15f35c3ed2 100644
--- a/build/sysincl/misc.yml
+++ b/build/sysincl/misc.yml
@@ -513,3 +513,134 @@
- lwip/stats.h
- lwip/sys.h
- lwip/tcpip.h
+
+- source_filter: "^contrib/libs/glibcasm"
+ includes:
+ - alloca.h: contrib/libs/glibcasm/glibc/include/alloca.h
+ - assert.h: contrib/libs/glibcasm/glibc/include/assert.h
+ - bits/atomic_wide_counter.h:
+ - contrib/libs/glibcasm/glibc/bits/atomic_wide_counter.h
+ - contrib/libs/glibcasm/glibc/include/bits/atomic_wide_counter.h
+ - bits/dl_find_object.h:
+ - contrib/libs/glibcasm/glibc/include/bits/dl_find_object.h
+ - contrib/libs/glibcasm/glibc/sysdeps/x86/bits/dl_find_object.h
+ - bits/endian.h: contrib/libs/glibcasm/glibc/include/bits/endian.h
+ - bits/libc-header-start.h: contrib/libs/glibcasm/glibc/bits/libc-header-start.h
+ - bits/long-double.h: contrib/libs/glibcasm/glibc/sysdeps/ieee754/ldbl-96/bits/long-double.h
+ - bits/sigstack.h:
+ - contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/bits/sigstack.h
+ - contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/x86/include/bits/sigstack.h
+ - contrib/libs/glibcasm/glibc/include/bits/sigstack.h
+ - bits/stdint-intn.h: contrib/libs/glibcasm/glibc/bits/stdint-intn.h
+ - bits/stdint-uintn.h: contrib/libs/glibcasm/glibc/bits/stdint-uintn.h
+ - bits/time64.h: contrib/libs/glibcasm/glibc/bits/time64.h
+ - bits/timesize.h: contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/x86/bits/timesize.h
+ - bits/typesizes.h: contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
+ - bits/types.h: contrib/libs/glibcasm/glibc/include/bits/types.h
+ - bits/unistd_ext.h:
+ - contrib/libs/glibcasm/glibc/include/bits/unistd_ext.h
+ - contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/bits/unistd_ext.h
+ - bits/wchar.h: contrib/libs/glibcasm/glibc/bits/wchar.h
+ - bits/wordsize.h: contrib/libs/glibcasm/glibc/sysdeps/x86/bits/wordsize.h
+ - cpu-features.h: contrib/libs/glibcasm/glibc/sysdeps/x86/include/cpu-features.h
+ - dl-lookupcfg.h:
+ - contrib/libs/glibcasm/glibc/sysdeps/generic/dl-lookupcfg.h
+ - contrib/libs/glibcasm/glibc/sysdeps/x86/dl-lookupcfg.h
+ - dl-sysdep.h:
+ - contrib/libs/glibcasm/glibc/sysdeps/generic/dl-sysdep.h
+ - contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/dl-sysdep.h
+ - dlfcn.h: contrib/libs/glibcasm/glibc/include/dlfcn.h
+ - elf.h: contrib/libs/glibcasm/glibc/include/elf.h
+ - endian.h: contrib/libs/glibcasm/glibc/include/endian.h
+ - errno.h: contrib/libs/glibcasm/glibc/include/errno.h
+ - features.h: contrib/libs/glibcasm/glibc/include/features.h
+ - features-time64.h:
+ - contrib/libs/glibcasm/glibc/include/features-time64.h
+ - contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/features-time64.h
+ - fpu_control.h:
+ - contrib/libs/glibcasm/glibc/include/fpu_control.h
+ - contrib/libs/glibcasm/glibc/sysdeps/x86/fpu_control.h
+ - hp-timing.h: contrib/libs/glibcasm/glibc/sysdeps/x86/hp-timing.h
+ - inttypes.h: contrib/libs/glibcasm/glibc/include/inttypes.h
+ - kernel-features.h:
+ - contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/x86_64/kernel-features.h
+ - contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/kernel-features.h
+ - ldsodefs.h:
+ - contrib/libs/glibcasm/glibc/sysdeps/generic/ldsodefs.h
+ - contrib/libs/glibcasm/glibc/sysdeps/gnu/ldsodefs.h
+ - contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/ldsodefs.h
+ - contrib/libs/glibcasm/glibc/sysdeps/x86/ldsodefs.h
+ - limits.h: contrib/libs/glibcasm/glibc/include/limits.h
+ - link.h: contrib/libs/glibcasm/glibc/include/link.h
+ - locale.h: contrib/libs/glibcasm/glibc/include/locale.h
+ - misc/sys/cdefs.h: contrib/libs/glibcasm/glibc/misc/sys/cdefs.h
+ - netinet/in.h: contrib/libs/glibcasm/glibc/include/netinet/in.h
+ - posix/bits/types.h: contrib/libs/glibcasm/glibc/posix/bits/types.h
+ - pthread.h: contrib/libs/glibcasm/glibc/include/pthread.h
+ - single-thread.h:
+ - contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/x86_64/single-thread.h
+ - contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/single-thread.h
+ - sched.h: contrib/libs/glibcasm/glibc/include/sched.h
+ - setjmp.h: contrib/libs/glibcasm/glibc/include/setjmp.h
+ - shlib-compat.h: contrib/libs/glibcasm/glibc/include/shlib-compat.h
+ - signal.h: contrib/libs/glibcasm/glibc/include/signal.h
+ - stdint.h:
+ - contrib/libs/glibcasm/glibc/include/stdint.h
+ - contrib/libs/cxxsupp/libcxx/include/stdint.h
+ - stdlib.h: contrib/libs/glibcasm/glibc/include/stdlib.h
+ - stackinfo.h:
+ - contrib/libs/glibcasm/glibc/include/stackinfo.h
+ - contrib/libs/glibcasm/glibc/sysdeps/x86_64/stackinfo.h
+ - stdlib.h: contrib/libs/glibcasm/glibc/include/stdlib.h
+ - stdlib/stdint.h: contrib/libs/glibcasm/glibc/stdlib/stdint.h
+ - string.h: contrib/libs/glibcasm/glibc/include/string.h
+ - strings.h: contrib/libs/glibcasm/glibc/include/strings.h
+ - sys/cdefs.h: contrib/libs/glibcasm/glibc/include/sys/cdefs.h
+ - sys/mman.h: contrib/libs/glibcasm/glibc/include/sys/mman.h
+ - sys/param.h: contrib/libs/glibcasm/glibc/include/sys/param.h
+ - sys/procfs.h: contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/sys/procfs.h
+ - sys/select.h: contrib/libs/glibcasm/glibc/include/sys/select.h
+ - sys/socket.h: contrib/libs/glibcasm/glibc/include/sys/socket.h
+ - sys/stat.h: contrib/libs/glibcasm/glibc/include/sys/stat.h
+ - sys/syscall.h: contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/include/sys/syscall.h
+ - sys/time.h: contrib/libs/glibcasm/glibc/include/sys/time.h
+ - sys/types.h: contrib/libs/glibcasm/glibc/include/sys/types.h
+ - sys/ucontext.h: contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/x86/sys/ucontext.h
+ - sys/user.h: contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/x86/sys/user.h
+ - time.h: contrib/libs/glibcasm/glibc/include/time.h
+ - tls.h: contrib/libs/glibcasm/glibc/sysdeps/x86_64/nptl/tls.h
+ - unistd.h: contrib/libs/glibcasm/glibc/include/unistd.h
+ - unwind.h: contrib/libs/glibcasm/glibc/sysdeps/generic/unwind.h
+ # includes under ifdef
+ - bits/select2.h: contrib/libs/glibcasm/dummy.h
+ - bits/setjmp2.h: contrib/libs/glibcasm/dummy.h
+ - bits/socket2.h: contrib/libs/glibcasm/dummy.h
+ - bits/socket-constants.h: contrib/libs/glibcasm/dummy.h
+ - bits/stdlib.h: contrib/libs/glibcasm/dummy.h
+ - bits/stdlib-ldbl.h: contrib/libs/glibcasm/dummy.h
+ - bits/string_fortified.h: contrib/libs/glibcasm/dummy.h
+ - bits/strings_fortified.h: contrib/libs/glibcasm/dummy.h
+ - bits/struct_stat_time64_helper.h: contrib/libs/glibcasm/dummy.h
+ - bits/unistd.h: contrib/libs/glibcasm/dummy.h
+ - dl-cet.h: contrib/libs/glibcasm/dummy.h
+ - dl-mman.h: contrib/libs/glibcasm/dummy.h
+ - dl-unistd.h: contrib/libs/glibcasm/dummy.h
+ - elf/dl-tunables.h: contrib/libs/glibcasm/dummy.h
+ - linux/close_range.h: contrib/libs/glibcasm/dummy.h
+ - sysdeps/i386/dl-procinfo.c: contrib/libs/glibcasm/dummy.h
+ - sysdeps/generic/hp-timing.h: contrib/libs/glibcasm/dummy.h
+ - sysdeps/unix/sysv/linux/bits/pthread_stack_min-dynamic.h: contrib/libs/glibcasm/dummy.h
+ - sysdeps/unix/sysv/linux/sys/syscall.h: contrib/libs/glibcasm/dummy.h
+
+- source_filter: "^contrib/libs/libunwind/include/unwind.h"
+ includes:
+ - stdint.h:
+ - contrib/libs/glibcasm/glibc/include/stdint.h
+ - contrib/libs/cxxsupp/libcxx/include/stdint.h
+
+- source_filter: "^contrib/libs/cxxsupp/libcxx/include/inttypes.h"
+ includes:
+ - stdint.h:
+ - contrib/libs/glibcasm/glibc/include/stdint.h
+ - contrib/libs/cxxsupp/libcxx/include/stdint.h
+
diff --git a/contrib/libs/glibcasm/glibc/bits/libc-header-start.h b/contrib/libs/glibcasm/glibc/bits/libc-header-start.h
new file mode 100644
index 0000000000..73af2af965
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/bits/libc-header-start.h
@@ -0,0 +1,110 @@
+/* Handle feature test macros at the start of a header.
+ Copyright (C) 2016-2023 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* This header is internal to glibc and should not be included outside
+ of glibc headers. Headers including it must define
+ __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header
+ cannot have multiple include guards because ISO C feature test
+ macros depend on the definition of the macro when an affected
+ header is included, not when the first system header is
+ included. */
+
+#ifndef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
+# error "Never include <bits/libc-header-start.h> directly."
+#endif
+
+#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
+
+#include <features.h>
+
+/* ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__
+ macro. */
+#undef __GLIBC_USE_LIB_EXT2
+#if (defined __USE_GNU \
+ || (defined __STDC_WANT_LIB_EXT2__ && __STDC_WANT_LIB_EXT2__ > 0))
+# define __GLIBC_USE_LIB_EXT2 1
+#else
+# define __GLIBC_USE_LIB_EXT2 0
+#endif
+
+/* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
+ macro. Most but not all symbols enabled by that macro in TS
+ 18661-1 are enabled unconditionally in C2X. In C2X, the symbols in
+ Annex F still require a new feature test macro
+ __STDC_WANT_IEC_60559_EXT__ instead (C2X does not define
+ __STDC_WANT_IEC_60559_BFP_EXT__), while a few features from TS
+ 18661-1 are not included in C2X (and thus should depend on
+ __STDC_WANT_IEC_60559_BFP_EXT__ even when C2X features are
+ enabled).
+
+ __GLIBC_USE (IEC_60559_BFP_EXT) controls those features from TS
+ 18661-1 not included in C2X.
+
+ __GLIBC_USE (IEC_60559_BFP_EXT_C2X) controls those features from TS
+ 18661-1 that are also included in C2X (with no feature test macro
+ required in C2X).
+
+ __GLIBC_USE (IEC_60559_EXT) controls those features from TS 18661-1
+ that are included in C2X but conditional on
+ __STDC_WANT_IEC_60559_EXT__. (There are currently no features
+ conditional on __STDC_WANT_IEC_60559_EXT__ that are not in TS
+ 18661-1.) */
+#undef __GLIBC_USE_IEC_60559_BFP_EXT
+#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__
+# define __GLIBC_USE_IEC_60559_BFP_EXT 1
+#else
+# define __GLIBC_USE_IEC_60559_BFP_EXT 0
+#endif
+#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
+#if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC2X)
+# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
+#else
+# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 0
+#endif
+#undef __GLIBC_USE_IEC_60559_EXT
+#if __GLIBC_USE (IEC_60559_BFP_EXT) || defined __STDC_WANT_IEC_60559_EXT__
+# define __GLIBC_USE_IEC_60559_EXT 1
+#else
+# define __GLIBC_USE_IEC_60559_EXT 0
+#endif
+
+/* ISO/IEC TS 18661-4:2015 defines the
+ __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction
+ functions, the symbols from this TS are enabled unconditionally in
+ C2X. */
+#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
+#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__
+# define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
+#else
+# define __GLIBC_USE_IEC_60559_FUNCS_EXT 0
+#endif
+#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
+#if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC2X)
+# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
+#else
+# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 0
+#endif
+
+/* ISO/IEC TS 18661-3:2015 defines the
+ __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */
+#undef __GLIBC_USE_IEC_60559_TYPES_EXT
+#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_TYPES_EXT__
+# define __GLIBC_USE_IEC_60559_TYPES_EXT 1
+#else
+# define __GLIBC_USE_IEC_60559_TYPES_EXT 0
+#endif
diff --git a/contrib/libs/glibcasm/glibc/bits/stdint-intn.h b/contrib/libs/glibcasm/glibc/bits/stdint-intn.h
new file mode 100644
index 0000000000..3d943a8d9d
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/bits/stdint-intn.h
@@ -0,0 +1,29 @@
+/* Define intN_t types.
+ Copyright (C) 2017-2023 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_STDINT_INTN_H
+#define _BITS_STDINT_INTN_H 1
+
+#include <bits/types.h>
+
+typedef __int8_t int8_t;
+typedef __int16_t int16_t;
+typedef __int32_t int32_t;
+typedef __int64_t int64_t;
+
+#endif /* bits/stdint-intn.h */
diff --git a/contrib/libs/glibcasm/glibc/bits/stdint-uintn.h b/contrib/libs/glibcasm/glibc/bits/stdint-uintn.h
new file mode 100644
index 0000000000..8f484879d8
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/bits/stdint-uintn.h
@@ -0,0 +1,29 @@
+/* Define uintN_t types.
+ Copyright (C) 2017-2023 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_STDINT_UINTN_H
+#define _BITS_STDINT_UINTN_H 1
+
+#include <bits/types.h>
+
+typedef __uint8_t uint8_t;
+typedef __uint16_t uint16_t;
+typedef __uint32_t uint32_t;
+typedef __uint64_t uint64_t;
+
+#endif /* bits/stdint-uintn.h */
diff --git a/contrib/libs/glibcasm/glibc/bits/time64.h b/contrib/libs/glibcasm/glibc/bits/time64.h
new file mode 100644
index 0000000000..723db1ed16
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/bits/time64.h
@@ -0,0 +1,36 @@
+/* bits/time64.h -- underlying types for __time64_t. Generic version.
+ Copyright (C) 2018-2023 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_TYPES_H
+# error "Never include <bits/time64.h> directly; use <sys/types.h> instead."
+#endif
+
+#ifndef _BITS_TIME64_H
+#define _BITS_TIME64_H 1
+
+/* Define __TIME64_T_TYPE so that it is always a 64-bit type. */
+
+#if __TIMESIZE == 64
+/* If we already have 64-bit time type then use it. */
+# define __TIME64_T_TYPE __TIME_T_TYPE
+#else
+/* Define a 64-bit time type alongsize the 32-bit one. */
+# define __TIME64_T_TYPE __SQUAD_TYPE
+#endif
+
+#endif /* bits/time64.h */
diff --git a/contrib/libs/glibcasm/glibc/bits/wchar.h b/contrib/libs/glibcasm/glibc/bits/wchar.h
new file mode 100644
index 0000000000..ce951d9b63
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/bits/wchar.h
@@ -0,0 +1,49 @@
+/* wchar_t type related definitions.
+ Copyright (C) 2000-2023 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_WCHAR_H
+#define _BITS_WCHAR_H 1
+
+/* The fallback definitions, for when __WCHAR_MAX__ or __WCHAR_MIN__
+ are not defined, give the right value and type as long as both int
+ and wchar_t are 32-bit types. Adding L'\0' to a constant value
+ ensures that the type is correct; it is necessary to use (L'\0' +
+ 0) rather than just L'\0' so that the type in C++ is the promoted
+ version of wchar_t rather than the distinct wchar_t type itself.
+ Because wchar_t in preprocessor #if expressions is treated as
+ intmax_t or uintmax_t, the expression (L'\0' - 1) would have the
+ wrong value for WCHAR_MAX in such expressions and so cannot be used
+ to define __WCHAR_MAX in the unsigned case. */
+
+#ifdef __WCHAR_MAX__
+# define __WCHAR_MAX __WCHAR_MAX__
+#elif L'\0' - 1 > 0
+# define __WCHAR_MAX (0xffffffffu + L'\0')
+#else
+# define __WCHAR_MAX (0x7fffffff + L'\0')
+#endif
+
+#ifdef __WCHAR_MIN__
+# define __WCHAR_MIN __WCHAR_MIN__
+#elif L'\0' - 1 > 0
+# define __WCHAR_MIN (L'\0' + 0)
+#else
+# define __WCHAR_MIN (-__WCHAR_MAX - 1)
+#endif
+
+#endif /* bits/wchar.h */
diff --git a/contrib/libs/glibcasm/glibc/include/bits/types.h b/contrib/libs/glibcasm/glibc/include/bits/types.h
new file mode 100644
index 0000000000..1c47910607
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/include/bits/types.h
@@ -0,0 +1 @@
+#include <posix/bits/types.h>
diff --git a/contrib/libs/glibcasm/glibc/include/features-time64.h b/contrib/libs/glibcasm/glibc/include/features-time64.h
new file mode 100644
index 0000000000..06115b7c86
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/include/features-time64.h
@@ -0,0 +1 @@
+#include_next <features-time64.h>
diff --git a/contrib/libs/glibcasm/glibc/include/features.h b/contrib/libs/glibcasm/glibc/include/features.h
new file mode 100644
index 0000000000..26534f2b52
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/include/features.h
@@ -0,0 +1,518 @@
+/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _FEATURES_H
+#define _FEATURES_H 1
+
+/* These are defined by the user (or the compiler)
+ to specify the desired environment:
+
+ __STRICT_ANSI__ ISO Standard C.
+ _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+ _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+ _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+ __STDC_WANT_LIB_EXT2__
+ Extensions to ISO C99 from TR 27431-2:2010.
+ __STDC_WANT_IEC_60559_BFP_EXT__
+ Extensions to ISO C11 from TS 18661-1:2014.
+ __STDC_WANT_IEC_60559_FUNCS_EXT__
+ Extensions to ISO C11 from TS 18661-4:2015.
+ __STDC_WANT_IEC_60559_TYPES_EXT__
+ Extensions to ISO C11 from TS 18661-3:2015.
+ __STDC_WANT_IEC_60559_EXT__
+ ISO C2X interfaces defined only in Annex F.
+
+ _POSIX_SOURCE IEEE Std 1003.1.
+ _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+ if >=199309L, add IEEE Std 1003.1b-1993;
+ if >=199506L, add IEEE Std 1003.1c-1995;
+ if >=200112L, all of IEEE 1003.1-2004
+ if >=200809L, all of IEEE 1003.1-2008
+ _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+ Single Unix conformance is wanted, to 600 for the
+ sixth revision, to 700 for the seventh revision.
+ _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+ _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+ _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+ _FILE_OFFSET_BITS=N Select default filesystem interface.
+ _ATFILE_SOURCE Additional *at interfaces.
+ _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+ MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
+ _GNU_SOURCE All of the above, plus GNU extensions.
+ _DEFAULT_SOURCE The default set of features (taking precedence over
+ __STRICT_ANSI__).
+
+ _FORTIFY_SOURCE Add security hardening to many library functions.
+ Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+ performs stricter checks than 1.
+
+ _REENTRANT, _THREAD_SAFE
+ Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+
+ The `-ansi' switch to the GNU C compiler, and standards conformance
+ options such as `-std=c99', define __STRICT_ANSI__. If none of
+ these are defined, or if _DEFAULT_SOURCE is defined, the default is
+ to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+ 200809L, as well as enabling miscellaneous functions from BSD and
+ SVID. If more than one of these are defined, they accumulate. For
+ example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+ give you ISO C, 1003.1, and 1003.2, but nothing else.
+
+ These are defined by this file and are used by the
+ header files to decide what to declare or define:
+
+ __GLIBC_USE (F) Define things from feature set F. This is defined
+ to 1 or 0; the subsequent macros are either defined
+ or undefined, and those tests should be moved to
+ __GLIBC_USE.
+ __USE_ISOC11 Define ISO C11 things.
+ __USE_ISOC99 Define ISO C99 things.
+ __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+ __USE_ISOCXX11 Define ISO C++11 things.
+ __USE_POSIX Define IEEE Std 1003.1 things.
+ __USE_POSIX2 Define IEEE Std 1003.2 things.
+ __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+ __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+ __USE_XOPEN Define XPG things.
+ __USE_XOPEN_EXTENDED Define X/Open Unix things.
+ __USE_UNIX98 Define Single Unix V2 things.
+ __USE_XOPEN2K Define XPG6 things.
+ __USE_XOPEN2KXSI Define XPG6 XSI things.
+ __USE_XOPEN2K8 Define XPG7 things.
+ __USE_XOPEN2K8XSI Define XPG7 XSI things.
+ __USE_LARGEFILE Define correct standard I/O things.
+ __USE_LARGEFILE64 Define LFS things with separate names.
+ __USE_FILE_OFFSET64 Define 64bit interface as default.
+ __USE_MISC Define things from 4.3BSD or System V Unix.
+ __USE_ATFILE Define *at interfaces and AT_* constants for them.
+ __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+ MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
+ __USE_GNU Define GNU extensions.
+ __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+
+ The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+ defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+ only for compatibility. All new code should use the other symbols
+ to test for features.
+
+ All macros listed above as possibly being defined by this file are
+ explicitly undefined if they are not explicitly defined.
+ Feature-test macros that are not defined by the user or compiler
+ but are implied by the other feature-test macros defined (or by the
+ lack of any definitions) are defined by the file.
+
+ ISO C feature test macros depend on the definition of the macro
+ when an affected header is included, not when the first system
+ header is included, and so they are handled in
+ <bits/libc-header-start.h>, which does not have a multiple include
+ guard. Feature test macros that can be handled from the first
+ system header included are handled here. */
+
+
+/* Undefine everything, so we get a clean slate. */
+#undef __USE_ISOC11
+#undef __USE_ISOC99
+#undef __USE_ISOC95
+#undef __USE_ISOCXX11
+#undef __USE_POSIX
+#undef __USE_POSIX2
+#undef __USE_POSIX199309
+#undef __USE_POSIX199506
+#undef __USE_XOPEN
+#undef __USE_XOPEN_EXTENDED
+#undef __USE_UNIX98
+#undef __USE_XOPEN2K
+#undef __USE_XOPEN2KXSI
+#undef __USE_XOPEN2K8
+#undef __USE_XOPEN2K8XSI
+#undef __USE_LARGEFILE
+#undef __USE_LARGEFILE64
+#undef __USE_FILE_OFFSET64
+#undef __USE_MISC
+#undef __USE_ATFILE
+#undef __USE_DYNAMIC_STACK_SIZE
+#undef __USE_GNU
+#undef __USE_FORTIFY_LEVEL
+#undef __KERNEL_STRICT_NAMES
+#undef __GLIBC_USE_ISOC2X
+#undef __GLIBC_USE_DEPRECATED_GETS
+#undef __GLIBC_USE_DEPRECATED_SCANF
+
+/* Suppress kernel-name space pollution unless user expressedly asks
+ for it. */
+#ifndef _LOOSE_KERNEL_NAMES
+# define __KERNEL_STRICT_NAMES
+#endif
+
+/* Convenience macro to test the version of gcc.
+ Use like this:
+ #if __GNUC_PREREQ (2,8)
+ ... code requiring gcc 2.8 or later ...
+ #endif
+ Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+ added in 2.0. */
+#if defined __GNUC__ && defined __GNUC_MINOR__
+# define __GNUC_PREREQ(maj, min) \
+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+#else
+# define __GNUC_PREREQ(maj, min) 0
+#endif
+
+/* Similarly for clang. Features added to GCC after version 4.2 may
+ or may not also be available in clang, and clang's definitions of
+ __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+ features can be queried via __has_extension/__has_feature. */
+#if defined __clang_major__ && defined __clang_minor__
+# define __glibc_clang_prereq(maj, min) \
+ ((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min))
+#else
+# define __glibc_clang_prereq(maj, min) 0
+#endif
+
+/* Whether to use feature set F. */
+#define __GLIBC_USE(F) __GLIBC_USE_ ## F
+
+/* _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+ _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+ issue a warning; the expectation is that the source is being
+ transitioned to use the new macro. */
+#if (defined _BSD_SOURCE || defined _SVID_SOURCE) \
+ && !defined _DEFAULT_SOURCE
+# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
+# undef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE 1
+#endif
+
+/* If _GNU_SOURCE was defined by the user, turn on all the other features. */
+#ifdef _GNU_SOURCE
+# undef _ISOC95_SOURCE
+# define _ISOC95_SOURCE 1
+# undef _ISOC99_SOURCE
+# define _ISOC99_SOURCE 1
+# undef _ISOC11_SOURCE
+# define _ISOC11_SOURCE 1
+# undef _ISOC2X_SOURCE
+# define _ISOC2X_SOURCE 1
+# undef _POSIX_SOURCE
+# define _POSIX_SOURCE 1
+# undef _POSIX_C_SOURCE
+# define _POSIX_C_SOURCE 200809L
+# undef _XOPEN_SOURCE
+# define _XOPEN_SOURCE 700
+# undef _XOPEN_SOURCE_EXTENDED
+# define _XOPEN_SOURCE_EXTENDED 1
+# undef _LARGEFILE64_SOURCE
+# define _LARGEFILE64_SOURCE 1
+# undef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE 1
+# undef _ATFILE_SOURCE
+# define _ATFILE_SOURCE 1
+# undef _DYNAMIC_STACK_SIZE_SOURCE
+# define _DYNAMIC_STACK_SIZE_SOURCE 1
+#endif
+
+/* If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+ define _DEFAULT_SOURCE. */
+#if (defined _DEFAULT_SOURCE \
+ || (!defined __STRICT_ANSI__ \
+ && !defined _ISOC99_SOURCE && !defined _ISOC11_SOURCE \
+ && !defined _ISOC2X_SOURCE \
+ && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE \
+ && !defined _XOPEN_SOURCE))
+# undef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE 1
+#endif
+
+/* This is to enable the ISO C2X extension. */
+#if (defined _ISOC2X_SOURCE \
+ || (defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L))
+# define __GLIBC_USE_ISOC2X 1
+#else
+# define __GLIBC_USE_ISOC2X 0
+#endif
+
+/* This is to enable the ISO C11 extension. */
+#if (defined _ISOC11_SOURCE || defined _ISOC2X_SOURCE \
+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
+# define __USE_ISOC11 1
+#endif
+
+/* This is to enable the ISO C99 extension. */
+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
+ || defined _ISOC2X_SOURCE \
+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
+# define __USE_ISOC99 1
+#endif
+
+/* This is to enable the ISO C90 Amendment 1:1995 extension. */
+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
+ || defined _ISOC2X_SOURCE \
+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L))
+# define __USE_ISOC95 1
+#endif
+
+#ifdef __cplusplus
+/* This is to enable compatibility for ISO C++17. */
+# if __cplusplus >= 201703L
+# define __USE_ISOC11 1
+# endif
+/* This is to enable compatibility for ISO C++11.
+ Check the temporary macro for now, too. */
+# if __cplusplus >= 201103L || defined __GXX_EXPERIMENTAL_CXX0X__
+# define __USE_ISOCXX11 1
+# define __USE_ISOC99 1
+# endif
+#endif
+
+/* If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+ is defined, use POSIX.1-2008 (or another version depending on
+ _XOPEN_SOURCE). */
+#ifdef _DEFAULT_SOURCE
+# if !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE
+# define __USE_POSIX_IMPLICITLY 1
+# endif
+# undef _POSIX_SOURCE
+# define _POSIX_SOURCE 1
+# undef _POSIX_C_SOURCE
+# define _POSIX_C_SOURCE 200809L
+#endif
+
+#if ((!defined __STRICT_ANSI__ \
+ || (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500)) \
+ && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE)
+# define _POSIX_SOURCE 1
+# if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500
+# define _POSIX_C_SOURCE 2
+# elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 600
+# define _POSIX_C_SOURCE 199506L
+# elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 700
+# define _POSIX_C_SOURCE 200112L
+# else
+# define _POSIX_C_SOURCE 200809L
+# endif
+# define __USE_POSIX_IMPLICITLY 1
+#endif
+
+/* Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+ defined in all multithreaded code. GNU libc has not required this
+ for many years. We now treat them as compatibility synonyms for
+ _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+ comprehensive support for multithreaded code. Using them never
+ lowers the selected level of POSIX conformance, only raises it. */
+#if ((!defined _POSIX_C_SOURCE || (_POSIX_C_SOURCE - 0) < 199506L) \
+ && (defined _REENTRANT || defined _THREAD_SAFE))
+# define _POSIX_SOURCE 1
+# undef _POSIX_C_SOURCE
+# define _POSIX_C_SOURCE 199506L
+#endif
+
+#if (defined _POSIX_SOURCE \
+ || (defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 1) \
+ || defined _XOPEN_SOURCE)
+# define __USE_POSIX 1
+#endif
+
+#if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 2 || defined _XOPEN_SOURCE
+# define __USE_POSIX2 1
+#endif
+
+#if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199309L
+# define __USE_POSIX199309 1
+#endif
+
+#if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199506L
+# define __USE_POSIX199506 1
+#endif
+
+#if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200112L
+# define __USE_XOPEN2K 1
+# undef __USE_ISOC95
+# define __USE_ISOC95 1
+# undef __USE_ISOC99
+# define __USE_ISOC99 1
+#endif
+
+#if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200809L
+# define __USE_XOPEN2K8 1
+# undef _ATFILE_SOURCE
+# define _ATFILE_SOURCE 1
+#endif
+
+#ifdef _XOPEN_SOURCE
+# define __USE_XOPEN 1
+# if (_XOPEN_SOURCE - 0) >= 500
+# define __USE_XOPEN_EXTENDED 1
+# define __USE_UNIX98 1
+# undef _LARGEFILE_SOURCE
+# define _LARGEFILE_SOURCE 1
+# if (_XOPEN_SOURCE - 0) >= 600
+# if (_XOPEN_SOURCE - 0) >= 700
+# define __USE_XOPEN2K8 1
+# define __USE_XOPEN2K8XSI 1
+# endif
+# define __USE_XOPEN2K 1
+# define __USE_XOPEN2KXSI 1
+# undef __USE_ISOC95
+# define __USE_ISOC95 1
+# undef __USE_ISOC99
+# define __USE_ISOC99 1
+# endif
+# else
+# ifdef _XOPEN_SOURCE_EXTENDED
+# define __USE_XOPEN_EXTENDED 1
+# endif
+# endif
+#endif
+
+#ifdef _LARGEFILE_SOURCE
+# define __USE_LARGEFILE 1
+#endif
+
+#ifdef _LARGEFILE64_SOURCE
+# define __USE_LARGEFILE64 1
+#endif
+
+#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64
+# define __USE_FILE_OFFSET64 1
+#endif
+
+#include <features-time64.h>
+
+#if defined _DEFAULT_SOURCE
+# define __USE_MISC 1
+#endif
+
+#ifdef _ATFILE_SOURCE
+# define __USE_ATFILE 1
+#endif
+
+#ifdef _DYNAMIC_STACK_SIZE_SOURCE
+# define __USE_DYNAMIC_STACK_SIZE 1
+#endif
+
+#ifdef _GNU_SOURCE
+# define __USE_GNU 1
+#endif
+
+#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0
+# if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0
+# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
+# elif !__GNUC_PREREQ (4, 1)
+# warning _FORTIFY_SOURCE requires GCC 4.1 or later
+# elif _FORTIFY_SOURCE > 2 && (__glibc_clang_prereq (9, 0) \
+ || __GNUC_PREREQ (12, 0))
+
+# if _FORTIFY_SOURCE > 3
+# warning _FORTIFY_SOURCE > 3 is treated like 3 on this platform
+# endif
+# define __USE_FORTIFY_LEVEL 3
+# elif _FORTIFY_SOURCE > 1
+# if _FORTIFY_SOURCE > 2
+# warning _FORTIFY_SOURCE > 2 is treated like 2 on this platform
+# endif
+# define __USE_FORTIFY_LEVEL 2
+# else
+# define __USE_FORTIFY_LEVEL 1
+# endif
+#endif
+#ifndef __USE_FORTIFY_LEVEL
+# define __USE_FORTIFY_LEVEL 0
+#endif
+
+/* The function 'gets' existed in C89, but is impossible to use
+ safely. It has been removed from ISO C11 and ISO C++14. Note: for
+ compatibility with various implementations of <cstdio>, this test
+ must consider only the value of __cplusplus when compiling C++. */
+#if defined __cplusplus ? __cplusplus >= 201402L : defined __USE_ISOC11
+# define __GLIBC_USE_DEPRECATED_GETS 0
+#else
+# define __GLIBC_USE_DEPRECATED_GETS 1
+#endif
+
+/* GNU formerly extended the scanf functions with modified format
+ specifiers %as, %aS, and %a[...] that allocate a buffer for the
+ input using malloc. This extension conflicts with ISO C99, which
+ defines %a as a standalone format specifier that reads a floating-
+ point number; moreover, POSIX.1-2008 provides the same feature
+ using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+
+ We now follow C99 unless GNU extensions are active and the compiler
+ is specifically in C89 or C++98 mode (strict or not). For
+ instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+ or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+ old extension. */
+#if (defined __USE_GNU \
+ && (defined __cplusplus \
+ ? (__cplusplus < 201103L && !defined __GXX_EXPERIMENTAL_CXX0X__) \
+ : (!defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L)))
+# define __GLIBC_USE_DEPRECATED_SCANF 1
+#else
+# define __GLIBC_USE_DEPRECATED_SCANF 0
+#endif
+
+/* Get definitions of __STDC_* predefined macros, if the compiler has
+ not preincluded this header automatically. */
+#include <stdc-predef.h>
+
+/* This macro indicates that the installed library is the GNU C Library.
+ For historic reasons the value now is 6 and this will stay from now
+ on. The use of this variable is deprecated. Use __GLIBC__ and
+ __GLIBC_MINOR__ now (see below) when you want to test for a specific
+ GNU C library version and use the values in <gnu/lib-names.h> to get
+ the sonames of the shared libraries. */
+#undef __GNU_LIBRARY__
+#define __GNU_LIBRARY__ 6
+
+/* Major and minor version number of the GNU C library package. Use
+ these macros to test for features in specific releases. */
+#define __GLIBC__ 2
+#define __GLIBC_MINOR__ 37
+
+#define __GLIBC_PREREQ(maj, min) \
+ ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
+
+/* This is here only because every header file already includes this one. */
+#ifndef __ASSEMBLER__
+# ifndef _SYS_CDEFS_H
+# include <sys/cdefs.h>
+# endif
+
+/* If we don't have __REDIRECT, prototypes will be missing if
+ __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. */
+# if defined __USE_FILE_OFFSET64 && !defined __REDIRECT
+# define __USE_LARGEFILE 1
+# define __USE_LARGEFILE64 1
+# endif
+
+#endif /* !ASSEMBLER */
+
+/* Decide whether we can define 'extern inline' functions in headers. */
+#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
+ && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ \
+ && defined __extern_inline
+# define __USE_EXTERN_INLINES 1
+#endif
+
+
+/* This is here only because every header file already includes this one.
+ Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+ <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+ that will always return failure (and set errno to ENOSYS). */
+#include <gnu/stubs.h>
+
+
+#endif /* features.h */
diff --git a/contrib/libs/glibcasm/glibc/include/gnu/stubs.h b/contrib/libs/glibcasm/glibc/include/gnu/stubs.h
new file mode 100644
index 0000000000..6308e4e0e0
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/include/gnu/stubs.h
@@ -0,0 +1,2 @@
+/* This is a placeholder used only while compiling libc.
+ The installed gnu/stubs.h file is created by make install. */
diff --git a/contrib/libs/glibcasm/glibc/include/stdc-predef.h b/contrib/libs/glibcasm/glibc/include/stdc-predef.h
new file mode 100644
index 0000000000..d3cba52c6f
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/include/stdc-predef.h
@@ -0,0 +1,64 @@
+/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _STDC_PREDEF_H
+#define _STDC_PREDEF_H 1
+
+/* This header is separate from features.h so that the compiler can
+ include it implicitly at the start of every compilation. It must
+ not itself include <features.h> or any other header that includes
+ <features.h> because the implicit include comes before any feature
+ test macros that may be defined in a source file before it first
+ explicitly includes a system header. GCC knows the name of this
+ header in order to preinclude it. */
+
+/* glibc's intent is to support the IEC 559 math functionality, real
+ and complex. If the GCC (4.9 and later) predefined macros
+ specifying compiler intent are available, use them to determine
+ whether the overall intent is to support these features; otherwise,
+ presume an older compiler has intent to support these features and
+ define these macros by default. */
+
+#ifdef __GCC_IEC_559
+# if __GCC_IEC_559 > 0
+# define __STDC_IEC_559__ 1
+# define __STDC_IEC_60559_BFP__ 201404L
+# endif
+#else
+# define __STDC_IEC_559__ 1
+# define __STDC_IEC_60559_BFP__ 201404L
+#endif
+
+#ifdef __GCC_IEC_559_COMPLEX
+# if __GCC_IEC_559_COMPLEX > 0
+# define __STDC_IEC_559_COMPLEX__ 1
+# define __STDC_IEC_60559_COMPLEX__ 201404L
+# endif
+#else
+# define __STDC_IEC_559_COMPLEX__ 1
+# define __STDC_IEC_60559_COMPLEX__ 201404L
+#endif
+
+/* wchar_t uses Unicode 10.0.0. Version 10.0 of the Unicode Standard is
+ synchronized with ISO/IEC 10646:2017, fifth edition, plus
+ the following additions from Amendment 1 to the fifth edition:
+ - 56 emoji characters
+ - 285 hentaigana
+ - 3 additional Zanabazar Square characters */
+#define __STDC_ISO_10646__ 201706L
+
+#endif
diff --git a/contrib/libs/glibcasm/glibc/include/stdint.h b/contrib/libs/glibcasm/glibc/include/stdint.h
new file mode 100644
index 0000000000..7f428741d7
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/include/stdint.h
@@ -0,0 +1 @@
+#include <stdlib/stdint.h>
diff --git a/contrib/libs/glibcasm/glibc/include/sys/cdefs.h b/contrib/libs/glibcasm/glibc/include/sys/cdefs.h
new file mode 100644
index 0000000000..56adb231aa
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/include/sys/cdefs.h
@@ -0,0 +1,45 @@
+#ifndef _SYS_CDEFS_H
+
+/* This is outside of _ISOMAC to enforce that _Static_assert always
+ uses the two-argument form. This can be removed once the minimum
+ GCC version used to compile glibc is GCC 9.1. */
+#ifndef __cplusplus
+# define _Static_assert(expr, diagnostic) _Static_assert (expr, diagnostic)
+#endif
+
+#include <misc/sys/cdefs.h>
+
+#ifndef _ISOMAC
+/* The compiler will optimize based on the knowledge the parameter is
+ not NULL. This will omit tests. A robust implementation cannot allow
+ this so when compiling glibc itself we ignore this attribute. */
+# undef __nonnull
+# define __nonnull(params)
+
+extern void __chk_fail (void) __attribute__ ((__noreturn__));
+libc_hidden_proto (__chk_fail)
+rtld_hidden_proto (__chk_fail)
+
+/* If we are using redirects internally to support long double,
+ we need to tweak some macros to ensure the PLT bypass tricks
+ continue to work in libc. */
+#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 && IS_IN (libc) && defined SHARED
+
+# undef __LDBL_REDIR_DECL
+# define __LDBL_REDIR_DECL(func) \
+ extern __typeof(func) func __asm (__ASMNAME ("__GI____ieee128_" #func));
+
+# undef libc_hidden_ldbl_proto
+# define libc_hidden_ldbl_proto(func, attrs...) \
+ extern __typeof(func) ___ieee128_ ## func; \
+ libc_hidden_proto (___ieee128_ ## func, ##attrs);
+
+# undef __LDBL_REDIR2_DECL
+# define __LDBL_REDIR2_DECL(func) \
+ extern __typeof(__ ## func) __ ## func __asm (__ASMNAME ("__GI____ieee128___" #func));
+
+#endif
+
+#endif /* !defined _ISOMAC */
+
+#endif
diff --git a/contrib/libs/glibcasm/glibc/misc/sys/cdefs.h b/contrib/libs/glibcasm/glibc/misc/sys/cdefs.h
new file mode 100644
index 0000000000..66d6702123
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/misc/sys/cdefs.h
@@ -0,0 +1,705 @@
+/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
+ Copyright The GNU Toolchain Authors.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_CDEFS_H
+#define _SYS_CDEFS_H 1
+
+/* We are almost always included from features.h. */
+#ifndef _FEATURES_H
+# include <features.h>
+#endif
+
+/* The GNU libc does not support any K&R compilers or the traditional mode
+ of ISO C compilers anymore. Check for some of the combinations not
+ supported anymore. */
+#if defined __GNUC__ && !defined __STDC__ && !defined __cplusplus
+# error "You need a ISO C or C++ conforming compiler to use the glibc headers"
+#endif
+
+/* Some user header file might have defined this before. */
+#undef __P
+#undef __PMT
+
+/* Compilers that lack __has_attribute may object to
+ #if defined __has_attribute && __has_attribute (...)
+ even though they do not need to evaluate the right-hand side of the &&.
+ Similarly for __has_builtin, etc. */
+#if (defined __has_attribute \
+ && (!defined __clang_minor__ \
+ || 3 < __clang_major__ + (5 <= __clang_minor__)))
+# define __glibc_has_attribute(attr) __has_attribute (attr)
+#else
+# define __glibc_has_attribute(attr) 0
+#endif
+#ifdef __has_builtin
+# define __glibc_has_builtin(name) __has_builtin (name)
+#else
+# define __glibc_has_builtin(name) 0
+#endif
+#ifdef __has_extension
+# define __glibc_has_extension(ext) __has_extension (ext)
+#else
+# define __glibc_has_extension(ext) 0
+#endif
+
+#if defined __GNUC__ || defined __clang__
+
+/* All functions, except those with callbacks or those that
+ synchronize memory, are leaf functions. */
+# if __GNUC_PREREQ (4, 6) && !defined _LIBC
+# define __LEAF , __leaf__
+# define __LEAF_ATTR __attribute__ ((__leaf__))
+# else
+# define __LEAF
+# define __LEAF_ATTR
+# endif
+
+/* GCC can always grok prototypes. For C++ programs we add throw()
+ to help it optimize the function calls. But this only works with
+ gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
+ as non-throwing using a function attribute since programs can use
+ the -fexceptions options for C code as well. */
+# if !defined __cplusplus \
+ && (__GNUC_PREREQ (3, 4) || __glibc_has_attribute (__nothrow__))
+# define __THROW __attribute__ ((__nothrow__ __LEAF))
+# define __THROWNL __attribute__ ((__nothrow__))
+# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
+# define __NTHNL(fct) __attribute__ ((__nothrow__)) fct
+# else
+# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major >= 4)
+# if __cplusplus >= 201103L
+# define __THROW noexcept (true)
+# else
+# define __THROW throw ()
+# endif
+# define __THROWNL __THROW
+# define __NTH(fct) __LEAF_ATTR fct __THROW
+# define __NTHNL(fct) fct __THROW
+# else
+# define __THROW
+# define __THROWNL
+# define __NTH(fct) fct
+# define __NTHNL(fct) fct
+# endif
+# endif
+
+#else /* Not GCC or clang. */
+
+# if (defined __cplusplus \
+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
+# define __inline inline
+# else
+# define __inline /* No inline functions. */
+# endif
+
+# define __THROW
+# define __THROWNL
+# define __NTH(fct) fct
+
+#endif /* GCC || clang. */
+
+/* These two macros are not used in glibc anymore. They are kept here
+ only because some other projects expect the macros to be defined. */
+#define __P(args) args
+#define __PMT(args) args
+
+/* For these things, GCC behaves the ANSI way normally,
+ and the non-ANSI way under -traditional. */
+
+#define __CONCAT(x,y) x ## y
+#define __STRING(x) #x
+
+/* This is not a typedef so `const __ptr_t' does the right thing. */
+#define __ptr_t void *
+
+
+/* C++ needs to know that types and declarations are C, not C++. */
+#ifdef __cplusplus
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
+#else
+# define __BEGIN_DECLS
+# define __END_DECLS
+#endif
+
+
+/* Fortify support. */
+#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
+#define __bos0(ptr) __builtin_object_size (ptr, 0)
+
+/* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. */
+#if __USE_FORTIFY_LEVEL == 3 && (__glibc_clang_prereq (9, 0) \
+ || __GNUC_PREREQ (12, 0))
+# define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0)
+# define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1)
+#else
+# define __glibc_objsize0(__o) __bos0 (__o)
+# define __glibc_objsize(__o) __bos (__o)
+#endif
+
+/* Compile time conditions to choose between the regular, _chk and _chk_warn
+ variants. These conditions should get evaluated to constant and optimized
+ away. */
+
+#define __glibc_safe_len_cond(__l, __s, __osz) ((__l) <= (__osz) / (__s))
+#define __glibc_unsigned_or_positive(__l) \
+ ((__typeof (__l)) 0 < (__typeof (__l)) -1 \
+ || (__builtin_constant_p (__l) && (__l) > 0))
+
+/* Length is known to be safe at compile time if the __L * __S <= __OBJSZ
+ condition can be folded to a constant and if it is true, or unknown (-1) */
+#define __glibc_safe_or_unknown_len(__l, __s, __osz) \
+ ((__builtin_constant_p (__osz) && (__osz) == (__SIZE_TYPE__) -1) \
+ || (__glibc_unsigned_or_positive (__l) \
+ && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \
+ (__s), (__osz))) \
+ && __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), (__s), (__osz))))
+
+/* Conversely, we know at compile time that the length is unsafe if the
+ __L * __S <= __OBJSZ condition can be folded to a constant and if it is
+ false. */
+#define __glibc_unsafe_len(__l, __s, __osz) \
+ (__glibc_unsigned_or_positive (__l) \
+ && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \
+ __s, __osz)) \
+ && !__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz))
+
+/* Fortify function f. __f_alias, __f_chk and __f_chk_warn must be
+ declared. */
+
+#define __glibc_fortify(f, __l, __s, __osz, ...) \
+ (__glibc_safe_or_unknown_len (__l, __s, __osz) \
+ ? __ ## f ## _alias (__VA_ARGS__) \
+ : (__glibc_unsafe_len (__l, __s, __osz) \
+ ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
+ : __ ## f ## _chk (__VA_ARGS__, __osz))) \
+
+/* Fortify function f, where object size argument passed to f is the number of
+ elements and not total size. */
+
+#define __glibc_fortify_n(f, __l, __s, __osz, ...) \
+ (__glibc_safe_or_unknown_len (__l, __s, __osz) \
+ ? __ ## f ## _alias (__VA_ARGS__) \
+ : (__glibc_unsafe_len (__l, __s, __osz) \
+ ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
+ : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s)))) \
+
+#if __GNUC_PREREQ (4,3)
+# define __warnattr(msg) __attribute__((__warning__ (msg)))
+# define __errordecl(name, msg) \
+ extern void name (void) __attribute__((__error__ (msg)))
+#else
+# define __warnattr(msg)
+# define __errordecl(name, msg) extern void name (void)
+#endif
+
+/* Support for flexible arrays.
+ Headers that should use flexible arrays only if they're "real"
+ (e.g. only if they won't affect sizeof()) should test
+ #if __glibc_c99_flexarr_available. */
+#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __HP_cc
+# define __flexarr []
+# define __glibc_c99_flexarr_available 1
+#elif __GNUC_PREREQ (2,97) || defined __clang__
+/* GCC 2.97 and clang support C99 flexible array members as an extension,
+ even when in C89 mode or compiling C++ (any version). */
+# define __flexarr []
+# define __glibc_c99_flexarr_available 1
+#elif defined __GNUC__
+/* Pre-2.97 GCC did not support C99 flexible arrays but did have
+ an equivalent extension with slightly different notation. */
+# define __flexarr [0]
+# define __glibc_c99_flexarr_available 1
+#else
+/* Some other non-C99 compiler. Approximate with [1]. */
+# define __flexarr [1]
+# define __glibc_c99_flexarr_available 0
+#endif
+
+
+/* __asm__ ("xyz") is used throughout the headers to rename functions
+ at the assembly language level. This is wrapped by the __REDIRECT
+ macro, in order to support compilers that can do this some other
+ way. When compilers don't support asm-names at all, we have to do
+ preprocessor tricks instead (which don't have exactly the right
+ semantics, but it's the best we can do).
+
+ Example:
+ int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
+
+#if (defined __GNUC__ && __GNUC__ >= 2) || (__clang_major__ >= 4)
+
+# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
+# ifdef __cplusplus
+# define __REDIRECT_NTH(name, proto, alias) \
+ name proto __THROW __asm__ (__ASMNAME (#alias))
+# define __REDIRECT_NTHNL(name, proto, alias) \
+ name proto __THROWNL __asm__ (__ASMNAME (#alias))
+# else
+# define __REDIRECT_NTH(name, proto, alias) \
+ name proto __asm__ (__ASMNAME (#alias)) __THROW
+# define __REDIRECT_NTHNL(name, proto, alias) \
+ name proto __asm__ (__ASMNAME (#alias)) __THROWNL
+# endif
+# define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+# define __ASMNAME2(prefix, cname) __STRING (prefix) cname
+
+/*
+#elif __SOME_OTHER_COMPILER__
+
+# define __REDIRECT(name, proto, alias) name proto; \
+ _Pragma("let " #name " = " #alias)
+*/
+#endif
+
+/* GCC and clang have various useful declarations that can be made with
+ the '__attribute__' syntax. All of the ways we use this do fine if
+ they are omitted for compilers that don't understand it. */
+#if !(defined __GNUC__ || defined __clang__)
+# define __attribute__(xyz) /* Ignore */
+#endif
+
+/* At some point during the gcc 2.96 development the `malloc' attribute
+ for functions was introduced. We don't want to use it unconditionally
+ (although this would be possible) since it generates warnings. */
+#if __GNUC_PREREQ (2,96) || __glibc_has_attribute (__malloc__)
+# define __attribute_malloc__ __attribute__ ((__malloc__))
+#else
+# define __attribute_malloc__ /* Ignore */
+#endif
+
+/* Tell the compiler which arguments to an allocation function
+ indicate the size of the allocation. */
+#if __GNUC_PREREQ (4, 3)
+# define __attribute_alloc_size__(params) \
+ __attribute__ ((__alloc_size__ params))
+#else
+# define __attribute_alloc_size__(params) /* Ignore. */
+#endif
+
+/* Tell the compiler which argument to an allocation function
+ indicates the alignment of the allocation. */
+#if __GNUC_PREREQ (4, 9) || __glibc_has_attribute (__alloc_align__)
+# define __attribute_alloc_align__(param) \
+ __attribute__ ((__alloc_align__ param))
+#else
+# define __attribute_alloc_align__(param) /* Ignore. */
+#endif
+
+/* At some point during the gcc 2.96 development the `pure' attribute
+ for functions was introduced. We don't want to use it unconditionally
+ (although this would be possible) since it generates warnings. */
+#if __GNUC_PREREQ (2,96) || __glibc_has_attribute (__pure__)
+# define __attribute_pure__ __attribute__ ((__pure__))
+#else
+# define __attribute_pure__ /* Ignore */
+#endif
+
+/* This declaration tells the compiler that the value is constant. */
+#if __GNUC_PREREQ (2,5) || __glibc_has_attribute (__const__)
+# define __attribute_const__ __attribute__ ((__const__))
+#else
+# define __attribute_const__ /* Ignore */
+#endif
+
+#if __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__)
+# define __attribute_maybe_unused__ __attribute__ ((__unused__))
+#else
+# define __attribute_maybe_unused__ /* Ignore */
+#endif
+
+/* At some point during the gcc 3.1 development the `used' attribute
+ for functions was introduced. We don't want to use it unconditionally
+ (although this would be possible) since it generates warnings. */
+#if __GNUC_PREREQ (3,1) || __glibc_has_attribute (__used__)
+# define __attribute_used__ __attribute__ ((__used__))
+# define __attribute_noinline__ __attribute__ ((__noinline__))
+#else
+# define __attribute_used__ __attribute__ ((__unused__))
+# define __attribute_noinline__ /* Ignore */
+#endif
+
+/* Since version 3.2, gcc allows marking deprecated functions. */
+#if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__deprecated__)
+# define __attribute_deprecated__ __attribute__ ((__deprecated__))
+#else
+# define __attribute_deprecated__ /* Ignore */
+#endif
+
+/* Since version 4.5, gcc also allows one to specify the message printed
+ when a deprecated function is used. clang claims to be gcc 4.2, but
+ may also support this feature. */
+#if __GNUC_PREREQ (4,5) \
+ || __glibc_has_extension (__attribute_deprecated_with_message__)
+# define __attribute_deprecated_msg__(msg) \
+ __attribute__ ((__deprecated__ (msg)))
+#else
+# define __attribute_deprecated_msg__(msg) __attribute_deprecated__
+#endif
+
+/* At some point during the gcc 2.8 development the `format_arg' attribute
+ for functions was introduced. We don't want to use it unconditionally
+ (although this would be possible) since it generates warnings.
+ If several `format_arg' attributes are given for the same function, in
+ gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+ all designated arguments are considered. */
+#if __GNUC_PREREQ (2,8) || __glibc_has_attribute (__format_arg__)
+# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
+#else
+# define __attribute_format_arg__(x) /* Ignore */
+#endif
+
+/* At some point during the gcc 2.97 development the `strfmon' format
+ attribute for functions was introduced. We don't want to use it
+ unconditionally (although this would be possible) since it
+ generates warnings. */
+#if __GNUC_PREREQ (2,97) || __glibc_has_attribute (__format__)
+# define __attribute_format_strfmon__(a,b) \
+ __attribute__ ((__format__ (__strfmon__, a, b)))
+#else
+# define __attribute_format_strfmon__(a,b) /* Ignore */
+#endif
+
+/* The nonnull function attribute marks pointer parameters that
+ must not be NULL. This has the name __nonnull in glibc,
+ and __attribute_nonnull__ in files shared with Gnulib to avoid
+ collision with a different __nonnull in DragonFlyBSD 5.9. */
+#ifndef __attribute_nonnull__
+# if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__)
+# define __attribute_nonnull__(params) __attribute__ ((__nonnull__ params))
+# else
+# define __attribute_nonnull__(params)
+# endif
+#endif
+#ifndef __nonnull
+# define __nonnull(params) __attribute_nonnull__ (params)
+#endif
+
+/* The returns_nonnull function attribute marks the return type of the function
+ as always being non-null. */
+#ifndef __returns_nonnull
+# if __GNUC_PREREQ (4, 9) || __glibc_has_attribute (__returns_nonnull__)
+# define __returns_nonnull __attribute__ ((__returns_nonnull__))
+# else
+# define __returns_nonnull
+# endif
+#endif
+
+/* If fortification mode, we warn about unused results of certain
+ function calls which can lead to problems. */
+#if __GNUC_PREREQ (3,4) || __glibc_has_attribute (__warn_unused_result__)
+# define __attribute_warn_unused_result__ \
+ __attribute__ ((__warn_unused_result__))
+# if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0
+# define __wur __attribute_warn_unused_result__
+# endif
+#else
+# define __attribute_warn_unused_result__ /* empty */
+#endif
+#ifndef __wur
+# define __wur /* Ignore */
+#endif
+
+/* Forces a function to be always inlined. */
+#if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__always_inline__)
+/* The Linux kernel defines __always_inline in stddef.h (283d7573), and
+ it conflicts with this definition. Therefore undefine it first to
+ allow either header to be included first. */
+# undef __always_inline
+# define __always_inline __inline __attribute__ ((__always_inline__))
+#else
+# undef __always_inline
+# define __always_inline __inline
+#endif
+
+/* Associate error messages with the source location of the call site rather
+ than with the source location inside the function. */
+#if __GNUC_PREREQ (4,3) || __glibc_has_attribute (__artificial__)
+# define __attribute_artificial__ __attribute__ ((__artificial__))
+#else
+# define __attribute_artificial__ /* Ignore */
+#endif
+
+/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+ inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+ or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+ older than 4.3 may define these macros and still not guarantee GNU inlining
+ semantics.
+
+ clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+ semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+ __GNUC_GNU_INLINE__ macro definitions. */
+#if (!defined __cplusplus || __GNUC_PREREQ (4,3) \
+ || (defined __clang__ && (defined __GNUC_STDC_INLINE__ \
+ || defined __GNUC_GNU_INLINE__)))
+# if defined __GNUC_STDC_INLINE__ || defined __cplusplus
+# define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
+# define __extern_always_inline \
+ extern __always_inline __attribute__ ((__gnu_inline__))
+# else
+# define __extern_inline extern __inline
+# define __extern_always_inline extern __always_inline
+# endif
+#endif
+
+#ifdef __extern_always_inline
+# define __fortify_function __extern_always_inline __attribute_artificial__
+#endif
+
+/* GCC 4.3 and above allow passing all anonymous arguments of an
+ __extern_always_inline function to some other vararg function. */
+#if __GNUC_PREREQ (4,3)
+# define __va_arg_pack() __builtin_va_arg_pack ()
+# define __va_arg_pack_len() __builtin_va_arg_pack_len ()
+#endif
+
+/* It is possible to compile containing GCC extensions even if GCC is
+ run in pedantic mode if the uses are carefully marked using the
+ `__extension__' keyword. But this is not generally available before
+ version 2.8. */
+#if !(__GNUC_PREREQ (2,8) || defined __clang__)
+# define __extension__ /* Ignore */
+#endif
+
+/* __restrict is known in EGCS 1.2 and above, and in clang.
+ It works also in C++ mode (outside of arrays), but only when spelled
+ as '__restrict', not 'restrict'. */
+#if !(__GNUC_PREREQ (2,92) || __clang_major__ >= 3)
+# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+# define __restrict restrict
+# else
+# define __restrict /* Ignore */
+# endif
+#endif
+
+/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+ array_name[restrict]
+ GCC 3.1 and clang support this.
+ This syntax is not usable in C++ mode. */
+#if (__GNUC_PREREQ (3,1) || __clang_major__ >= 3) && !defined __cplusplus
+# define __restrict_arr __restrict
+#else
+# ifdef __GNUC__
+# define __restrict_arr /* Not supported in old GCC. */
+# else
+# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+# define __restrict_arr restrict
+# else
+/* Some other non-C99 compiler. */
+# define __restrict_arr /* Not supported. */
+# endif
+# endif
+#endif
+
+#if (__GNUC__ >= 3) || __glibc_has_builtin (__builtin_expect)
+# define __glibc_unlikely(cond) __builtin_expect ((cond), 0)
+# define __glibc_likely(cond) __builtin_expect ((cond), 1)
+#else
+# define __glibc_unlikely(cond) (cond)
+# define __glibc_likely(cond) (cond)
+#endif
+
+#if (!defined _Noreturn \
+ && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
+ && !(__GNUC_PREREQ (4,7) \
+ || (3 < __clang_major__ + (5 <= __clang_minor__))))
+# if __GNUC_PREREQ (2,8)
+# define _Noreturn __attribute__ ((__noreturn__))
+# else
+# define _Noreturn
+# endif
+#endif
+
+#if __GNUC_PREREQ (8, 0)
+/* Describes a char array whose address can safely be passed as the first
+ argument to strncpy and strncat, as the char array is not necessarily
+ a NUL-terminated string. */
+# define __attribute_nonstring__ __attribute__ ((__nonstring__))
+#else
+# define __attribute_nonstring__
+#endif
+
+/* Undefine (also defined in libc-symbols.h). */
+#undef __attribute_copy__
+#if __GNUC_PREREQ (9, 0)
+/* Copies attributes from the declaration or type referenced by
+ the argument. */
+# define __attribute_copy__(arg) __attribute__ ((__copy__ (arg)))
+#else
+# define __attribute_copy__(arg)
+#endif
+
+#if (!defined _Static_assert && !defined __cplusplus \
+ && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
+ && (!(__GNUC_PREREQ (4, 6) || __clang_major__ >= 4) \
+ || defined __STRICT_ANSI__))
+# define _Static_assert(expr, diagnostic) \
+ extern int (*__Static_assert_function (void)) \
+ [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
+#endif
+
+/* Gnulib avoids including these, as they don't work on non-glibc or
+ older glibc platforms. */
+#ifndef __GNULIB_CDEFS
+# include <bits/wordsize.h>
+# include <bits/long-double.h>
+#endif
+
+#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
+# ifdef __REDIRECT
+
+/* Alias name defined automatically. */
+# define __LDBL_REDIR(name, proto) ... unused__ldbl_redir
+# define __LDBL_REDIR_DECL(name) \
+ extern __typeof (name) name __asm (__ASMNAME ("__" #name "ieee128"));
+
+/* Alias name defined automatically, with leading underscores. */
+# define __LDBL_REDIR2_DECL(name) \
+ extern __typeof (__##name) __##name \
+ __asm (__ASMNAME ("__" #name "ieee128"));
+
+/* Alias name defined manually. */
+# define __LDBL_REDIR1(name, proto, alias) ... unused__ldbl_redir1
+# define __LDBL_REDIR1_DECL(name, alias) \
+ extern __typeof (name) name __asm (__ASMNAME (#alias));
+
+# define __LDBL_REDIR1_NTH(name, proto, alias) \
+ __REDIRECT_NTH (name, proto, alias)
+# define __REDIRECT_NTH_LDBL(name, proto, alias) \
+ __LDBL_REDIR1_NTH (name, proto, __##alias##ieee128)
+
+/* Unused. */
+# define __REDIRECT_LDBL(name, proto, alias) ... unused__redirect_ldbl
+# define __LDBL_REDIR_NTH(name, proto) ... unused__ldbl_redir_nth
+
+# else
+_Static_assert (0, "IEEE 128-bits long double requires redirection on this platform");
+# endif
+#elif defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
+# define __LDBL_COMPAT 1
+# ifdef __REDIRECT
+# define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias)
+# define __LDBL_REDIR(name, proto) \
+ __LDBL_REDIR1 (name, proto, __nldbl_##name)
+# define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias)
+# define __LDBL_REDIR_NTH(name, proto) \
+ __LDBL_REDIR1_NTH (name, proto, __nldbl_##name)
+# define __LDBL_REDIR2_DECL(name) \
+ extern __typeof (__##name) __##name __asm (__ASMNAME ("__nldbl___" #name));
+# define __LDBL_REDIR1_DECL(name, alias) \
+ extern __typeof (name) name __asm (__ASMNAME (#alias));
+# define __LDBL_REDIR_DECL(name) \
+ extern __typeof (name) name __asm (__ASMNAME ("__nldbl_" #name));
+# define __REDIRECT_LDBL(name, proto, alias) \
+ __LDBL_REDIR1 (name, proto, __nldbl_##alias)
+# define __REDIRECT_NTH_LDBL(name, proto, alias) \
+ __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias)
+# endif
+#endif
+#if (!defined __LDBL_COMPAT && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0) \
+ || !defined __REDIRECT
+# define __LDBL_REDIR1(name, proto, alias) name proto
+# define __LDBL_REDIR(name, proto) name proto
+# define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW
+# define __LDBL_REDIR_NTH(name, proto) name proto __THROW
+# define __LDBL_REDIR2_DECL(name)
+# define __LDBL_REDIR_DECL(name)
+# ifdef __REDIRECT
+# define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias)
+# define __REDIRECT_NTH_LDBL(name, proto, alias) \
+ __REDIRECT_NTH (name, proto, alias)
+# endif
+#endif
+
+/* __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+ intended for use in preprocessor macros.
+
+ Note: MESSAGE must be a _single_ string; concatenation of string
+ literals is not supported. */
+#if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5)
+# define __glibc_macro_warning1(message) _Pragma (#message)
+# define __glibc_macro_warning(message) \
+ __glibc_macro_warning1 (GCC warning message)
+#else
+# define __glibc_macro_warning(msg)
+#endif
+
+/* Generic selection (ISO C11) is a C-only feature, available in GCC
+ since version 4.9. Previous versions do not provide generic
+ selection, even though they might set __STDC_VERSION__ to 201112L,
+ when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+ when testing __STDC_VERSION__ for generic selection support.
+ On the other hand, Clang also defines __GNUC__, so a clang-specific
+ check is required to enable the use of generic selection. */
+#if !defined __cplusplus \
+ && (__GNUC_PREREQ (4, 9) \
+ || __glibc_has_extension (c_generic_selections) \
+ || (!defined __GNUC__ && defined __STDC_VERSION__ \
+ && __STDC_VERSION__ >= 201112L))
+# define __HAVE_GENERIC_SELECTION 1
+#else
+# define __HAVE_GENERIC_SELECTION 0
+#endif
+
+#if __GNUC_PREREQ (10, 0)
+/* Designates a 1-based positional argument ref-index of pointer type
+ that can be used to access size-index elements of the pointed-to
+ array according to access mode, or at least one element when
+ size-index is not provided:
+ access (access-mode, <ref-index> [, <size-index>]) */
+# define __attr_access(x) __attribute__ ((__access__ x))
+/* For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+ use the access attribute to get object sizes from function definition
+ arguments, so we can't use them on functions we fortify. Drop the object
+ size hints for such functions. */
+# if __USE_FORTIFY_LEVEL == 3
+# define __fortified_attr_access(a, o, s) __attribute__ ((__access__ (a, o)))
+# else
+# define __fortified_attr_access(a, o, s) __attr_access ((a, o, s))
+# endif
+# if __GNUC_PREREQ (11, 0)
+# define __attr_access_none(argno) __attribute__ ((__access__ (__none__, argno)))
+# else
+# define __attr_access_none(argno)
+# endif
+#else
+# define __fortified_attr_access(a, o, s)
+# define __attr_access(x)
+# define __attr_access_none(argno)
+#endif
+
+#if __GNUC_PREREQ (11, 0)
+/* Designates dealloc as a function to call to deallocate objects
+ allocated by the declared function. */
+# define __attr_dealloc(dealloc, argno) \
+ __attribute__ ((__malloc__ (dealloc, argno)))
+# define __attr_dealloc_free __attr_dealloc (__builtin_free, 1)
+#else
+# define __attr_dealloc(dealloc, argno)
+# define __attr_dealloc_free
+#endif
+
+/* Specify that a function such as setjmp or vfork may return
+ twice. */
+#if __GNUC_PREREQ (4, 1)
+# define __attribute_returns_twice__ __attribute__ ((__returns_twice__))
+#else
+# define __attribute_returns_twice__ /* Ignore. */
+#endif
+
+#endif /* sys/cdefs.h */
diff --git a/contrib/libs/glibcasm/glibc/posix/bits/types.h b/contrib/libs/glibcasm/glibc/posix/bits/types.h
new file mode 100644
index 0000000000..a1e18d5a56
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/posix/bits/types.h
@@ -0,0 +1,228 @@
+/* bits/types.h -- definitions of __*_t types underlying *_t types.
+ Copyright (C) 2002-2023 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/*
+ * Never include this file directly; use <sys/types.h> instead.
+ */
+
+#ifndef _BITS_TYPES_H
+#define _BITS_TYPES_H 1
+
+#include <features.h>
+#include <bits/wordsize.h>
+#include <bits/timesize.h>
+
+/* Convenience types. */
+typedef unsigned char __u_char;
+typedef unsigned short int __u_short;
+typedef unsigned int __u_int;
+typedef unsigned long int __u_long;
+
+/* Fixed-size types, underlying types depend on word size and compiler. */
+typedef signed char __int8_t;
+typedef unsigned char __uint8_t;
+typedef signed short int __int16_t;
+typedef unsigned short int __uint16_t;
+typedef signed int __int32_t;
+typedef unsigned int __uint32_t;
+#if __WORDSIZE == 64
+typedef signed long int __int64_t;
+typedef unsigned long int __uint64_t;
+#else
+__extension__ typedef signed long long int __int64_t;
+__extension__ typedef unsigned long long int __uint64_t;
+#endif
+
+/* Smallest types with at least a given width. */
+typedef __int8_t __int_least8_t;
+typedef __uint8_t __uint_least8_t;
+typedef __int16_t __int_least16_t;
+typedef __uint16_t __uint_least16_t;
+typedef __int32_t __int_least32_t;
+typedef __uint32_t __uint_least32_t;
+typedef __int64_t __int_least64_t;
+typedef __uint64_t __uint_least64_t;
+
+/* quad_t is also 64 bits. */
+#if __WORDSIZE == 64
+typedef long int __quad_t;
+typedef unsigned long int __u_quad_t;
+#else
+__extension__ typedef long long int __quad_t;
+__extension__ typedef unsigned long long int __u_quad_t;
+#endif
+
+/* Largest integral types. */
+#if __WORDSIZE == 64
+typedef long int __intmax_t;
+typedef unsigned long int __uintmax_t;
+#else
+__extension__ typedef long long int __intmax_t;
+__extension__ typedef unsigned long long int __uintmax_t;
+#endif
+
+
+/* The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+ macros for each of the OS types we define below. The definitions
+ of those macros must use the following macros for underlying types.
+ We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+ variants of each of the following integer types on this machine.
+
+ 16 -- "natural" 16-bit type (always short)
+ 32 -- "natural" 32-bit type (always int)
+ 64 -- "natural" 64-bit type (long or long long)
+ LONG32 -- 32-bit type, traditionally long
+ QUAD -- 64-bit type, traditionally long long
+ WORD -- natural type of __WORDSIZE bits (int or long)
+ LONGWORD -- type of __WORDSIZE bits, traditionally long
+
+ We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+ conventional uses of `long' or `long long' type modifiers match the
+ types we define, even when a less-adorned type would be the same size.
+ This matters for (somewhat) portably writing printf/scanf formats for
+ these types, where using the appropriate l or ll format modifiers can
+ make the typedefs and the formats match up across all GNU platforms. If
+ we used `long' when it's 64 bits where `long long' is expected, then the
+ compiler would warn about the formats not matching the argument types,
+ and the programmer changing them to shut up the compiler would break the
+ program's portability.
+
+ Here we assume what is presently the case in all the GCC configurations
+ we support: long long is always 64 bits, long is always word/address size,
+ and int is always 32 bits. */
+
+#define __S16_TYPE short int
+#define __U16_TYPE unsigned short int
+#define __S32_TYPE int
+#define __U32_TYPE unsigned int
+#define __SLONGWORD_TYPE long int
+#define __ULONGWORD_TYPE unsigned long int
+#if __WORDSIZE == 32
+# define __SQUAD_TYPE __int64_t
+# define __UQUAD_TYPE __uint64_t
+# define __SWORD_TYPE int
+# define __UWORD_TYPE unsigned int
+# define __SLONG32_TYPE long int
+# define __ULONG32_TYPE unsigned long int
+# define __S64_TYPE __int64_t
+# define __U64_TYPE __uint64_t
+/* We want __extension__ before typedef's that use nonstandard base types
+ such as `long long' in C89 mode. */
+# define __STD_TYPE __extension__ typedef
+#elif __WORDSIZE == 64
+# define __SQUAD_TYPE long int
+# define __UQUAD_TYPE unsigned long int
+# define __SWORD_TYPE long int
+# define __UWORD_TYPE unsigned long int
+# define __SLONG32_TYPE int
+# define __ULONG32_TYPE unsigned int
+# define __S64_TYPE long int
+# define __U64_TYPE unsigned long int
+/* No need to mark the typedef with __extension__. */
+# define __STD_TYPE typedef
+#else
+# error
+#endif
+#include <bits/typesizes.h> /* Defines __*_T_TYPE macros. */
+#include <bits/time64.h> /* Defines __TIME*_T_TYPE macros. */
+
+
+__STD_TYPE __DEV_T_TYPE __dev_t; /* Type of device numbers. */
+__STD_TYPE __UID_T_TYPE __uid_t; /* Type of user identifications. */
+__STD_TYPE __GID_T_TYPE __gid_t; /* Type of group identifications. */
+__STD_TYPE __INO_T_TYPE __ino_t; /* Type of file serial numbers. */
+__STD_TYPE __INO64_T_TYPE __ino64_t; /* Type of file serial numbers (LFS).*/
+__STD_TYPE __MODE_T_TYPE __mode_t; /* Type of file attribute bitmasks. */
+__STD_TYPE __NLINK_T_TYPE __nlink_t; /* Type of file link counts. */
+__STD_TYPE __OFF_T_TYPE __off_t; /* Type of file sizes and offsets. */
+__STD_TYPE __OFF64_T_TYPE __off64_t; /* Type of file sizes and offsets (LFS). */
+__STD_TYPE __PID_T_TYPE __pid_t; /* Type of process identifications. */
+__STD_TYPE __FSID_T_TYPE __fsid_t; /* Type of file system IDs. */
+__STD_TYPE __CLOCK_T_TYPE __clock_t; /* Type of CPU usage counts. */
+__STD_TYPE __RLIM_T_TYPE __rlim_t; /* Type for resource measurement. */
+__STD_TYPE __RLIM64_T_TYPE __rlim64_t; /* Type for resource measurement (LFS). */
+__STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */
+__STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */
+__STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */
+__STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */
+__STD_TYPE __SUSECONDS64_T_TYPE __suseconds64_t;
+
+__STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */
+__STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */
+
+/* Clock ID used in clock and timer functions. */
+__STD_TYPE __CLOCKID_T_TYPE __clockid_t;
+
+/* Timer ID returned by `timer_create'. */
+__STD_TYPE __TIMER_T_TYPE __timer_t;
+
+/* Type to represent block size. */
+__STD_TYPE __BLKSIZE_T_TYPE __blksize_t;
+
+/* Types from the Large File Support interface. */
+
+/* Type to count number of disk blocks. */
+__STD_TYPE __BLKCNT_T_TYPE __blkcnt_t;
+__STD_TYPE __BLKCNT64_T_TYPE __blkcnt64_t;
+
+/* Type to count file system blocks. */
+__STD_TYPE __FSBLKCNT_T_TYPE __fsblkcnt_t;
+__STD_TYPE __FSBLKCNT64_T_TYPE __fsblkcnt64_t;
+
+/* Type to count file system nodes. */
+__STD_TYPE __FSFILCNT_T_TYPE __fsfilcnt_t;
+__STD_TYPE __FSFILCNT64_T_TYPE __fsfilcnt64_t;
+
+/* Type of miscellaneous file system fields. */
+__STD_TYPE __FSWORD_T_TYPE __fsword_t;
+
+__STD_TYPE __SSIZE_T_TYPE __ssize_t; /* Type of a byte count, or error. */
+
+/* Signed long type used in system calls. */
+__STD_TYPE __SYSCALL_SLONG_TYPE __syscall_slong_t;
+/* Unsigned long type used in system calls. */
+__STD_TYPE __SYSCALL_ULONG_TYPE __syscall_ulong_t;
+
+/* These few don't really vary by system, they always correspond
+ to one of the other defined types. */
+typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */
+typedef char *__caddr_t;
+
+/* Duplicates info from stdint.h but this is used in unistd.h. */
+__STD_TYPE __SWORD_TYPE __intptr_t;
+
+/* Duplicate info from sys/socket.h. */
+__STD_TYPE __U32_TYPE __socklen_t;
+
+/* C99: An integer type that can be accessed as an atomic entity,
+ even in the presence of asynchronous interrupts.
+ It is not currently necessary for this to be machine-specific. */
+typedef int __sig_atomic_t;
+
+/* Seconds since the Epoch, visible to user code when time_t is too
+ narrow only for consistency with the old way of widening too-narrow
+ types. User code should never use __time64_t. */
+#if __TIMESIZE == 64 && defined __LIBC
+# define __time64_t __time_t
+#elif __TIMESIZE != 64
+__STD_TYPE __TIME64_T_TYPE __time64_t;
+#endif
+
+#undef __STD_TYPE
+
+#endif /* bits/types.h */
diff --git a/contrib/libs/glibcasm/glibc/stdlib/stdint.h b/contrib/libs/glibcasm/glibc/stdlib/stdint.h
new file mode 100644
index 0000000000..165a201ada
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/stdlib/stdint.h
@@ -0,0 +1,319 @@
+/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/*
+ * ISO C99: 7.18 Integer types <stdint.h>
+ */
+
+#ifndef _STDINT_H
+#define _STDINT_H 1
+
+#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
+#include <bits/libc-header-start.h>
+#include <bits/types.h>
+#include <bits/wchar.h>
+#include <bits/wordsize.h>
+
+/* Exact integral types. */
+
+/* Signed. */
+#include <bits/stdint-intn.h>
+
+/* Unsigned. */
+#include <bits/stdint-uintn.h>
+
+
+/* Small types. */
+
+/* Signed. */
+typedef __int_least8_t int_least8_t;
+typedef __int_least16_t int_least16_t;
+typedef __int_least32_t int_least32_t;
+typedef __int_least64_t int_least64_t;
+
+/* Unsigned. */
+typedef __uint_least8_t uint_least8_t;
+typedef __uint_least16_t uint_least16_t;
+typedef __uint_least32_t uint_least32_t;
+typedef __uint_least64_t uint_least64_t;
+
+
+/* Fast types. */
+
+/* Signed. */
+typedef signed char int_fast8_t;
+#if __WORDSIZE == 64
+typedef long int int_fast16_t;
+typedef long int int_fast32_t;
+typedef long int int_fast64_t;
+#else
+typedef int int_fast16_t;
+typedef int int_fast32_t;
+__extension__
+typedef long long int int_fast64_t;
+#endif
+
+/* Unsigned. */
+typedef unsigned char uint_fast8_t;
+#if __WORDSIZE == 64
+typedef unsigned long int uint_fast16_t;
+typedef unsigned long int uint_fast32_t;
+typedef unsigned long int uint_fast64_t;
+#else
+typedef unsigned int uint_fast16_t;
+typedef unsigned int uint_fast32_t;
+__extension__
+typedef unsigned long long int uint_fast64_t;
+#endif
+
+
+/* Types for `void *' pointers. */
+#if __WORDSIZE == 64
+# ifndef __intptr_t_defined
+typedef long int intptr_t;
+# define __intptr_t_defined
+# endif
+typedef unsigned long int uintptr_t;
+#else
+# ifndef __intptr_t_defined
+typedef int intptr_t;
+# define __intptr_t_defined
+# endif
+typedef unsigned int uintptr_t;
+#endif
+
+
+/* Largest integral types. */
+typedef __intmax_t intmax_t;
+typedef __uintmax_t uintmax_t;
+
+
+# if __WORDSIZE == 64
+# define __INT64_C(c) c ## L
+# define __UINT64_C(c) c ## UL
+# else
+# define __INT64_C(c) c ## LL
+# define __UINT64_C(c) c ## ULL
+# endif
+
+/* Limits of integral types. */
+
+/* Minimum of signed integral types. */
+# define INT8_MIN (-128)
+# define INT16_MIN (-32767-1)
+# define INT32_MIN (-2147483647-1)
+# define INT64_MIN (-__INT64_C(9223372036854775807)-1)
+/* Maximum of signed integral types. */
+# define INT8_MAX (127)
+# define INT16_MAX (32767)
+# define INT32_MAX (2147483647)
+# define INT64_MAX (__INT64_C(9223372036854775807))
+
+/* Maximum of unsigned integral types. */
+# define UINT8_MAX (255)
+# define UINT16_MAX (65535)
+# define UINT32_MAX (4294967295U)
+# define UINT64_MAX (__UINT64_C(18446744073709551615))
+
+
+/* Minimum of signed integral types having a minimum size. */
+# define INT_LEAST8_MIN (-128)
+# define INT_LEAST16_MIN (-32767-1)
+# define INT_LEAST32_MIN (-2147483647-1)
+# define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1)
+/* Maximum of signed integral types having a minimum size. */
+# define INT_LEAST8_MAX (127)
+# define INT_LEAST16_MAX (32767)
+# define INT_LEAST32_MAX (2147483647)
+# define INT_LEAST64_MAX (__INT64_C(9223372036854775807))
+
+/* Maximum of unsigned integral types having a minimum size. */
+# define UINT_LEAST8_MAX (255)
+# define UINT_LEAST16_MAX (65535)
+# define UINT_LEAST32_MAX (4294967295U)
+# define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615))
+
+
+/* Minimum of fast signed integral types having a minimum size. */
+# define INT_FAST8_MIN (-128)
+# if __WORDSIZE == 64
+# define INT_FAST16_MIN (-9223372036854775807L-1)
+# define INT_FAST32_MIN (-9223372036854775807L-1)
+# else
+# define INT_FAST16_MIN (-2147483647-1)
+# define INT_FAST32_MIN (-2147483647-1)
+# endif
+# define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1)
+/* Maximum of fast signed integral types having a minimum size. */
+# define INT_FAST8_MAX (127)
+# if __WORDSIZE == 64
+# define INT_FAST16_MAX (9223372036854775807L)
+# define INT_FAST32_MAX (9223372036854775807L)
+# else
+# define INT_FAST16_MAX (2147483647)
+# define INT_FAST32_MAX (2147483647)
+# endif
+# define INT_FAST64_MAX (__INT64_C(9223372036854775807))
+
+/* Maximum of fast unsigned integral types having a minimum size. */
+# define UINT_FAST8_MAX (255)
+# if __WORDSIZE == 64
+# define UINT_FAST16_MAX (18446744073709551615UL)
+# define UINT_FAST32_MAX (18446744073709551615UL)
+# else
+# define UINT_FAST16_MAX (4294967295U)
+# define UINT_FAST32_MAX (4294967295U)
+# endif
+# define UINT_FAST64_MAX (__UINT64_C(18446744073709551615))
+
+
+/* Values to test for integral types holding `void *' pointer. */
+# if __WORDSIZE == 64
+# define INTPTR_MIN (-9223372036854775807L-1)
+# define INTPTR_MAX (9223372036854775807L)
+# define UINTPTR_MAX (18446744073709551615UL)
+# else
+# define INTPTR_MIN (-2147483647-1)
+# define INTPTR_MAX (2147483647)
+# define UINTPTR_MAX (4294967295U)
+# endif
+
+
+/* Minimum for largest signed integral type. */
+# define INTMAX_MIN (-__INT64_C(9223372036854775807)-1)
+/* Maximum for largest signed integral type. */
+# define INTMAX_MAX (__INT64_C(9223372036854775807))
+
+/* Maximum for largest unsigned integral type. */
+# define UINTMAX_MAX (__UINT64_C(18446744073709551615))
+
+
+/* Limits of other integer types. */
+
+/* Limits of `ptrdiff_t' type. */
+# if __WORDSIZE == 64
+# define PTRDIFF_MIN (-9223372036854775807L-1)
+# define PTRDIFF_MAX (9223372036854775807L)
+# else
+# if __WORDSIZE32_PTRDIFF_LONG
+# define PTRDIFF_MIN (-2147483647L-1)
+# define PTRDIFF_MAX (2147483647L)
+# else
+# define PTRDIFF_MIN (-2147483647-1)
+# define PTRDIFF_MAX (2147483647)
+# endif
+# endif
+
+/* Limits of `sig_atomic_t'. */
+# define SIG_ATOMIC_MIN (-2147483647-1)
+# define SIG_ATOMIC_MAX (2147483647)
+
+/* Limit of `size_t' type. */
+# if __WORDSIZE == 64
+# define SIZE_MAX (18446744073709551615UL)
+# else
+# if __WORDSIZE32_SIZE_ULONG
+# define SIZE_MAX (4294967295UL)
+# else
+# define SIZE_MAX (4294967295U)
+# endif
+# endif
+
+/* Limits of `wchar_t'. */
+# ifndef WCHAR_MIN
+/* These constants might also be defined in <wchar.h>. */
+# define WCHAR_MIN __WCHAR_MIN
+# define WCHAR_MAX __WCHAR_MAX
+# endif
+
+/* Limits of `wint_t'. */
+# define WINT_MIN (0u)
+# define WINT_MAX (4294967295u)
+
+/* Signed. */
+# define INT8_C(c) c
+# define INT16_C(c) c
+# define INT32_C(c) c
+# if __WORDSIZE == 64
+# define INT64_C(c) c ## L
+# else
+# define INT64_C(c) c ## LL
+# endif
+
+/* Unsigned. */
+# define UINT8_C(c) c
+# define UINT16_C(c) c
+# define UINT32_C(c) c ## U
+# if __WORDSIZE == 64
+# define UINT64_C(c) c ## UL
+# else
+# define UINT64_C(c) c ## ULL
+# endif
+
+/* Maximal type. */
+# if __WORDSIZE == 64
+# define INTMAX_C(c) c ## L
+# define UINTMAX_C(c) c ## UL
+# else
+# define INTMAX_C(c) c ## LL
+# define UINTMAX_C(c) c ## ULL
+# endif
+
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+
+# define INT8_WIDTH 8
+# define UINT8_WIDTH 8
+# define INT16_WIDTH 16
+# define UINT16_WIDTH 16
+# define INT32_WIDTH 32
+# define UINT32_WIDTH 32
+# define INT64_WIDTH 64
+# define UINT64_WIDTH 64
+
+# define INT_LEAST8_WIDTH 8
+# define UINT_LEAST8_WIDTH 8
+# define INT_LEAST16_WIDTH 16
+# define UINT_LEAST16_WIDTH 16
+# define INT_LEAST32_WIDTH 32
+# define UINT_LEAST32_WIDTH 32
+# define INT_LEAST64_WIDTH 64
+# define UINT_LEAST64_WIDTH 64
+
+# define INT_FAST8_WIDTH 8
+# define UINT_FAST8_WIDTH 8
+# define INT_FAST16_WIDTH __WORDSIZE
+# define UINT_FAST16_WIDTH __WORDSIZE
+# define INT_FAST32_WIDTH __WORDSIZE
+# define UINT_FAST32_WIDTH __WORDSIZE
+# define INT_FAST64_WIDTH 64
+# define UINT_FAST64_WIDTH 64
+
+# define INTPTR_WIDTH __WORDSIZE
+# define UINTPTR_WIDTH __WORDSIZE
+
+# define INTMAX_WIDTH 64
+# define UINTMAX_WIDTH 64
+
+# define PTRDIFF_WIDTH __WORDSIZE
+# define SIG_ATOMIC_WIDTH 32
+# define SIZE_WIDTH __WORDSIZE
+# define WCHAR_WIDTH 32
+# define WINT_WIDTH 32
+
+#endif
+
+#endif /* stdint.h */
diff --git a/contrib/libs/glibcasm/glibc/sysdeps/ieee754/ldbl-96/bits/long-double.h b/contrib/libs/glibcasm/glibc/sysdeps/ieee754/ldbl-96/bits/long-double.h
new file mode 100644
index 0000000000..214d443754
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/sysdeps/ieee754/ldbl-96/bits/long-double.h
@@ -0,0 +1,21 @@
+/* Properties of long double type. ldbl-96 version.
+ Copyright (C) 2016-2023 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* long double is distinct from double, so there is nothing to
+ define here. */
+#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
diff --git a/contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/features-time64.h b/contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/features-time64.h
new file mode 100644
index 0000000000..af9d84daa7
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/features-time64.h
@@ -0,0 +1,37 @@
+/* Features part to handle 64-bit time_t support.
+ Copyright (C) 2021-2023 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* We need to know the word size in order to check the time size. */
+#include <bits/wordsize.h>
+#include <bits/timesize.h>
+
+#if defined _TIME_BITS
+# if _TIME_BITS == 64
+# if ! defined (_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64
+# error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
+# elif __TIMESIZE == 32
+# define __USE_TIME_BITS64 1
+# endif
+# elif _TIME_BITS == 32
+# if __TIMESIZE > 32
+# error "_TIME_BITS=32 is not compatible with __TIMESIZE > 32"
+# endif
+# else
+# error Invalid _TIME_BITS value (can only be 32 or 64-bit)
+# endif
+#endif
diff --git a/contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/x86/bits/timesize.h b/contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/x86/bits/timesize.h
new file mode 100644
index 0000000000..5cb0415382
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/x86/bits/timesize.h
@@ -0,0 +1,27 @@
+/* Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+ Copyright (C) 2018-2023 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <bits/wordsize.h>
+
+#if defined __x86_64__ && defined __ILP32__
+/* For x32, time is 64-bit even though word size is 32-bit. */
+# define __TIMESIZE 64
+#else
+/* For others, time size is word size. */
+# define __TIMESIZE __WORDSIZE
+#endif
diff --git a/contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h b/contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
new file mode 100644
index 0000000000..6b6ec0d288
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
@@ -0,0 +1,106 @@
+/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+ Copyright (C) 2012-2023 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_TYPES_H
+# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
+#endif
+
+#ifndef _BITS_TYPESIZES_H
+#define _BITS_TYPESIZES_H 1
+
+/* See <bits/types.h> for the meaning of these macros. This file exists so
+ that <bits/types.h> need not vary across different GNU platforms. */
+
+/* X32 kernel interface is 64-bit. */
+#if defined __x86_64__ && defined __ILP32__
+# define __SYSCALL_SLONG_TYPE __SQUAD_TYPE
+# define __SYSCALL_ULONG_TYPE __UQUAD_TYPE
+#else
+# define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
+# define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
+#endif
+
+#define __DEV_T_TYPE __UQUAD_TYPE
+#define __UID_T_TYPE __U32_TYPE
+#define __GID_T_TYPE __U32_TYPE
+#define __INO_T_TYPE __SYSCALL_ULONG_TYPE
+#define __INO64_T_TYPE __UQUAD_TYPE
+#define __MODE_T_TYPE __U32_TYPE
+#ifdef __x86_64__
+# define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE
+# define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE
+#else
+# define __NLINK_T_TYPE __UWORD_TYPE
+# define __FSWORD_T_TYPE __SWORD_TYPE
+#endif
+#define __OFF_T_TYPE __SYSCALL_SLONG_TYPE
+#define __OFF64_T_TYPE __SQUAD_TYPE
+#define __PID_T_TYPE __S32_TYPE
+#define __RLIM_T_TYPE __SYSCALL_ULONG_TYPE
+#define __RLIM64_T_TYPE __UQUAD_TYPE
+#define __BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE
+#define __BLKCNT64_T_TYPE __SQUAD_TYPE
+#define __FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE
+#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
+#define __FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE
+#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
+#define __ID_T_TYPE __U32_TYPE
+#define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE
+#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE
+#define __USECONDS_T_TYPE __U32_TYPE
+#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE
+#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
+#define __DADDR_T_TYPE __S32_TYPE
+#define __KEY_T_TYPE __S32_TYPE
+#define __CLOCKID_T_TYPE __S32_TYPE
+#define __TIMER_T_TYPE void *
+#define __BLKSIZE_T_TYPE __SYSCALL_SLONG_TYPE
+#define __FSID_T_TYPE struct { int __val[2]; }
+#define __SSIZE_T_TYPE __SWORD_TYPE
+#define __CPU_MASK_TYPE __SYSCALL_ULONG_TYPE
+
+#ifdef __x86_64__
+/* Tell the libc code that off_t and off64_t are actually the same type
+ for all ABI purposes, even if possibly expressed as different base types
+ for C type-checking purposes. */
+# define __OFF_T_MATCHES_OFF64_T 1
+
+/* Same for ino_t and ino64_t. */
+# define __INO_T_MATCHES_INO64_T 1
+
+/* And for __rlim_t and __rlim64_t. */
+# define __RLIM_T_MATCHES_RLIM64_T 1
+
+/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
+# define __STATFS_MATCHES_STATFS64 1
+
+/* And for getitimer, setitimer and rusage */
+# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
+#else
+# define __RLIM_T_MATCHES_RLIM64_T 0
+
+# define __STATFS_MATCHES_STATFS64 0
+
+# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
+#endif
+
+/* Number of descriptors that can fit in an `fd_set'. */
+#define __FD_SETSIZE 1024
+
+
+#endif /* bits/typesizes.h */
diff --git a/contrib/libs/glibcasm/glibc/sysdeps/x86/bits/wordsize.h b/contrib/libs/glibcasm/glibc/sysdeps/x86/bits/wordsize.h
new file mode 100644
index 0000000000..70f652bca1
--- /dev/null
+++ b/contrib/libs/glibcasm/glibc/sysdeps/x86/bits/wordsize.h
@@ -0,0 +1,17 @@
+/* Determine the wordsize from the preprocessor defines. */
+
+#if defined __x86_64__ && !defined __ILP32__
+# define __WORDSIZE 64
+#else
+# define __WORDSIZE 32
+#define __WORDSIZE32_SIZE_ULONG 0
+#define __WORDSIZE32_PTRDIFF_LONG 0
+#endif
+
+#ifdef __x86_64__
+# define __WORDSIZE_TIME64_COMPAT32 1
+/* Both x86-64 and x32 use the 64-bit system call interface. */
+# define __SYSCALL_WORDSIZE 64
+#else
+# define __WORDSIZE_TIME64_COMPAT32 0
+#endif