aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/glibcasm/glibc/include/sys
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 /contrib/libs/glibcasm/glibc/include/sys
parent375bf331910edc492b41e0bae27b5ed1dd334ac4 (diff)
downloadydb-af0ccdb33dabd69888206ac64acf95b632ac1b21.tar.gz
add glibc-2.37 code for string and memory functions
Diffstat (limited to 'contrib/libs/glibcasm/glibc/include/sys')
-rw-r--r--contrib/libs/glibcasm/glibc/include/sys/cdefs.h45
1 files changed, 45 insertions, 0 deletions
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