mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Fix attributes for fortify functions.
This commit is contained in:
32
ChangeLog
32
ChangeLog
@ -1,3 +1,35 @@
|
|||||||
|
2012-04-29 Marek Polacek <polacek@redhat.com>
|
||||||
|
|
||||||
|
* misc/sys/cdefs.h (__attribute_artificial__): New macro.
|
||||||
|
(__fortify_function): New macro.
|
||||||
|
(__extern_always_inline): Don't use __attribute__ ((__artificial__)).
|
||||||
|
* libio/bits/stdio-ldbl.h: Use __fortify_function in place of
|
||||||
|
__extern_always_inline.
|
||||||
|
* libio/bits/stdio2.h: Likewise.
|
||||||
|
* libio/bits/stdio.h: Likewise.
|
||||||
|
* string/string.h: Likewise.
|
||||||
|
* string/bits/string3.h: Likewise.
|
||||||
|
* include/stdio.h: Likewise.
|
||||||
|
* stdlib/bits/stdlib.h: Likewise.
|
||||||
|
* stdlib/stdlib.h: Likewise.
|
||||||
|
* rt/bits/mqueue2.h: Likewise.
|
||||||
|
* rt/mqueue.h: Likewise.
|
||||||
|
* posix/bits/unistd.h: Likewise.
|
||||||
|
* posix/unistd.h: Likewise.
|
||||||
|
* io/bits/poll2.h: Likewise.
|
||||||
|
* io/bits/fcntl2.h: Likewise.
|
||||||
|
* io/fcntl.h: Likewise.
|
||||||
|
* io/sys/poll.h: Likewise.
|
||||||
|
* misc/bits/syslog.h: Likewise.
|
||||||
|
* misc/bits/syslog-ldbl.h: Likewise.
|
||||||
|
* misc/sys/syslog.h: Likewise.
|
||||||
|
* socket/bits/socket2.h: Likewise.
|
||||||
|
* socket/sys/socket.h: Likewise.
|
||||||
|
* debug/tst-chk1.c: Likewise.
|
||||||
|
* wcsmbs/bits/wchar2.h: Likewise.
|
||||||
|
* wcsmbs/bits/wchar-ldbl.h: Likewise.
|
||||||
|
* wcsmbs/wchar.h: Likewise.
|
||||||
|
|
||||||
2012-04-29 Andreas Jaeger <aj@suse.de>
|
2012-04-29 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
* Makerules (tests): Remove enable-check-abi protection.
|
* Makerules (tests): Remove enable-check-abi protection.
|
||||||
|
@ -148,7 +148,7 @@ do_test (void)
|
|||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
#if defined __USE_FORTIFY_LEVEL && !defined __extern_always_inline
|
#if defined __USE_FORTIFY_LEVEL && !defined __fortify_function
|
||||||
printf ("Test skipped");
|
printf ("Test skipped");
|
||||||
if (l0 == 0)
|
if (l0 == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -176,7 +176,7 @@ extern char *__REDIRECT (__gets_warn, (char *__str), gets)
|
|||||||
__wur __warnattr ("please use fgets or getline instead, gets can't "
|
__wur __warnattr ("please use fgets or getline instead, gets can't "
|
||||||
"specify buffer size");
|
"specify buffer size");
|
||||||
|
|
||||||
__extern_always_inline __wur char *
|
__fortify_function __wur char *
|
||||||
gets (char *__str)
|
gets (char *__str)
|
||||||
{
|
{
|
||||||
if (__bos (__str) != (size_t) -1)
|
if (__bos (__str) != (size_t) -1)
|
||||||
|
@ -37,7 +37,7 @@ __errordecl (__open_too_many_args,
|
|||||||
__errordecl (__open_missing_mode,
|
__errordecl (__open_missing_mode,
|
||||||
"open with O_CREAT in second argument needs 3 arguments");
|
"open with O_CREAT in second argument needs 3 arguments");
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
open (const char *__path, int __oflag, ...)
|
open (const char *__path, int __oflag, ...)
|
||||||
{
|
{
|
||||||
if (__va_arg_pack_len () > 1)
|
if (__va_arg_pack_len () > 1)
|
||||||
@ -69,7 +69,7 @@ __errordecl (__open64_too_many_args,
|
|||||||
__errordecl (__open64_missing_mode,
|
__errordecl (__open64_missing_mode,
|
||||||
"open64 with O_CREAT in second argument needs 3 arguments");
|
"open64 with O_CREAT in second argument needs 3 arguments");
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
open64 (const char *__path, int __oflag, ...)
|
open64 (const char *__path, int __oflag, ...)
|
||||||
{
|
{
|
||||||
if (__va_arg_pack_len () > 1)
|
if (__va_arg_pack_len () > 1)
|
||||||
@ -113,7 +113,7 @@ __errordecl (__openat_too_many_args,
|
|||||||
__errordecl (__openat_missing_mode,
|
__errordecl (__openat_missing_mode,
|
||||||
"openat with O_CREAT in third argument needs 4 arguments");
|
"openat with O_CREAT in third argument needs 4 arguments");
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
openat (int __fd, const char *__path, int __oflag, ...)
|
openat (int __fd, const char *__path, int __oflag, ...)
|
||||||
{
|
{
|
||||||
if (__va_arg_pack_len () > 1)
|
if (__va_arg_pack_len () > 1)
|
||||||
@ -147,7 +147,7 @@ __errordecl (__openat64_too_many_args,
|
|||||||
__errordecl (__openat64_missing_mode,
|
__errordecl (__openat64_missing_mode,
|
||||||
"openat64 with O_CREAT in third argument needs 4 arguments");
|
"openat64 with O_CREAT in third argument needs 4 arguments");
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
openat64 (int __fd, const char *__path, int __oflag, ...)
|
openat64 (int __fd, const char *__path, int __oflag, ...)
|
||||||
{
|
{
|
||||||
if (__va_arg_pack_len () > 1)
|
if (__va_arg_pack_len () > 1)
|
||||||
|
@ -32,7 +32,7 @@ extern int __REDIRECT (__poll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
|
|||||||
__poll_chk)
|
__poll_chk)
|
||||||
__warnattr ("poll called with fds buffer too small file nfds entries");
|
__warnattr ("poll called with fds buffer too small file nfds entries");
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
|
poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
|
||||||
{
|
{
|
||||||
if (__bos (__fds) != (__SIZE_TYPE__) -1)
|
if (__bos (__fds) != (__SIZE_TYPE__) -1)
|
||||||
@ -61,7 +61,7 @@ extern int __REDIRECT (__ppoll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
|
|||||||
__ppoll_chk)
|
__ppoll_chk)
|
||||||
__warnattr ("ppoll called with fds buffer too small file nfds entries");
|
__warnattr ("ppoll called with fds buffer too small file nfds entries");
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout,
|
ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout,
|
||||||
const __sigset_t *__ss)
|
const __sigset_t *__ss)
|
||||||
{
|
{
|
||||||
|
@ -263,7 +263,7 @@ extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len);
|
|||||||
|
|
||||||
|
|
||||||
/* Define some inlines helping to catch common problems. */
|
/* Define some inlines helping to catch common problems. */
|
||||||
#if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline \
|
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function \
|
||||||
&& defined __va_arg_pack_len
|
&& defined __va_arg_pack_len
|
||||||
# include <bits/fcntl2.h>
|
# include <bits/fcntl2.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -72,7 +72,7 @@ __END_DECLS
|
|||||||
|
|
||||||
|
|
||||||
/* Define some inlines helping to catch common problems. */
|
/* Define some inlines helping to catch common problems. */
|
||||||
#if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline
|
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
|
||||||
# include <bits/poll2.h>
|
# include <bits/poll2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ __LDBL_REDIR_DECL (obstack_printf)
|
|||||||
__LDBL_REDIR_DECL (obstack_vprintf)
|
__LDBL_REDIR_DECL (obstack_vprintf)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline
|
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
|
||||||
__LDBL_REDIR_DECL (__sprintf_chk)
|
__LDBL_REDIR_DECL (__sprintf_chk)
|
||||||
__LDBL_REDIR_DECL (__vsprintf_chk)
|
__LDBL_REDIR_DECL (__vsprintf_chk)
|
||||||
# if defined __USE_BSD || defined __USE_ISOC99 || defined __USE_UNIX98
|
# if defined __USE_BSD || defined __USE_ISOC99 || defined __USE_UNIX98
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#ifdef __USE_EXTERN_INLINES
|
#ifdef __USE_EXTERN_INLINES
|
||||||
/* For -D_FORTIFY_SOURCE{,=2} bits/stdio2.h will define a different
|
/* For -D_FORTIFY_SOURCE{,=2} bits/stdio2.h will define a different
|
||||||
inline. */
|
inline. */
|
||||||
# if !(__USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline)
|
# if !(__USE_FORTIFY_LEVEL > 0 && defined __fortify_function)
|
||||||
/* Write formatted output to stdout from argument list ARG. */
|
/* Write formatted output to stdout from argument list ARG. */
|
||||||
__STDIO_INLINE int
|
__STDIO_INLINE int
|
||||||
vprintf (const char *__restrict __fmt, _G_va_list __arg)
|
vprintf (const char *__restrict __fmt, _G_va_list __arg)
|
||||||
|
@ -27,7 +27,7 @@ extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
|
|||||||
_G_va_list __ap) __THROW;
|
_G_va_list __ap) __THROW;
|
||||||
|
|
||||||
#ifdef __va_arg_pack
|
#ifdef __va_arg_pack
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
__NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
|
__NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
|
||||||
{
|
{
|
||||||
return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
|
return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
|
||||||
@ -39,7 +39,7 @@ __NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
|
|||||||
__VA_ARGS__)
|
__VA_ARGS__)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
__NTH (vsprintf (char *__restrict __s, const char *__restrict __fmt,
|
__NTH (vsprintf (char *__restrict __s, const char *__restrict __fmt,
|
||||||
_G_va_list __ap))
|
_G_va_list __ap))
|
||||||
{
|
{
|
||||||
@ -57,7 +57,7 @@ extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
|
|||||||
_G_va_list __ap) __THROW;
|
_G_va_list __ap) __THROW;
|
||||||
|
|
||||||
# ifdef __va_arg_pack
|
# ifdef __va_arg_pack
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
__NTH (snprintf (char *__restrict __s, size_t __n,
|
__NTH (snprintf (char *__restrict __s, size_t __n,
|
||||||
const char *__restrict __fmt, ...))
|
const char *__restrict __fmt, ...))
|
||||||
{
|
{
|
||||||
@ -70,7 +70,7 @@ __NTH (snprintf (char *__restrict __s, size_t __n,
|
|||||||
__VA_ARGS__)
|
__VA_ARGS__)
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
__NTH (vsnprintf (char *__restrict __s, size_t __n,
|
__NTH (vsnprintf (char *__restrict __s, size_t __n,
|
||||||
const char *__restrict __fmt, _G_va_list __ap))
|
const char *__restrict __fmt, _G_va_list __ap))
|
||||||
{
|
{
|
||||||
@ -91,14 +91,14 @@ extern int __vprintf_chk (int __flag, const char *__restrict __format,
|
|||||||
_G_va_list __ap);
|
_G_va_list __ap);
|
||||||
|
|
||||||
# ifdef __va_arg_pack
|
# ifdef __va_arg_pack
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
|
fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
|
||||||
{
|
{
|
||||||
return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt,
|
return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt,
|
||||||
__va_arg_pack ());
|
__va_arg_pack ());
|
||||||
}
|
}
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
printf (const char *__restrict __fmt, ...)
|
printf (const char *__restrict __fmt, ...)
|
||||||
{
|
{
|
||||||
return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
|
return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
|
||||||
@ -110,7 +110,7 @@ printf (const char *__restrict __fmt, ...)
|
|||||||
__fprintf_chk (stream, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
|
__fprintf_chk (stream, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
vprintf (const char *__restrict __fmt, _G_va_list __ap)
|
vprintf (const char *__restrict __fmt, _G_va_list __ap)
|
||||||
{
|
{
|
||||||
#ifdef __USE_EXTERN_INLINES
|
#ifdef __USE_EXTERN_INLINES
|
||||||
@ -120,7 +120,7 @@ vprintf (const char *__restrict __fmt, _G_va_list __ap)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
vfprintf (FILE *__restrict __stream,
|
vfprintf (FILE *__restrict __stream,
|
||||||
const char *__restrict __fmt, _G_va_list __ap)
|
const char *__restrict __fmt, _G_va_list __ap)
|
||||||
{
|
{
|
||||||
@ -151,14 +151,14 @@ extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
|
|||||||
__THROW __attribute__ ((__format__ (__printf__, 3, 0)));
|
__THROW __attribute__ ((__format__ (__printf__, 3, 0)));
|
||||||
|
|
||||||
# ifdef __va_arg_pack
|
# ifdef __va_arg_pack
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
__NTH (asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...))
|
__NTH (asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...))
|
||||||
{
|
{
|
||||||
return __asprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt,
|
return __asprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt,
|
||||||
__va_arg_pack ());
|
__va_arg_pack ());
|
||||||
}
|
}
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
__NTH (__asprintf (char **__restrict __ptr, const char *__restrict __fmt,
|
__NTH (__asprintf (char **__restrict __ptr, const char *__restrict __fmt,
|
||||||
...))
|
...))
|
||||||
{
|
{
|
||||||
@ -166,14 +166,14 @@ __NTH (__asprintf (char **__restrict __ptr, const char *__restrict __fmt,
|
|||||||
__va_arg_pack ());
|
__va_arg_pack ());
|
||||||
}
|
}
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
dprintf (int __fd, const char *__restrict __fmt, ...)
|
dprintf (int __fd, const char *__restrict __fmt, ...)
|
||||||
{
|
{
|
||||||
return __dprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt,
|
return __dprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt,
|
||||||
__va_arg_pack ());
|
__va_arg_pack ());
|
||||||
}
|
}
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
__NTH (obstack_printf (struct obstack *__restrict __obstack,
|
__NTH (obstack_printf (struct obstack *__restrict __obstack,
|
||||||
const char *__restrict __fmt, ...))
|
const char *__restrict __fmt, ...))
|
||||||
{
|
{
|
||||||
@ -191,20 +191,20 @@ __NTH (obstack_printf (struct obstack *__restrict __obstack,
|
|||||||
__obstack_printf_chk (obstack, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
|
__obstack_printf_chk (obstack, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
__NTH (vasprintf (char **__restrict __ptr, const char *__restrict __fmt,
|
__NTH (vasprintf (char **__restrict __ptr, const char *__restrict __fmt,
|
||||||
_G_va_list __ap))
|
_G_va_list __ap))
|
||||||
{
|
{
|
||||||
return __vasprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
|
return __vasprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
vdprintf (int __fd, const char *__restrict __fmt, _G_va_list __ap)
|
vdprintf (int __fd, const char *__restrict __fmt, _G_va_list __ap)
|
||||||
{
|
{
|
||||||
return __vdprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
|
return __vdprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
__NTH (obstack_vprintf (struct obstack *__restrict __obstack,
|
__NTH (obstack_vprintf (struct obstack *__restrict __obstack,
|
||||||
const char *__restrict __fmt, _G_va_list __ap))
|
const char *__restrict __fmt, _G_va_list __ap))
|
||||||
{
|
{
|
||||||
@ -223,7 +223,7 @@ extern char *__REDIRECT (__gets_warn, (char *__str), gets)
|
|||||||
__wur __warnattr ("please use fgets or getline instead, gets can't "
|
__wur __warnattr ("please use fgets or getline instead, gets can't "
|
||||||
"specify buffer size");
|
"specify buffer size");
|
||||||
|
|
||||||
__extern_always_inline __wur char *
|
__fortify_function __wur char *
|
||||||
gets (char *__str)
|
gets (char *__str)
|
||||||
{
|
{
|
||||||
if (__bos (__str) != (size_t) -1)
|
if (__bos (__str) != (size_t) -1)
|
||||||
@ -243,7 +243,7 @@ extern char *__REDIRECT (__fgets_chk_warn,
|
|||||||
__wur __warnattr ("fgets called with bigger size than length "
|
__wur __warnattr ("fgets called with bigger size than length "
|
||||||
"of destination buffer");
|
"of destination buffer");
|
||||||
|
|
||||||
__extern_always_inline __wur char *
|
__fortify_function __wur char *
|
||||||
fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
|
fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
|
||||||
{
|
{
|
||||||
if (__bos (__s) != (size_t) -1)
|
if (__bos (__s) != (size_t) -1)
|
||||||
@ -272,7 +272,7 @@ extern size_t __REDIRECT (__fread_chk_warn,
|
|||||||
__wur __warnattr ("fread called with bigger size * nmemb than length "
|
__wur __warnattr ("fread called with bigger size * nmemb than length "
|
||||||
"of destination buffer");
|
"of destination buffer");
|
||||||
|
|
||||||
__extern_always_inline __wur size_t
|
__fortify_function __wur size_t
|
||||||
fread (void *__restrict __ptr, size_t __size, size_t __n,
|
fread (void *__restrict __ptr, size_t __size, size_t __n,
|
||||||
FILE *__restrict __stream)
|
FILE *__restrict __stream)
|
||||||
{
|
{
|
||||||
@ -301,7 +301,7 @@ extern char *__REDIRECT (__fgets_unlocked_chk_warn,
|
|||||||
__wur __warnattr ("fgets_unlocked called with bigger size than length "
|
__wur __warnattr ("fgets_unlocked called with bigger size than length "
|
||||||
"of destination buffer");
|
"of destination buffer");
|
||||||
|
|
||||||
__extern_always_inline __wur char *
|
__fortify_function __wur char *
|
||||||
fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
|
fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
|
||||||
{
|
{
|
||||||
if (__bos (__s) != (size_t) -1)
|
if (__bos (__s) != (size_t) -1)
|
||||||
@ -333,7 +333,7 @@ extern size_t __REDIRECT (__fread_unlocked_chk_warn,
|
|||||||
__wur __warnattr ("fread_unlocked called with bigger size * nmemb than "
|
__wur __warnattr ("fread_unlocked called with bigger size * nmemb than "
|
||||||
"length of destination buffer");
|
"length of destination buffer");
|
||||||
|
|
||||||
__extern_always_inline __wur size_t
|
__fortify_function __wur size_t
|
||||||
fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
|
fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
|
||||||
FILE *__restrict __stream)
|
FILE *__restrict __stream)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* -mlong-double-64 compatibility mode for syslog functions.
|
/* -mlong-double-64 compatibility mode for syslog functions.
|
||||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
Copyright (C) 2006-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -26,7 +26,7 @@ __LDBL_REDIR_DECL (syslog)
|
|||||||
__LDBL_REDIR_DECL (vsyslog)
|
__LDBL_REDIR_DECL (vsyslog)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline
|
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
|
||||||
__LDBL_REDIR_DECL (__syslog_chk)
|
__LDBL_REDIR_DECL (__syslog_chk)
|
||||||
|
|
||||||
# ifdef __USE_BSD
|
# ifdef __USE_BSD
|
||||||
|
@ -25,7 +25,7 @@ extern void __syslog_chk (int __pri, int __flag, const char *__fmt, ...)
|
|||||||
__attribute__ ((__format__ (__printf__, 3, 4)));
|
__attribute__ ((__format__ (__printf__, 3, 4)));
|
||||||
|
|
||||||
#ifdef __va_arg_pack
|
#ifdef __va_arg_pack
|
||||||
__extern_always_inline void
|
__fortify_function void
|
||||||
syslog (int __pri, const char *__fmt, ...)
|
syslog (int __pri, const char *__fmt, ...)
|
||||||
{
|
{
|
||||||
__syslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
|
__syslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
|
||||||
@ -41,7 +41,7 @@ extern void __vsyslog_chk (int __pri, int __flag, const char *__fmt,
|
|||||||
__gnuc_va_list __ap)
|
__gnuc_va_list __ap)
|
||||||
__attribute__ ((__format__ (__printf__, 3, 0)));
|
__attribute__ ((__format__ (__printf__, 3, 0)));
|
||||||
|
|
||||||
__extern_always_inline void
|
__fortify_function void
|
||||||
vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap)
|
vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap)
|
||||||
{
|
{
|
||||||
__vsyslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
|
__vsyslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
|
||||||
|
@ -140,6 +140,7 @@
|
|||||||
/* Fortify support. */
|
/* Fortify support. */
|
||||||
#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
|
#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
|
||||||
#define __bos0(ptr) __builtin_object_size (ptr, 0)
|
#define __bos0(ptr) __builtin_object_size (ptr, 0)
|
||||||
|
#define __fortify_function __extern_always_inline __attribute_artificial__
|
||||||
|
|
||||||
#if __GNUC_PREREQ (4,3)
|
#if __GNUC_PREREQ (4,3)
|
||||||
# define __warndecl(name, msg) \
|
# define __warndecl(name, msg) \
|
||||||
@ -309,28 +310,26 @@
|
|||||||
# define __always_inline __inline
|
# define __always_inline __inline
|
||||||
#endif
|
#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)
|
||||||
|
# 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
|
/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
|
||||||
inline semantics, unless -fgnu89-inline is used. */
|
inline semantics, unless -fgnu89-inline is used. */
|
||||||
#if !defined __cplusplus || __GNUC_PREREQ (4,3)
|
#if !defined __cplusplus || __GNUC_PREREQ (4,3)
|
||||||
# if defined __GNUC_STDC_INLINE__ || defined __cplusplus
|
# if defined __GNUC_STDC_INLINE__ || defined __cplusplus
|
||||||
# define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
|
# define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
|
||||||
# if __GNUC_PREREQ (4,3)
|
|
||||||
# define __extern_always_inline \
|
|
||||||
extern __always_inline __attribute__ ((__gnu_inline__, __artificial__))
|
|
||||||
# else
|
|
||||||
# define __extern_always_inline \
|
# define __extern_always_inline \
|
||||||
extern __always_inline __attribute__ ((__gnu_inline__))
|
extern __always_inline __attribute__ ((__gnu_inline__))
|
||||||
# endif
|
|
||||||
# else
|
# else
|
||||||
# define __extern_inline extern __inline
|
# define __extern_inline extern __inline
|
||||||
# if __GNUC_PREREQ (4,3)
|
|
||||||
# define __extern_always_inline \
|
|
||||||
extern __always_inline __attribute__ ((__artificial__))
|
|
||||||
# else
|
|
||||||
# define __extern_always_inline extern __always_inline
|
# define __extern_always_inline extern __always_inline
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
/* GCC 4.3 and above allow passing all anonymous arguments of an
|
/* GCC 4.3 and above allow passing all anonymous arguments of an
|
||||||
__extern_always_inline function to some other vararg function. */
|
__extern_always_inline function to some other vararg function. */
|
||||||
|
@ -203,7 +203,7 @@ extern void vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap)
|
|||||||
|
|
||||||
|
|
||||||
/* Define some macros helping to catch buffer overflows. */
|
/* Define some macros helping to catch buffer overflows. */
|
||||||
#if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline
|
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
|
||||||
# include <bits/syslog.h>
|
# include <bits/syslog.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef __LDBL_COMPAT
|
#ifdef __LDBL_COMPAT
|
||||||
|
@ -30,7 +30,7 @@ extern ssize_t __REDIRECT (__read_chk_warn,
|
|||||||
__wur __warnattr ("read called with bigger length than size of "
|
__wur __warnattr ("read called with bigger length than size of "
|
||||||
"the destination buffer");
|
"the destination buffer");
|
||||||
|
|
||||||
__extern_always_inline __wur ssize_t
|
__fortify_function __wur ssize_t
|
||||||
read (int __fd, void *__buf, size_t __nbytes)
|
read (int __fd, void *__buf, size_t __nbytes)
|
||||||
{
|
{
|
||||||
if (__bos0 (__buf) != (size_t) -1)
|
if (__bos0 (__buf) != (size_t) -1)
|
||||||
@ -68,7 +68,7 @@ extern ssize_t __REDIRECT (__pread64_chk_warn,
|
|||||||
"the destination buffer");
|
"the destination buffer");
|
||||||
|
|
||||||
# ifndef __USE_FILE_OFFSET64
|
# ifndef __USE_FILE_OFFSET64
|
||||||
__extern_always_inline __wur ssize_t
|
__fortify_function __wur ssize_t
|
||||||
pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
|
pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
|
||||||
{
|
{
|
||||||
if (__bos0 (__buf) != (size_t) -1)
|
if (__bos0 (__buf) != (size_t) -1)
|
||||||
@ -83,7 +83,7 @@ pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
|
|||||||
return __pread_alias (__fd, __buf, __nbytes, __offset);
|
return __pread_alias (__fd, __buf, __nbytes, __offset);
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
__extern_always_inline __wur ssize_t
|
__fortify_function __wur ssize_t
|
||||||
pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
|
pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
|
||||||
{
|
{
|
||||||
if (__bos0 (__buf) != (size_t) -1)
|
if (__bos0 (__buf) != (size_t) -1)
|
||||||
@ -101,7 +101,7 @@ pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef __USE_LARGEFILE64
|
# ifdef __USE_LARGEFILE64
|
||||||
__extern_always_inline __wur ssize_t
|
__fortify_function __wur ssize_t
|
||||||
pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
|
pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
|
||||||
{
|
{
|
||||||
if (__bos0 (__buf) != (size_t) -1)
|
if (__bos0 (__buf) != (size_t) -1)
|
||||||
@ -135,7 +135,7 @@ extern ssize_t __REDIRECT_NTH (__readlink_chk_warn,
|
|||||||
__nonnull ((1, 2)) __wur __warnattr ("readlink called with bigger length "
|
__nonnull ((1, 2)) __wur __warnattr ("readlink called with bigger length "
|
||||||
"than size of destination buffer");
|
"than size of destination buffer");
|
||||||
|
|
||||||
__extern_always_inline __nonnull ((1, 2)) __wur ssize_t
|
__fortify_function __nonnull ((1, 2)) __wur ssize_t
|
||||||
__NTH (readlink (const char *__restrict __path, char *__restrict __buf,
|
__NTH (readlink (const char *__restrict __path, char *__restrict __buf,
|
||||||
size_t __len))
|
size_t __len))
|
||||||
{
|
{
|
||||||
@ -169,7 +169,7 @@ extern ssize_t __REDIRECT_NTH (__readlinkat_chk_warn,
|
|||||||
"length than size of destination "
|
"length than size of destination "
|
||||||
"buffer");
|
"buffer");
|
||||||
|
|
||||||
__extern_always_inline __nonnull ((2, 3)) __wur ssize_t
|
__fortify_function __nonnull ((2, 3)) __wur ssize_t
|
||||||
__NTH (readlinkat (int __fd, const char *__restrict __path,
|
__NTH (readlinkat (int __fd, const char *__restrict __path,
|
||||||
char *__restrict __buf, size_t __len))
|
char *__restrict __buf, size_t __len))
|
||||||
{
|
{
|
||||||
@ -196,7 +196,7 @@ extern char *__REDIRECT_NTH (__getcwd_chk_warn,
|
|||||||
__wur __warnattr ("getcwd caller with bigger length than size of "
|
__wur __warnattr ("getcwd caller with bigger length than size of "
|
||||||
"destination buffer");
|
"destination buffer");
|
||||||
|
|
||||||
__extern_always_inline __wur char *
|
__fortify_function __wur char *
|
||||||
__NTH (getcwd (char *__buf, size_t __size))
|
__NTH (getcwd (char *__buf, size_t __size))
|
||||||
{
|
{
|
||||||
if (__bos (__buf) != (size_t) -1)
|
if (__bos (__buf) != (size_t) -1)
|
||||||
@ -217,7 +217,7 @@ extern char *__REDIRECT_NTH (__getwd_warn, (char *__buf), getwd)
|
|||||||
__nonnull ((1)) __wur __warnattr ("please use getcwd instead, as getwd "
|
__nonnull ((1)) __wur __warnattr ("please use getcwd instead, as getwd "
|
||||||
"doesn't specify buffer size");
|
"doesn't specify buffer size");
|
||||||
|
|
||||||
__extern_always_inline __nonnull ((1)) __attribute_deprecated__ __wur char *
|
__fortify_function __nonnull ((1)) __attribute_deprecated__ __wur char *
|
||||||
__NTH (getwd (char *__buf))
|
__NTH (getwd (char *__buf))
|
||||||
{
|
{
|
||||||
if (__bos (__buf) != (size_t) -1)
|
if (__bos (__buf) != (size_t) -1)
|
||||||
@ -236,7 +236,7 @@ extern size_t __REDIRECT_NTH (__confstr_chk_warn,
|
|||||||
__warnattr ("confstr called with bigger length than size of destination "
|
__warnattr ("confstr called with bigger length than size of destination "
|
||||||
"buffer");
|
"buffer");
|
||||||
|
|
||||||
__extern_always_inline size_t
|
__fortify_function size_t
|
||||||
__NTH (confstr (int __name, char *__buf, size_t __len))
|
__NTH (confstr (int __name, char *__buf, size_t __len))
|
||||||
{
|
{
|
||||||
if (__bos (__buf) != (size_t) -1)
|
if (__bos (__buf) != (size_t) -1)
|
||||||
@ -261,7 +261,7 @@ extern int __REDIRECT_NTH (__getgroups_chk_warn,
|
|||||||
__wur __warnattr ("getgroups called with bigger group count than what "
|
__wur __warnattr ("getgroups called with bigger group count than what "
|
||||||
"can fit into destination buffer");
|
"can fit into destination buffer");
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
__NTH (getgroups (int __size, __gid_t __list[]))
|
__NTH (getgroups (int __size, __gid_t __list[]))
|
||||||
{
|
{
|
||||||
if (__bos (__list) != (size_t) -1)
|
if (__bos (__list) != (size_t) -1)
|
||||||
@ -287,7 +287,7 @@ extern int __REDIRECT_NTH (__ttyname_r_chk_warn,
|
|||||||
__nonnull ((2)) __warnattr ("ttyname_r called with bigger buflen than "
|
__nonnull ((2)) __warnattr ("ttyname_r called with bigger buflen than "
|
||||||
"size of destination buffer");
|
"size of destination buffer");
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
__NTH (ttyname_r (int __fd, char *__buf, size_t __buflen))
|
__NTH (ttyname_r (int __fd, char *__buf, size_t __buflen))
|
||||||
{
|
{
|
||||||
if (__bos (__buf) != (size_t) -1)
|
if (__bos (__buf) != (size_t) -1)
|
||||||
@ -313,7 +313,7 @@ extern int __REDIRECT (__getlogin_r_chk_warn,
|
|||||||
__nonnull ((1)) __warnattr ("getlogin_r called with bigger buflen than "
|
__nonnull ((1)) __warnattr ("getlogin_r called with bigger buflen than "
|
||||||
"size of destination buffer");
|
"size of destination buffer");
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
getlogin_r (char *__buf, size_t __buflen)
|
getlogin_r (char *__buf, size_t __buflen)
|
||||||
{
|
{
|
||||||
if (__bos (__buf) != (size_t) -1)
|
if (__bos (__buf) != (size_t) -1)
|
||||||
@ -340,7 +340,7 @@ extern int __REDIRECT_NTH (__gethostname_chk_warn,
|
|||||||
__nonnull ((1)) __warnattr ("gethostname called with bigger buflen than "
|
__nonnull ((1)) __warnattr ("gethostname called with bigger buflen than "
|
||||||
"size of destination buffer");
|
"size of destination buffer");
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
__NTH (gethostname (char *__buf, size_t __buflen))
|
__NTH (gethostname (char *__buf, size_t __buflen))
|
||||||
{
|
{
|
||||||
if (__bos (__buf) != (size_t) -1)
|
if (__bos (__buf) != (size_t) -1)
|
||||||
@ -369,7 +369,7 @@ extern int __REDIRECT_NTH (__getdomainname_chk_warn,
|
|||||||
"buflen than size of destination "
|
"buflen than size of destination "
|
||||||
"buffer");
|
"buffer");
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
__NTH (getdomainname (char *__buf, size_t __buflen))
|
__NTH (getdomainname (char *__buf, size_t __buflen))
|
||||||
{
|
{
|
||||||
if (__bos (__buf) != (size_t) -1)
|
if (__bos (__buf) != (size_t) -1)
|
||||||
|
@ -1165,7 +1165,7 @@ extern char *ctermid (char *__s) __THROW;
|
|||||||
|
|
||||||
|
|
||||||
/* Define some macros helping to catch buffer overflows. */
|
/* Define some macros helping to catch buffer overflows. */
|
||||||
#if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline
|
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
|
||||||
# include <bits/unistd.h>
|
# include <bits/unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ __errordecl (__mq_open_wrong_number_of_args,
|
|||||||
__errordecl (__mq_open_missing_mode_and_attr,
|
__errordecl (__mq_open_missing_mode_and_attr,
|
||||||
"mq_open with O_CREAT in second argument needs 4 arguments");
|
"mq_open with O_CREAT in second argument needs 4 arguments");
|
||||||
|
|
||||||
__extern_always_inline mqd_t
|
__fortify_function mqd_t
|
||||||
__NTH (mq_open (const char *__name, int __oflag, ...))
|
__NTH (mq_open (const char *__name, int __oflag, ...))
|
||||||
{
|
{
|
||||||
if (__va_arg_pack_len () != 0 && __va_arg_pack_len () != 2)
|
if (__va_arg_pack_len () != 0 && __va_arg_pack_len () != 2)
|
||||||
|
@ -90,7 +90,7 @@ extern int mq_timedsend (mqd_t __mqdes, const char *__msg_ptr,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define some inlines helping to catch common problems. */
|
/* Define some inlines helping to catch common problems. */
|
||||||
#if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline \
|
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function \
|
||||||
&& defined __va_arg_pack_len
|
&& defined __va_arg_pack_len
|
||||||
# include <bits/mqueue2.h>
|
# include <bits/mqueue2.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Checking macros for socket functions.
|
/* Checking macros for socket functions.
|
||||||
Copyright (C) 2005, 2007 Free Software Foundation, Inc.
|
Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -30,7 +30,7 @@ extern ssize_t __REDIRECT (__recv_chk_warn,
|
|||||||
__warnattr ("recv called with bigger length than size of destination "
|
__warnattr ("recv called with bigger length than size of destination "
|
||||||
"buffer");
|
"buffer");
|
||||||
|
|
||||||
__extern_always_inline ssize_t
|
__fortify_function ssize_t
|
||||||
recv (int __fd, void *__buf, size_t __n, int __flags)
|
recv (int __fd, void *__buf, size_t __n, int __flags)
|
||||||
{
|
{
|
||||||
if (__bos0 (__buf) != (size_t) -1)
|
if (__bos0 (__buf) != (size_t) -1)
|
||||||
@ -60,7 +60,7 @@ extern ssize_t __REDIRECT (__recvfrom_chk_warn,
|
|||||||
__warnattr ("recvfrom called with bigger length than size of "
|
__warnattr ("recvfrom called with bigger length than size of "
|
||||||
"destination buffer");
|
"destination buffer");
|
||||||
|
|
||||||
__extern_always_inline ssize_t
|
__fortify_function ssize_t
|
||||||
recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags,
|
recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags,
|
||||||
__SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len)
|
__SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len)
|
||||||
{
|
{
|
||||||
|
@ -246,7 +246,7 @@ extern int isfdtype (int __fd, int __fdtype) __THROW;
|
|||||||
|
|
||||||
|
|
||||||
/* Define some macros helping to catch buffer overflows. */
|
/* Define some macros helping to catch buffer overflows. */
|
||||||
#if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline
|
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
|
||||||
# include <bits/socket2.h>
|
# include <bits/socket2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ extern char *__REDIRECT_NTH (__realpath_chk_warn,
|
|||||||
__warnattr ("second argument of realpath must be either NULL or at "
|
__warnattr ("second argument of realpath must be either NULL or at "
|
||||||
"least PATH_MAX bytes long buffer");
|
"least PATH_MAX bytes long buffer");
|
||||||
|
|
||||||
__extern_always_inline __wur char *
|
__fortify_function __wur char *
|
||||||
__NTH (realpath (const char *__restrict __name, char *__restrict __resolved))
|
__NTH (realpath (const char *__restrict __name, char *__restrict __resolved))
|
||||||
{
|
{
|
||||||
if (__bos (__resolved) != (size_t) -1)
|
if (__bos (__resolved) != (size_t) -1)
|
||||||
@ -60,7 +60,7 @@ extern int __REDIRECT_NTH (__ptsname_r_chk_warn,
|
|||||||
__nonnull ((2)) __warnattr ("ptsname_r called with buflen bigger than "
|
__nonnull ((2)) __warnattr ("ptsname_r called with buflen bigger than "
|
||||||
"size of buf");
|
"size of buf");
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
__NTH (ptsname_r (int __fd, char *__buf, size_t __buflen))
|
__NTH (ptsname_r (int __fd, char *__buf, size_t __buflen))
|
||||||
{
|
{
|
||||||
if (__bos (__buf) != (size_t) -1)
|
if (__bos (__buf) != (size_t) -1)
|
||||||
@ -79,7 +79,7 @@ extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen)
|
|||||||
extern int __REDIRECT_NTH (__wctomb_alias, (char *__s, wchar_t __wchar),
|
extern int __REDIRECT_NTH (__wctomb_alias, (char *__s, wchar_t __wchar),
|
||||||
wctomb) __wur;
|
wctomb) __wur;
|
||||||
|
|
||||||
__extern_always_inline __wur int
|
__fortify_function __wur int
|
||||||
__NTH (wctomb (char *__s, wchar_t __wchar))
|
__NTH (wctomb (char *__s, wchar_t __wchar))
|
||||||
{
|
{
|
||||||
/* We would have to include <limits.h> to get a definition of MB_LEN_MAX.
|
/* We would have to include <limits.h> to get a definition of MB_LEN_MAX.
|
||||||
@ -109,7 +109,7 @@ extern size_t __REDIRECT_NTH (__mbstowcs_chk_warn,
|
|||||||
__warnattr ("mbstowcs called with dst buffer smaller than len "
|
__warnattr ("mbstowcs called with dst buffer smaller than len "
|
||||||
"* sizeof (wchar_t)");
|
"* sizeof (wchar_t)");
|
||||||
|
|
||||||
__extern_always_inline size_t
|
__fortify_function size_t
|
||||||
__NTH (mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src,
|
__NTH (mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src,
|
||||||
size_t __len))
|
size_t __len))
|
||||||
{
|
{
|
||||||
@ -140,7 +140,7 @@ extern size_t __REDIRECT_NTH (__wcstombs_chk_warn,
|
|||||||
size_t __len, size_t __dstlen), __wcstombs_chk)
|
size_t __len, size_t __dstlen), __wcstombs_chk)
|
||||||
__warnattr ("wcstombs called with dst buffer smaller than len");
|
__warnattr ("wcstombs called with dst buffer smaller than len");
|
||||||
|
|
||||||
__extern_always_inline size_t
|
__fortify_function size_t
|
||||||
__NTH (wcstombs (char *__restrict __dst, const wchar_t *__restrict __src,
|
__NTH (wcstombs (char *__restrict __dst, const wchar_t *__restrict __src,
|
||||||
size_t __len))
|
size_t __len))
|
||||||
{
|
{
|
||||||
|
@ -953,7 +953,7 @@ extern int getloadavg (double __loadavg[], int __nelem)
|
|||||||
|
|
||||||
|
|
||||||
/* Define some macros helping to catch buffer overflows. */
|
/* Define some macros helping to catch buffer overflows. */
|
||||||
#if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline
|
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
|
||||||
# include <bits/stdlib.h>
|
# include <bits/stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef __LDBL_COMPAT
|
#ifdef __LDBL_COMPAT
|
||||||
|
@ -44,21 +44,21 @@ __warndecl (__warn_memset_zero_len,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
__extern_always_inline void *
|
__fortify_function void *
|
||||||
__NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
|
__NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
|
||||||
size_t __len))
|
size_t __len))
|
||||||
{
|
{
|
||||||
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
|
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
|
||||||
}
|
}
|
||||||
|
|
||||||
__extern_always_inline void *
|
__fortify_function void *
|
||||||
__NTH (memmove (void *__dest, const void *__src, size_t __len))
|
__NTH (memmove (void *__dest, const void *__src, size_t __len))
|
||||||
{
|
{
|
||||||
return __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
|
return __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __USE_GNU
|
#ifdef __USE_GNU
|
||||||
__extern_always_inline void *
|
__fortify_function void *
|
||||||
__NTH (mempcpy (void *__restrict __dest, const void *__restrict __src,
|
__NTH (mempcpy (void *__restrict __dest, const void *__restrict __src,
|
||||||
size_t __len))
|
size_t __len))
|
||||||
{
|
{
|
||||||
@ -72,7 +72,7 @@ __NTH (mempcpy (void *__restrict __dest, const void *__restrict __src,
|
|||||||
especially problematic if the intended fill value is zero. In this
|
especially problematic if the intended fill value is zero. In this
|
||||||
case no work is done at all. We detect these problems by referring
|
case no work is done at all. We detect these problems by referring
|
||||||
non-existing functions. */
|
non-existing functions. */
|
||||||
__extern_always_inline void *
|
__fortify_function void *
|
||||||
__NTH (memset (void *__dest, int __ch, size_t __len))
|
__NTH (memset (void *__dest, int __ch, size_t __len))
|
||||||
{
|
{
|
||||||
if (__builtin_constant_p (__len) && __len == 0
|
if (__builtin_constant_p (__len) && __len == 0
|
||||||
@ -85,27 +85,27 @@ __NTH (memset (void *__dest, int __ch, size_t __len))
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __USE_BSD
|
#ifdef __USE_BSD
|
||||||
__extern_always_inline void
|
__fortify_function void
|
||||||
__NTH (bcopy (const void *__src, void *__dest, size_t __len))
|
__NTH (bcopy (const void *__src, void *__dest, size_t __len))
|
||||||
{
|
{
|
||||||
(void) __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
|
(void) __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
|
||||||
}
|
}
|
||||||
|
|
||||||
__extern_always_inline void
|
__fortify_function void
|
||||||
__NTH (bzero (void *__dest, size_t __len))
|
__NTH (bzero (void *__dest, size_t __len))
|
||||||
{
|
{
|
||||||
(void) __builtin___memset_chk (__dest, '\0', __len, __bos0 (__dest));
|
(void) __builtin___memset_chk (__dest, '\0', __len, __bos0 (__dest));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__extern_always_inline char *
|
__fortify_function char *
|
||||||
__NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
|
__NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
|
||||||
{
|
{
|
||||||
return __builtin___strcpy_chk (__dest, __src, __bos (__dest));
|
return __builtin___strcpy_chk (__dest, __src, __bos (__dest));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __USE_GNU
|
#ifdef __USE_GNU
|
||||||
__extern_always_inline char *
|
__fortify_function char *
|
||||||
__NTH (stpcpy (char *__restrict __dest, const char *__restrict __src))
|
__NTH (stpcpy (char *__restrict __dest, const char *__restrict __src))
|
||||||
{
|
{
|
||||||
return __builtin___stpcpy_chk (__dest, __src, __bos (__dest));
|
return __builtin___stpcpy_chk (__dest, __src, __bos (__dest));
|
||||||
@ -113,7 +113,7 @@ __NTH (stpcpy (char *__restrict __dest, const char *__restrict __src))
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
__extern_always_inline char *
|
__fortify_function char *
|
||||||
__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
|
__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
|
||||||
size_t __len))
|
size_t __len))
|
||||||
{
|
{
|
||||||
@ -126,7 +126,7 @@ extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n,
|
|||||||
extern char *__REDIRECT_NTH (__stpncpy_alias, (char *__dest, const char *__src,
|
extern char *__REDIRECT_NTH (__stpncpy_alias, (char *__dest, const char *__src,
|
||||||
size_t __n), stpncpy);
|
size_t __n), stpncpy);
|
||||||
|
|
||||||
__extern_always_inline char *
|
__fortify_function char *
|
||||||
__NTH (stpncpy (char *__dest, const char *__src, size_t __n))
|
__NTH (stpncpy (char *__dest, const char *__src, size_t __n))
|
||||||
{
|
{
|
||||||
if (__bos (__dest) != (size_t) -1
|
if (__bos (__dest) != (size_t) -1
|
||||||
@ -136,14 +136,14 @@ __NTH (stpncpy (char *__dest, const char *__src, size_t __n))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
__extern_always_inline char *
|
__fortify_function char *
|
||||||
__NTH (strcat (char *__restrict __dest, const char *__restrict __src))
|
__NTH (strcat (char *__restrict __dest, const char *__restrict __src))
|
||||||
{
|
{
|
||||||
return __builtin___strcat_chk (__dest, __src, __bos (__dest));
|
return __builtin___strcat_chk (__dest, __src, __bos (__dest));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
__extern_always_inline char *
|
__fortify_function char *
|
||||||
__NTH (strncat (char *__restrict __dest, const char *__restrict __src,
|
__NTH (strncat (char *__restrict __dest, const char *__restrict __src,
|
||||||
size_t __len))
|
size_t __len))
|
||||||
{
|
{
|
||||||
|
@ -634,7 +634,7 @@ extern char *basename (const char *__filename) __THROW __nonnull ((1));
|
|||||||
# include <bits/string2.h>
|
# include <bits/string2.h>
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline
|
# if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
|
||||||
/* Functions with security checks. */
|
/* Functions with security checks. */
|
||||||
# include <bits/string3.h>
|
# include <bits/string3.h>
|
||||||
# endif
|
# endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* -mlong-double-64 compatibility mode for <wchar.h> functions.
|
/* -mlong-double-64 compatibility mode for <wchar.h> functions.
|
||||||
Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
Copyright (C) 2006-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -62,7 +62,7 @@ __END_NAMESPACE_C99
|
|||||||
__LDBL_REDIR1_DECL (wcstold_l, wcstod_l);
|
__LDBL_REDIR1_DECL (wcstold_l, wcstod_l);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline
|
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
|
||||||
__LDBL_REDIR_DECL (__swprintf_chk)
|
__LDBL_REDIR_DECL (__swprintf_chk)
|
||||||
__LDBL_REDIR_DECL (__vswprintf_chk)
|
__LDBL_REDIR_DECL (__vswprintf_chk)
|
||||||
# if __USE_FORTIFY_LEVEL > 1
|
# if __USE_FORTIFY_LEVEL > 1
|
||||||
|
@ -35,7 +35,7 @@ extern wchar_t *__REDIRECT_NTH (__wmemcpy_chk_warn,
|
|||||||
__warnattr ("wmemcpy called with length bigger than size of destination "
|
__warnattr ("wmemcpy called with length bigger than size of destination "
|
||||||
"buffer");
|
"buffer");
|
||||||
|
|
||||||
__extern_always_inline wchar_t *
|
__fortify_function wchar_t *
|
||||||
__NTH (wmemcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2,
|
__NTH (wmemcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2,
|
||||||
size_t __n))
|
size_t __n))
|
||||||
{
|
{
|
||||||
@ -64,7 +64,7 @@ extern wchar_t *__REDIRECT_NTH (__wmemmove_chk_warn,
|
|||||||
__warnattr ("wmemmove called with length bigger than size of destination "
|
__warnattr ("wmemmove called with length bigger than size of destination "
|
||||||
"buffer");
|
"buffer");
|
||||||
|
|
||||||
__extern_always_inline wchar_t *
|
__fortify_function wchar_t *
|
||||||
__NTH (wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n))
|
__NTH (wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n))
|
||||||
{
|
{
|
||||||
if (__bos0 (__s1) != (size_t) -1)
|
if (__bos0 (__s1) != (size_t) -1)
|
||||||
@ -96,7 +96,7 @@ extern wchar_t *__REDIRECT_NTH (__wmempcpy_chk_warn,
|
|||||||
__warnattr ("wmempcpy called with length bigger than size of destination "
|
__warnattr ("wmempcpy called with length bigger than size of destination "
|
||||||
"buffer");
|
"buffer");
|
||||||
|
|
||||||
__extern_always_inline wchar_t *
|
__fortify_function wchar_t *
|
||||||
__NTH (wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2,
|
__NTH (wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2,
|
||||||
size_t __n))
|
size_t __n))
|
||||||
{
|
{
|
||||||
@ -125,7 +125,7 @@ extern wchar_t *__REDIRECT_NTH (__wmemset_chk_warn,
|
|||||||
__warnattr ("wmemset called with length bigger than size of destination "
|
__warnattr ("wmemset called with length bigger than size of destination "
|
||||||
"buffer");
|
"buffer");
|
||||||
|
|
||||||
__extern_always_inline wchar_t *
|
__fortify_function wchar_t *
|
||||||
__NTH (wmemset (wchar_t *__s, wchar_t __c, size_t __n))
|
__NTH (wmemset (wchar_t *__s, wchar_t __c, size_t __n))
|
||||||
{
|
{
|
||||||
if (__bos0 (__s) != (size_t) -1)
|
if (__bos0 (__s) != (size_t) -1)
|
||||||
@ -148,7 +148,7 @@ extern wchar_t *__REDIRECT_NTH (__wcscpy_alias,
|
|||||||
(wchar_t *__restrict __dest,
|
(wchar_t *__restrict __dest,
|
||||||
const wchar_t *__restrict __src), wcscpy);
|
const wchar_t *__restrict __src), wcscpy);
|
||||||
|
|
||||||
__extern_always_inline wchar_t *
|
__fortify_function wchar_t *
|
||||||
__NTH (wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
|
__NTH (wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
|
||||||
{
|
{
|
||||||
if (__bos (__dest) != (size_t) -1)
|
if (__bos (__dest) != (size_t) -1)
|
||||||
@ -164,7 +164,7 @@ extern wchar_t *__REDIRECT_NTH (__wcpcpy_alias,
|
|||||||
(wchar_t *__restrict __dest,
|
(wchar_t *__restrict __dest,
|
||||||
const wchar_t *__restrict __src), wcpcpy);
|
const wchar_t *__restrict __src), wcpcpy);
|
||||||
|
|
||||||
__extern_always_inline wchar_t *
|
__fortify_function wchar_t *
|
||||||
__NTH (wcpcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
|
__NTH (wcpcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
|
||||||
{
|
{
|
||||||
if (__bos (__dest) != (size_t) -1)
|
if (__bos (__dest) != (size_t) -1)
|
||||||
@ -187,7 +187,7 @@ extern wchar_t *__REDIRECT_NTH (__wcsncpy_chk_warn,
|
|||||||
__warnattr ("wcsncpy called with length bigger than size of destination "
|
__warnattr ("wcsncpy called with length bigger than size of destination "
|
||||||
"buffer");
|
"buffer");
|
||||||
|
|
||||||
__extern_always_inline wchar_t *
|
__fortify_function wchar_t *
|
||||||
__NTH (wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
|
__NTH (wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
|
||||||
size_t __n))
|
size_t __n))
|
||||||
{
|
{
|
||||||
@ -218,7 +218,7 @@ extern wchar_t *__REDIRECT_NTH (__wcpncpy_chk_warn,
|
|||||||
__warnattr ("wcpncpy called with length bigger than size of destination "
|
__warnattr ("wcpncpy called with length bigger than size of destination "
|
||||||
"buffer");
|
"buffer");
|
||||||
|
|
||||||
__extern_always_inline wchar_t *
|
__fortify_function wchar_t *
|
||||||
__NTH (wcpncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
|
__NTH (wcpncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
|
||||||
size_t __n))
|
size_t __n))
|
||||||
{
|
{
|
||||||
@ -242,7 +242,7 @@ extern wchar_t *__REDIRECT_NTH (__wcscat_alias,
|
|||||||
(wchar_t *__restrict __dest,
|
(wchar_t *__restrict __dest,
|
||||||
const wchar_t *__restrict __src), wcscat);
|
const wchar_t *__restrict __src), wcscat);
|
||||||
|
|
||||||
__extern_always_inline wchar_t *
|
__fortify_function wchar_t *
|
||||||
__NTH (wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
|
__NTH (wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
|
||||||
{
|
{
|
||||||
if (__bos (__dest) != (size_t) -1)
|
if (__bos (__dest) != (size_t) -1)
|
||||||
@ -259,7 +259,7 @@ extern wchar_t *__REDIRECT_NTH (__wcsncat_alias,
|
|||||||
const wchar_t *__restrict __src,
|
const wchar_t *__restrict __src,
|
||||||
size_t __n), wcsncat);
|
size_t __n), wcsncat);
|
||||||
|
|
||||||
__extern_always_inline wchar_t *
|
__fortify_function wchar_t *
|
||||||
__NTH (wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
|
__NTH (wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
|
||||||
size_t __n))
|
size_t __n))
|
||||||
{
|
{
|
||||||
@ -281,7 +281,7 @@ extern int __REDIRECT_NTH_LDBL (__swprintf_alias,
|
|||||||
swprintf);
|
swprintf);
|
||||||
|
|
||||||
#ifdef __va_arg_pack
|
#ifdef __va_arg_pack
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
__NTH (swprintf (wchar_t *__restrict __s, size_t __n,
|
__NTH (swprintf (wchar_t *__restrict __s, size_t __n,
|
||||||
const wchar_t *__restrict __fmt, ...))
|
const wchar_t *__restrict __fmt, ...))
|
||||||
{
|
{
|
||||||
@ -311,7 +311,7 @@ extern int __REDIRECT_NTH_LDBL (__vswprintf_alias,
|
|||||||
const wchar_t *__restrict __fmt,
|
const wchar_t *__restrict __fmt,
|
||||||
__gnuc_va_list __ap), vswprintf);
|
__gnuc_va_list __ap), vswprintf);
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
__NTH (vswprintf (wchar_t *__restrict __s, size_t __n,
|
__NTH (vswprintf (wchar_t *__restrict __s, size_t __n,
|
||||||
const wchar_t *__restrict __fmt, __gnuc_va_list __ap))
|
const wchar_t *__restrict __fmt, __gnuc_va_list __ap))
|
||||||
{
|
{
|
||||||
@ -335,13 +335,13 @@ extern int __vwprintf_chk (int __flag, const wchar_t *__restrict __format,
|
|||||||
__gnuc_va_list __ap);
|
__gnuc_va_list __ap);
|
||||||
|
|
||||||
# ifdef __va_arg_pack
|
# ifdef __va_arg_pack
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
wprintf (const wchar_t *__restrict __fmt, ...)
|
wprintf (const wchar_t *__restrict __fmt, ...)
|
||||||
{
|
{
|
||||||
return __wprintf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
|
return __wprintf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
|
||||||
}
|
}
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
fwprintf (__FILE *__restrict __stream, const wchar_t *__restrict __fmt, ...)
|
fwprintf (__FILE *__restrict __stream, const wchar_t *__restrict __fmt, ...)
|
||||||
{
|
{
|
||||||
return __fwprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt,
|
return __fwprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt,
|
||||||
@ -354,13 +354,13 @@ fwprintf (__FILE *__restrict __stream, const wchar_t *__restrict __fmt, ...)
|
|||||||
__fwprintf_chk (stream, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
|
__fwprintf_chk (stream, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
vwprintf (const wchar_t *__restrict __fmt, __gnuc_va_list __ap)
|
vwprintf (const wchar_t *__restrict __fmt, __gnuc_va_list __ap)
|
||||||
{
|
{
|
||||||
return __vwprintf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __ap);
|
return __vwprintf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
__extern_always_inline int
|
__fortify_function int
|
||||||
vfwprintf (__FILE *__restrict __stream,
|
vfwprintf (__FILE *__restrict __stream,
|
||||||
const wchar_t *__restrict __fmt, __gnuc_va_list __ap)
|
const wchar_t *__restrict __fmt, __gnuc_va_list __ap)
|
||||||
{
|
{
|
||||||
@ -380,7 +380,7 @@ extern wchar_t *__REDIRECT (__fgetws_chk_warn,
|
|||||||
__wur __warnattr ("fgetws called with bigger size than length "
|
__wur __warnattr ("fgetws called with bigger size than length "
|
||||||
"of destination buffer");
|
"of destination buffer");
|
||||||
|
|
||||||
__extern_always_inline __wur wchar_t *
|
__fortify_function __wur wchar_t *
|
||||||
fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream)
|
fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream)
|
||||||
{
|
{
|
||||||
if (__bos (__s) != (size_t) -1)
|
if (__bos (__s) != (size_t) -1)
|
||||||
@ -411,7 +411,7 @@ extern wchar_t *__REDIRECT (__fgetws_unlocked_chk_warn,
|
|||||||
__wur __warnattr ("fgetws_unlocked called with bigger size than length "
|
__wur __warnattr ("fgetws_unlocked called with bigger size than length "
|
||||||
"of destination buffer");
|
"of destination buffer");
|
||||||
|
|
||||||
__extern_always_inline __wur wchar_t *
|
__fortify_function __wur wchar_t *
|
||||||
fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream)
|
fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream)
|
||||||
{
|
{
|
||||||
if (__bos (__s) != (size_t) -1)
|
if (__bos (__s) != (size_t) -1)
|
||||||
@ -436,7 +436,7 @@ extern size_t __REDIRECT_NTH (__wcrtomb_alias,
|
|||||||
(char *__restrict __s, wchar_t __wchar,
|
(char *__restrict __s, wchar_t __wchar,
|
||||||
mbstate_t *__restrict __ps), wcrtomb) __wur;
|
mbstate_t *__restrict __ps), wcrtomb) __wur;
|
||||||
|
|
||||||
__extern_always_inline __wur size_t
|
__fortify_function __wur size_t
|
||||||
__NTH (wcrtomb (char *__restrict __s, wchar_t __wchar,
|
__NTH (wcrtomb (char *__restrict __s, wchar_t __wchar,
|
||||||
mbstate_t *__restrict __ps))
|
mbstate_t *__restrict __ps))
|
||||||
{
|
{
|
||||||
@ -470,7 +470,7 @@ extern size_t __REDIRECT_NTH (__mbsrtowcs_chk_warn,
|
|||||||
__warnattr ("mbsrtowcs called with dst buffer smaller than len "
|
__warnattr ("mbsrtowcs called with dst buffer smaller than len "
|
||||||
"* sizeof (wchar_t)");
|
"* sizeof (wchar_t)");
|
||||||
|
|
||||||
__extern_always_inline size_t
|
__fortify_function size_t
|
||||||
__NTH (mbsrtowcs (wchar_t *__restrict __dst, const char **__restrict __src,
|
__NTH (mbsrtowcs (wchar_t *__restrict __dst, const char **__restrict __src,
|
||||||
size_t __len, mbstate_t *__restrict __ps))
|
size_t __len, mbstate_t *__restrict __ps))
|
||||||
{
|
{
|
||||||
@ -504,7 +504,7 @@ extern size_t __REDIRECT_NTH (__wcsrtombs_chk_warn,
|
|||||||
size_t __dstlen), __wcsrtombs_chk)
|
size_t __dstlen), __wcsrtombs_chk)
|
||||||
__warnattr ("wcsrtombs called with dst buffer smaller than len");
|
__warnattr ("wcsrtombs called with dst buffer smaller than len");
|
||||||
|
|
||||||
__extern_always_inline size_t
|
__fortify_function size_t
|
||||||
__NTH (wcsrtombs (char *__restrict __dst, const wchar_t **__restrict __src,
|
__NTH (wcsrtombs (char *__restrict __dst, const wchar_t **__restrict __src,
|
||||||
size_t __len, mbstate_t *__restrict __ps))
|
size_t __len, mbstate_t *__restrict __ps))
|
||||||
{
|
{
|
||||||
@ -538,7 +538,7 @@ extern size_t __REDIRECT_NTH (__mbsnrtowcs_chk_warn,
|
|||||||
__warnattr ("mbsnrtowcs called with dst buffer smaller than len "
|
__warnattr ("mbsnrtowcs called with dst buffer smaller than len "
|
||||||
"* sizeof (wchar_t)");
|
"* sizeof (wchar_t)");
|
||||||
|
|
||||||
__extern_always_inline size_t
|
__fortify_function size_t
|
||||||
__NTH (mbsnrtowcs (wchar_t *__restrict __dst, const char **__restrict __src,
|
__NTH (mbsnrtowcs (wchar_t *__restrict __dst, const char **__restrict __src,
|
||||||
size_t __nmc, size_t __len, mbstate_t *__restrict __ps))
|
size_t __nmc, size_t __len, mbstate_t *__restrict __ps))
|
||||||
{
|
{
|
||||||
@ -574,7 +574,7 @@ extern size_t __REDIRECT_NTH (__wcsnrtombs_chk_warn,
|
|||||||
size_t __dstlen), __wcsnrtombs_chk)
|
size_t __dstlen), __wcsnrtombs_chk)
|
||||||
__warnattr ("wcsnrtombs called with dst buffer smaller than len");
|
__warnattr ("wcsnrtombs called with dst buffer smaller than len");
|
||||||
|
|
||||||
__extern_always_inline size_t
|
__fortify_function size_t
|
||||||
__NTH (wcsnrtombs (char *__restrict __dst, const wchar_t **__restrict __src,
|
__NTH (wcsnrtombs (char *__restrict __dst, const wchar_t **__restrict __src,
|
||||||
size_t __nwc, size_t __len, mbstate_t *__restrict __ps))
|
size_t __nwc, size_t __len, mbstate_t *__restrict __ps))
|
||||||
{
|
{
|
||||||
|
@ -880,7 +880,7 @@ extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define some macros helping to catch buffer overflows. */
|
/* Define some macros helping to catch buffer overflows. */
|
||||||
#if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline
|
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
|
||||||
# include <bits/wchar2.h>
|
# include <bits/wchar2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user