| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For UNIX98 and older standards, sys/time.h should not define struct
timespec, but does so via the inclusion of sys/select.h (which is a
new header in the 2001 edition of POSIX, and defines struct timespec
because of the declaration of pselect, a new function in the 2001
edition of POSIX). In turn, this affects some other headers that
themselves include sys/time.h.
This patch fixes this by conditioning the __need_timespec definition
in sys/select.h on __USE_XOPEN2K, the same condition used there for
the declaration of pselect (this has no effect on direct uses of
sys/select.h with feature test macros for any standard that includes
that header, since such standards result in __USE_XOPEN2K being
defined).
Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).
[BZ #20041]
* misc/sys/select.h (__need_timespec): Only define if
[__USE_XOPEN2K].
* conform/Makefile (test-xfail-XPG4/sys/time.h/conform): Remove
variable.
(test-xfail-XPG4/utmpx.h/conform): Likewise.
(test-xfail-UNIX98/sys/time.h/conform): Likewise.
(test-xfail-UNIX98/utmpx.h/conform): Likewise.
|
| |
|
| |
|
|
|
|
|
| |
* misc/sys/cdefs.h (_Static_assert): Define a substitute, if on a
pre-C11 C platform that is not known to support _Static_assert.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fix for BZ #17266 (884ddc5081278f488ef8cd49951f41cfdbb480ce)
removed changes that had gone into cdefs.h to make
__extern_always_inline usable with clang++. This patch adds back
support for clang to detect if GNU inlining semantics are available,
this time without breaking the gcc use case. The check put here is
based on the earlier patch and assertion[1] that checking if
__GNUC_STDC_INLINE__ or __GNUC_GNU_INLINE__ is defined is sufficient
to determine that clang++ suports GNU inlining semantics.
Tested with a simple program that builds with __extern_always_inline
with the patch and fails compilation without it.
#include <stdio.h>
#include <sys/cdefs.h>
extern void foo_alias (void) __asm ("foo");
__extern_always_inline void
foo (void)
{
puts ("hi oh world!");
return foo_alias ();
}
void
foo_alias (void)
{
puts ("hell oh world");
}
int
main ()
{
foo ();
}
[1] https://sourceware.org/ml/libc-alpha/2012-12/msg00306.html
[BZ #17266]
* misc/sys/cdefs.h: Define __extern_always_inline for clang
4.2 and newer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The check for only __GNUC_STDC_INLINE__ and __GNUC_GNU_INLINE__ may
not be sufficient since those flags were added during initial support
for C99 inlining semantics. There is also a problem with always
defining __extern_inline and __extern_always_inline, since it enables
inline wrapper functions even when GNU inlining semantics are not
guaranteed. This, along with the possibility of such wrappers using
redirection (btowc for example) could result in compiler generating an
infinitely recusrive call to the function.
In fact it was such a recursion that led to this code being written
the way it was; see:
https://bugzilla.redhat.com/show_bug.cgi?id=186410
The initial change was to fix bugs 14530 and 13741, but they can be
resolved by checking if __fortify_function and/or
__extern_always_inline are defined, as it has been done in this patch.
In addition, I have audited uses of __extern_always_inline to make
sure that none of the uses result in compilation errors.
There is however a regression in this patch for llvm, since it reverts
the llvm expectation that __GNUC_STDC_INLINE__ or __GNUC_GNU_INLINE__
definition imply proper extern inline semantics.
2014-09-16 Siddhesh Poyarekar <siddhesh@redhat.com>
Jakub Jelinek <jakub@redhat.com>
[BZ #17266]
* libio/stdio.h: Check definition of __fortify_function
instead of __extern_always_inline to include bits/stdio2.h.
* math/bits/math-finite.h [__USE_XOPEN || __USE_ISOC99]: Also
check if __extern_always_inline is defined.
[__USE_MISC || __USE_XOPEN]: Likewise.
[__USE_ISOC99] Likewise.
* misc/sys/cdefs.h (__fortify_function): Define only if
__extern_always_inline is defined.
[!__cplusplus || __GNUC_PREREQ (4,3)]: Revert to defining
__extern_always_inline and __extern_inline only for g++-4.3
and newer or a compatible gcc.
|
|
|
|
|
|
|
|
| |
c4c4124473c187b5c4642611390897666c3d3970 added the _Noreturn macro for
pre-C11 compilers, but it now throws a new Wundef warning during `make
check` for __STDC_VERSION__ which gcc does not define by default. The
following patch fixes this in line with other uses of __STDC_VERSION__
in the file.
|
|
|
|
|
|
|
| |
2014-07-02 Will Newton <will.newton@linaro.org>
Paul Eggert <eggert@cs.ucla.edu>
* misc/sys/cdefs.h (_Noreturn): New macro, for pre-C11 compilers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the glibc xattr.h header is included after the uapi header,
compilation fails due to an enum re-using a #define from the
uapi header. Protect against this by guarding the define and
enum inclusions against each other.
(A corresponding kernel patch has been sent here:
http://lkml.org/lkml/2014/3/7/331 )
(See https://lists.debian.org/debian-glibc/2014/03/msg00029.html
and https://sourceware.org/glibc/wiki/Synchronizing_Headers
for more information.)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
|
|
|
|
|
|
|
| |
Shifting into the sign position is currently supported as a GCC
extension, but explicitly subjected to future changes. Computation
in the unsigned type followed by a cast to the signed type is a GCC
extension that will be available forever.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch completes the headers cleanup consequent on removal of
_BSD_SOURCE and _SVID_SOURCE (apart from any subsequent deprecations):
* #endif conditionals that referred to BSD or SVID are updated.
* Redundant __USE_* tests in cases involving __USE_MISC are removed.
This includes cases such as __USE_MISC || __USE_ISOC99, where
__USE_MISC is redundant (because __USE_MISC is only ever defined in
the default / _DEFAULT_SOURCE / _GNU_SOURCE case, when __USE_ISOC99
is also defined; the same applies to the non-XSI-extended POSIX
versions), and cases involving __USE_GNU, where __USE_GNU is
redundant (because if __USE_GNU is defined, so are the other __USE_*
macros). There may well be other cases of __USE_FOO || __USE_BAR
tests that could be simplified because one macro implies the other;
this patch only addresses cases involving __USE_MISC.
Tested x86_64.
* bits/fcntl.h [__USE_MISC]: Remove redundant conditionals.
* bits/sigaction.h [__USE_MISC]: Likewise.
* bits/waitstatus.h: Update #endif comments.
* ctype/ctype.h: Likewise.
* dirent/dirent.h: Likewise.
[__USE_MISC]: Remove redundant conditionals.
* grp/grp.h: Update #endif comments.
[__USE_GNU]: Remove redundant conditionals.
[__USE_MISC]: Likewise.
* inet/netinet/in.h [__USE_GNU]: Likewise.
* io/sys/stat.h [__USE_MISC]: Likewise.
* libio/bits/stdio-ldbl.h [__USE_MISC]: Likewise.
* libio/bits/stdio.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* libio/bits/stdio2.h [__USE_MISC]: Likewise.
* libio/stdio.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* math/bits/math-finite.h [__USE_MISC]: Likewise.
* math/bits/mathcalls.h [__USE_MISC]: Likewise.
* math/math.h: Update #else and #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* misc/sys/uio.h: Update #endif comments.
* posix/bits/unistd.h [__USE_MISC]: Remove redundant conditionals.
* posix/glob.h [__USE_MISC]: Likewise.
* posix/sys/types.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* posix/sys/wait.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* posix/unistd.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* pwd/pwd.h [__USE_GNU]: Likewise.
[__USE_MISC]: Likewise.
* resolv/netdb.h [__USE_GNU]: Likewise.
* signal/signal.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* stdlib/stdlib.h: Update #else and #endif comments.
[__USE_MISC]: Remove redundant conditionals.
[__USE_GNU]: Likewise.
* string/bits/string2.h [__USE_MISC]: Likewise.
* string/string.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* sysdeps/m68k/m680x0/fpu/bits/mathinline.h [__USE_MISC]:
Likewise.
* sysdeps/mach/hurd/bits/fcntl.h [__USE_MISC]: Likewise.
* sysdeps/mach/hurd/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/sigaction.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/stat.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/bits/fcntl-linux.h: Update #endif
comments.
[__USE_MISC]: Remove redundant conditionals.
* sysdeps/unix/sysv/linux/bits/in.h [__USE_GNU]: Likewise.
* sysdeps/unix/sysv/linux/bits/sigaction.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/bits/socket.h [__USE_GNU]: Likewise.
* sysdeps/unix/sysv/linux/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/sigaction.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/m68k/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/sigaction.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/mips/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/stat.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/s390/bits/sigaction.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/s390/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/sigaction.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/stat.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/x86/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/x86/bits/string.h: Update #endif comments.
* sysdeps/x86/fpu/bits/mathinline.h [__USE_MISC]: Remove redundant
conditionals.
* time/sys/time.h: Update #endif comments.
* time/time.h: Likewise.
[__USE_MISC]: Remove redundant conditionals.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch cleans up following the obsoletion of _BSD_SOURCE and
_SVID_SOURCE by combining __USE_BSD and __USE_SVID into __USE_MISC.
The only non-mechanical part of this patch is the changes to
features.h; everything else is simple substitution of __USE_MISC for
the old macros. Thus, this patch leaves obviously redundant
conditionals such as "defined __USE_MISC || defined __USE_MISC", and
does not update #endif comments where they referred to BSD or SVID in
words instead of the literal macro name. This is intended to
facilitate patch review by separating the less mechanical changes from
these purely mechanical changes into a separate patch. (I do intend
to integrate all the changes from
<https://sourceware.org/ml/libc-alpha/2013-12/msg00226.html>, which I
believe includes all the trailing comment updates, in subsequent
patches.)
Tested x86_64.
* include/features.h (__USE_BSD): Remove macro definitions.
(__USE_SVID): Likewise.
(_BSD_SOURCE): Likewise.
(_SVID_SOURCE): Likewise.
[!defined _BSD_SOURCE && !defined _SVID_SOURCE]: Remove condition
from definition of _DEFAULT_SOURCE.
[_BSD_SOURCE || _SVID_SOURCE]: Change condition to
[_DEFAULT_SOURCE].
* bits/fcntl.h [__USE_BSD]: Change condition to [__USE_MISC].
* bits/mman.h [__USE_BSD]: Likewise.
* bits/termios.h [__USE_BSD]: Likewise.
* bits/waitstatus.h [__USE_BSD]: Likewise.
* ctype/ctype.h [__USE_SVID]: Likewise.
* dirent/dirent.h [__USE_BSD]: Likewise.
* grp/grp.h [__USE_SVID]: Likewise.
[__USE_BSD]: Likewise.
* inet/netinet/igmp.h [__USE_BSD]: Likewise.
* io/fcntl.h [__USE_BSD]: Likewise.
* io/ftw.h [__USE_BSD]: Likewise.
* io/sys/stat.h [__USE_BSD]: Likewise.
* libio/bits/stdio-ldbl.h [__USE_BSD]: Likewise.
* libio/bits/stdio2.h [__USE_BSD]: Likewise.
* libio/stdio.h [__USE_SVID]: Likewise.
[__USE_BSD]: Likewise.
* math/math.h [__USE_SVID]: Likewise.
[__USE_BSD]: Likewise.
* misc/bits/syslog-ldbl.h [__USE_BSD]: Likewise.
* misc/bits/syslog.h [__USE_BSD]: Likewise.
* misc/search.h [__USE_SVID]: Likewise.
* misc/sys/mman.h [__USE_BSD]: Likewise.
* misc/sys/syslog.h [__USE_BSD]: Likewise.
* misc/sys/uio.h [__USE_BSD]: Likewise.
* posix/bits/unistd.h [__USE_BSD]: Likewise.
* posix/glob.h [__USE_BSD]: Likewise.
* posix/regex.h [__USE_BSD]: Likewise.
* posix/sys/types.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* posix/sys/utsname.h [__USE_SVID]: Likewise.
* posix/sys/wait.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* posix/unistd.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* pwd/pwd.h [__USE_SVID]: Likewise.
* resolv/netdb.h [__USE_BSD]: Likewise.
* setjmp/setjmp.h [__USE_BSD]: Likewise.
* signal/signal.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* socket/sys/socket.h [__USE_BSD]: Likewise.
* stdlib/fmtmsg.h [__USE_SVID]: Likewise.
* stdlib/stdlib.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* string/bits/string2.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* string/bits/string3.h [__USE_BSD]: Likewise.
* string/endian.h [__USE_BSD]: Likewise.
* string/string.h [__USE_SVID]: Likewise.
[__USE_BSD]: Likewise.
* string/strings.h [__USE_BSD]: Likewise.
* sysdeps/generic/netinet/ip.h [__USE_BSD]: Likewise.
* sysdeps/gnu/netinet/ip_icmp.h [__USE_BSD]: Likewise.
* sysdeps/mach/hurd/bits/fcntl.h [__USE_BSD]: Likewise.
* sysdeps/mach/hurd/bits/stat.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/mman.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/bits/fcntl-linux.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/bits/mman-linux.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/bits/sys_errlist.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/bits/termios.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/netinet/if_ether.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/netinet/if_fddi.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/netinet/if_tr.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios.h [__USE_BSD]:
Likewise.
* sysdeps/x86/bits/string.h [__USE_BSD]: Likewise.
* sysvipc/sys/ipc.h [__USE_SVID]: Likewise.
* termios/termios.h [__USE_BSD]: Likewise.
* time/sys/time.h [__USE_BSD]: Likewise.
* time/time.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_BSD]: Change
condition to [__USE_MISC].
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
[BZ 15846] As discussed in the recent thread on my $EXEC_ORIGIN patch
and in BZ 15846, getauxval() presently has no unambiguous way of
reporting an error condition. It currently returns zero on error, but
this may also be a valid result for some auxv entries. As there is no
clear invalid result for all current and future auxv entries, this patch
sets errno (following a suggestion in the BZ entry).
This version of the patch also adds documentation and tests for the
value-not-found conditions in getauxval().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the __gnu_inline__ attribute in _FORTIFY_SOURCE's __extern_always_inline
macro whenever the compiler supports it. Previously this macro only included
the __gnu_inline__ attribute in C++ mode for gcc >= 4.3. However,
__gnu_inline__ semantics are always desired for the __extern_always_inline
functions, and are available in g++ 4.2 (and some releases of g++ 4.1, and
also in Clang, which claims to be g++ 4.2).
This change stops g++-4.2 from emitting weak definitions for the fortify
wrapper functions if they can't be inlined, and also improves Clang
compatibility.
|
|
|
|
|
|
|
|
| |
Since we want to use this in installed headers, move it to the installed
sys/cdefs.h. This requires a slight tweaking of the name (add trailing
underscores).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
[BZ #14188]
This fixes compilation of programs using pthread_cleanup_push built
with non-gcc compilers and older gcc compilers.
|
|
|
|
|
| |
* misc/sys/auxv.h: Include <sys/cdefs.h>.
(getauxval): Use unsigned long int.
|
| |
|
| |
|
| |
|
|
|
|
| |
No more __const.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
As reported in http://bugzilla.redhat.com/533063 , preadv/pwritev prototypes
are wrong on 32-bit arches with -D_FILE_OFFSET_BITS=64 and as I've just
found, fallocate is wrong too.
The problem is that only off_t is remapped to the 64-bit type transparently,
__off_t is not.
|
|
|
|
|
| |
gcc 4.4 is more picky. And the x86-64 version of <bits/select.h>
contained a now unnecessary asm optimization. Remove it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sysdeps/unix/sysv/linux/pwritev.c: Likewise.
2009-04-23 Jakub Jelinek <jakub@redhat.com>
* sysdeps/posix/pwritev.c (PWRITEV): Fix up comment. Copy
data from vector to temporary buffer and call PWRITEV after it
instead of vice versa.
* sysdeps/posix/preadv.c: Fix up comment.
* misc/preadv.c: Likewise.
* misc/preadv64.c: Likewise.
* misc/pwritev.c: Likewise.
* misc/pwritev64.c: Likewise.
* misc/sys/uio.h (preadv, pwritev, preadv64, pwritev64): Likewise.
2009-04-23 Ulrich Drepper <drepper@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* misc/Versions: Export preadv, preadv64, pwritev, pwritev64 for
GLIBC_2.10.
* misc/sys/uio.h: Declare preadv, preadv64, pwritev, pwritev64.
* sysdeps/unix/sysv/linux/kernel-features.h: Add entries for preadv
and pwritev.
* misc/preadv.c: New file.
* misc/preadv64.c: New file.
* misc/pwritev.c: New file.
* misc/pwritev64.c: New file.
* sysdeps/posx/preadv.c: New file.
* sysdeps/posx/preadv64.c: New file.
* sysdeps/posx/pwritev.c: New file.
* sysdeps/posx/pwritev64.c: New file.
* sysdeps/unix/sysv/linux/preadv.c: New file.
* sysdeps/unix/sysv/linux/preadv64.c: New file.
* sysdeps/unix/sysv/linux/pwritev.c: New file.
* sysdeps/unix/sysv/linux/pwritev64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/preadv64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/pwritev64.c: New file.
|
|
|
|
|
|
|
|
| |
attribute also for non-C99 inline semantics variant.
2009-03-02 Richard Guenther <rguenther@suse.de>
* misc/sys/cdefs.h (__extern_always_inline): Add __artificial__
attribute also for non-C99 inline semantics variant.
|
|
|
|
|
| |
* misc/sys/queue.h: Add STAILQ_CONCAT and TAILQ_CONCAT definitions.
Patch by Roy Marples <roy@marples.name>.
|
|
|
|
|
| |
* wcsmbs/bits/wchar2.h (__swprintf_alias, __vswprintf_alias): Use
__REDIRECT_NTH_LDBL macro rather than __REDIRECT_NTH.
|
|
|
|
|
| |
* misc/sys/cdefs.h (__extern_always_inline): For GCC 4.3+
add __artificial__ attribute.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with __warning__/__error__ attributes.
(__warnattr): Define.
* stdlib/bits/stdlib.h (__realpath_chk_warn, __ptsname_r_chk_warn,
__mbstowcs_chk_warn, __wcstombs_chk_warn): New aliases with
__warnattr.
(realpath, ptsname_r, mbstowcs, wcstombs): Call __*_chk_warn instead
of __*_chk if compile time detectable overflow is found.
* libio/bits/stdio2.h (__fgets_chk_warn, __fread_chk_warn,
__fgets_unlocked_chk_warn, __fread_unlocked_chk_warn): New aliases
with __warnattr.
(fgets, fread, fgets_unlocked, fread_unlocked): Call __*_chk_warn
instead of __*_chk if compile time detectable overflow is found.
(__gets_alias): Rename to...
(__gets_warn): ... this. Add __warnattr.
(gets): Call __gets_warn instead of __gets_alias.
* socket/bits/socket2.h (__recv_chk_warn, __recvfrom_chk_warn): New
aliases with __warnattr.
(recv, recvfrom): Call __*_chk_warn instead of __*_chk if compile
time detectable overflow is found.
* posix/bits/unistd.h (__read_chk_warn, __pread_chk_warn,
__pread64_chk_warn, __readlink_chk_warn, __readlinkat_chk_warn,
__getcwd_chk_warn, __confstr_chk_warn, __getgroups_chk_warn,
__ttyname_r_chk_warn, __getlogin_r_chk_warn, __gethostname_chk_warn,
__getdomainname_chk_warn): New aliases with __warnattr.
(read, pread, pread64, readlink, readlinkat, getcwd, confstr,
getgroups, ttyname_r, getlogin_r, gethostname, getdomainname): Call
__*_chk_warn instead of __*_chk if compile time detectable overflow
is found.
(__getgroups_chk): Rename argument to __listlen from listlen.
(__getwd_alias): Rename to...
(__getwd_warn): ... this. Add __warnattr.
(getwd): Call __getwd_warn instead of __getwd_alias.
* wcsmbs/bits/wchar2.h (__wmemcpy_chk_warn, __wmemmove_chk_warn,
__wmempcpy_chk_warn, __wmemset_chk_warn, __wcsncpy_chk_warn,
__wcpncpy_chk_warn, __fgetws_chk_warn, __fgetws_unlocked_chk_warn,
__mbsrtowcs_chk_warn, __wcsrtombs_chk_warn, __mbsnrtowcs_chk_warn,
__wcsnrtombs_chk_warn): New aliases with __warnattr.
(wmemcpy, wmemmove, wmempcpy, wmemset, mbsrtowcs, wcsrtombs,
mbsnrtowcs, wcsnrtombs): Call __*_chk_warn instead of __*_chk if
compile time detectable overflow is found.
(wcsncpy, wcpncpy): Likewise. For constant __n fix check whether
to use __*_chk or not.
(fgetws, fgetws_unlocked): Divide __bos by sizeof (wchar_t), both
in comparisons which function should be called and in __*_chk*
arguments. Call __*_chk_warn instead of __*_chk if compile time
detectable overflow is found.
(swprintf, vswprintf): Divide __bos by sizeof (wchar_t) in
__*_chk argument.
* debug/tst-chk1.c (do_test): Add a few more tests.
|
| |
|