aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFrédéric Bérat <fberat@redhat.com>2023-06-07 11:06:50 +0200
committerFrédéric Bérat <fberat@redhat.com>2023-07-05 16:59:48 +0200
commit64f9857507f6dbf9715350b75e83b465be9b8f03 (patch)
treeb176a051eb3b8de0c0969766edc8dc1d889946d4 /include
parenteea000f6e69a829425fae25a7c2519f5c79551de (diff)
downloadglibc-64f9857507f6dbf9715350b75e83b465be9b8f03.zip
glibc-64f9857507f6dbf9715350b75e83b465be9b8f03.tar.gz
glibc-64f9857507f6dbf9715350b75e83b465be9b8f03.tar.bz2
wchar: Avoid PLT entries with _FORTIFY_SOURCE
The change is meant to avoid unwanted PLT entries for the wmemset and wcrtomb routines when _FORTIFY_SOURCE is set. On top of that, ensure that *_chk routines have their hidden builtin definitions available. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'include')
-rw-r--r--include/wchar.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/wchar.h b/include/wchar.h
index 7b763bc..484e6b3 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -166,6 +166,8 @@ 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__;
libc_hidden_proto (__wcscmp)
@@ -260,16 +262,25 @@ extern wchar_t *__wcschrnul (const wchar_t *__s, wchar_t __wc)
extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n,
size_t __ns) __THROW;
+libc_hidden_builtin_proto (__wmemset_chk)
extern int __vfwscanf (__FILE *__restrict __s,
const wchar_t *__restrict __format,
__gnuc_va_list __arg)
attribute_hidden
/* __attribute__ ((__format__ (__wscanf__, 2, 0)) */;
+
+extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n,
+ int __flag, size_t __s_len,
+ const wchar_t *__restrict __format, ...)
+ __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 6))) */;
+
extern int __fwprintf (__FILE *__restrict __s,
const wchar_t *__restrict __format, ...)
attribute_hidden
/* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;
+extern int __wprintf_chk (int __flag, const wchar_t *__restrict __format,
+ ...);
extern int __vfwprintf_chk (FILE *__restrict __s, int __flag,
const wchar_t *__restrict __format,
__gnuc_va_list __arg)
@@ -279,6 +290,10 @@ extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n,
const wchar_t *__restrict __format,
__gnuc_va_list __arg)
/* __attribute__ ((__format__ (__wprintf__, 5, 0))) */;
+extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag,
+ const wchar_t *__restrict __format, ...);
+extern int __vwprintf_chk (int __flag, const wchar_t *__restrict __format,
+ __gnuc_va_list __ap);
extern int __isoc99_fwscanf (__FILE *__restrict __stream,
const wchar_t *__restrict __format, ...);