diff options
author | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2022-01-12 23:34:48 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2022-01-12 23:34:48 +0530 |
commit | fcfc9086815bf0d277ad47a90ee3fda4c37acca8 (patch) | |
tree | 0b00baceb19165a006457ad9a65c7e6478dc3f47 /support/xsignal.h | |
parent | db27f1251b008280a29d540b4f8ab2a38a0d80af (diff) | |
download | glibc-fcfc9086815bf0d277ad47a90ee3fda4c37acca8.tar.gz glibc-fcfc9086815bf0d277ad47a90ee3fda4c37acca8.tar.xz glibc-fcfc9086815bf0d277ad47a90ee3fda4c37acca8.zip |
debug: Synchronize feature guards in fortified functions [BZ #28746]
Some functions (e.g. stpcpy, pread64, etc.) had moved to POSIX in the main headers as they got incorporated into the standard, but their fortified variants remained under __USE_GNU. As a result, these functions did not get fortified when _GNU_SOURCE was not defined. Add test wrappers that check all functions tested in tst-chk0 at all levels with _GNU_SOURCE undefined and then use the failures to (1) exclude checks for _GNU_SOURCE functions in these tests and (2) Fix feature macro guards in the fortified function headers so that they're the same as the ones in the main headers. This fixes BZ #28746. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'support/xsignal.h')
-rw-r--r-- | support/xsignal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/support/xsignal.h b/support/xsignal.h index 973f532495..d868bb336c 100644 --- a/support/xsignal.h +++ b/support/xsignal.h @@ -28,7 +28,9 @@ __BEGIN_DECLS terminate the process on error. */ void xraise (int sig); +#ifdef _GNU_SOURCE sighandler_t xsignal (int sig, sighandler_t handler); +#endif void xsigaction (int sig, const struct sigaction *newact, struct sigaction *oldact); |