about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/bits/stdio2-decl.h7
-rw-r--r--include/bits/string_fortified.h15
-rw-r--r--include/bits/syslog-decl.h4
-rw-r--r--include/bits/unistd-decl.h6
-rw-r--r--include/bits/wchar2-decl.h5
-rw-r--r--include/stdio.h12
-rw-r--r--include/unistd.h4
-rw-r--r--include/wchar.h1
8 files changed, 47 insertions, 7 deletions
diff --git a/include/bits/stdio2-decl.h b/include/bits/stdio2-decl.h
index bbb052f192..9758bf4b55 100644
--- a/include/bits/stdio2-decl.h
+++ b/include/bits/stdio2-decl.h
@@ -1 +1,8 @@
 #include <libio/bits/stdio2-decl.h>
+
+#ifndef _ISOMAC
+libc_hidden_proto (__fgets_unlocked_chk)
+libc_hidden_ldbl_proto (vfprintf)
+libc_hidden_ldbl_proto (__vasprintf_chk)
+libc_hidden_ldbl_proto (__vfprintf_chk)
+#endif
diff --git a/include/bits/string_fortified.h b/include/bits/string_fortified.h
index 88bf073c9c..0cf0e76db1 100644
--- a/include/bits/string_fortified.h
+++ b/include/bits/string_fortified.h
@@ -1 +1,16 @@
+#ifndef _ISOMAC
+# if IS_IN(libc) && defined SHARED
+/* Redirect calls from __builtin_stpcpy_chk to internal __stpcpy when building
+   with fortify enable.  */
+__asm__ ("stpcpy = __GI___stpcpy");
+# endif
+
+/* Add the internal aliass attribute to symbol before they first usage on the
+   fortify wrappers.  */
+libc_hidden_builtin_proto (memcpy)
+libc_hidden_builtin_proto (mempcpy)
+libc_hidden_builtin_proto (memmove)
+libc_hidden_builtin_proto (memset)
+#endif
+
 #include <string/bits/string_fortified.h>
diff --git a/include/bits/syslog-decl.h b/include/bits/syslog-decl.h
index 491a263777..762b289184 100644
--- a/include/bits/syslog-decl.h
+++ b/include/bits/syslog-decl.h
@@ -1 +1,5 @@
 #include <misc/bits/syslog-decl.h>
+
+#ifndef _ISOMAC
+libc_hidden_ldbl_proto (__vsyslog_chk)
+#endif
diff --git a/include/bits/unistd-decl.h b/include/bits/unistd-decl.h
index 7fcbd272ac..dd6af7e4c8 100644
--- a/include/bits/unistd-decl.h
+++ b/include/bits/unistd-decl.h
@@ -1 +1,7 @@
 #include <posix/bits/unistd-decl.h>
+
+#ifndef _ISOMAC
+libc_hidden_proto (__read_chk)
+libc_hidden_proto (__getdomainname_chk)
+libc_hidden_proto (__getlogin_r_chk)
+#endif
diff --git a/include/bits/wchar2-decl.h b/include/bits/wchar2-decl.h
index 00b1b93342..f3b8a8cf87 100644
--- a/include/bits/wchar2-decl.h
+++ b/include/bits/wchar2-decl.h
@@ -1 +1,6 @@
 #include <wcsmbs/bits/wchar2-decl.h>
+
+#ifndef _ISOMAC
+libc_hidden_builtin_proto (__wmemset_chk)
+libc_hidden_proto (__wcrtomb_chk)
+#endif
diff --git a/include/stdio.h b/include/stdio.h
index e48d709919..63cd59da90 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -23,8 +23,12 @@
     redirecting ldouble to _Float128 variants.  We can therefore safely
     directly alias them to their internal name.  */
 # if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 && IS_IN (libc)
-#  define stdio_hidden_ldbl_proto(p, f) \
-  extern __typeof (p ## f) p ## f __asm (__ASMNAME ("___ieee128_" #f));
+#  ifdef SHARED
+#   define stdio_hidden_ldbl_proto(p, f) __LDBL_REDIR2_DECL (f)
+#  else
+#   define stdio_hidden_ldbl_proto(p, f) \
+  extern __typeof (p ## f) p ## f __asm (#p __ASMNAME (#f "ieee128"));
+#  endif
 # elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
 #  define stdio_hidden_ldbl_proto(p,f) __LDBL_REDIR1_DECL (p ## f, p ## f ## ieee128)
 # else
@@ -70,10 +74,14 @@ extern int __printf_chk (int, const char *, ...);
 extern int __fprintf_chk (FILE *, int, const char *, ...);
 extern int __vprintf_chk (int, const char *, __gnuc_va_list);
 extern int __vfprintf_chk (FILE *, int, const char *, __gnuc_va_list);
+//libc_hidden_proto (__vfprintf_chk)
+stdio_hidden_ldbl_proto (__, vfprintf_chk)
 extern char *__fgets_unlocked_chk (char *buf, size_t size, int n, FILE *fp);
 extern char *__fgets_chk (char *buf, size_t size, int n, FILE *fp);
 extern int __asprintf_chk (char **, int, const char *, ...) __THROW;
 extern int __vasprintf_chk (char **, int, const char *, __gnuc_va_list) __THROW;
+//libc_hidden_proto (__vasprintf_chk)
+stdio_hidden_ldbl_proto (__, vasprintf_chk)
 extern int __dprintf_chk (int, int, const char *, ...);
 extern int __vdprintf_chk (int, int, const char *, __gnuc_va_list);
 extern int __obstack_printf_chk (struct obstack *, int, const char *, ...)
diff --git a/include/unistd.h b/include/unistd.h
index e241603b81..b042a485f9 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -32,10 +32,6 @@ libc_hidden_proto (readlinkat)
 libc_hidden_proto (fsync)
 libc_hidden_proto (fdatasync)
 
-libc_hidden_proto (__read_chk)
-libc_hidden_proto (__getdomainname_chk)
-libc_hidden_proto (__getlogin_r_chk)
-
 /* Now define the internal interfaces.  */
 extern int __access (const char *__name, int __type);
 libc_hidden_proto (__access)
diff --git a/include/wchar.h b/include/wchar.h
index bf32625736..6abb0d2697 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -166,7 +166,6 @@ libc_hidden_proto (putwc)
 
 libc_hidden_proto (mbrtowc)
 libc_hidden_proto (wcrtomb)
-libc_hidden_proto (__wcrtomb_chk)
 
 extern int __wcscmp (const wchar_t *__s1, const wchar_t *__s2)
      __THROW __attribute_pure__;