]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix signal.h bsd_signal namespace (bug 21445).
authorJoseph Myers <joseph@codesourcery.com>
Thu, 4 May 2017 17:38:05 +0000 (17:38 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Thu, 4 May 2017 17:38:05 +0000 (17:38 +0000)
signal.h declares bsd_signal for __USE_XOPEN.  But this function was
obsoleted in the 2001 edition of POSIX and removed in the 2008
edition, so it should not be declared when the 2008 edition is in use.
This patch fixes the conditionals accordingly.  (This does not fix any
conform/ test failures because of other namespace issues in signal.h.)

Tested for x86_64.

[BZ #21445]
* signal/signal.h [__USE_XOPEN2K8] (bsd_signal): Do not declare.

ChangeLog
signal/signal.h

index f5d749b6f8657f98ed415ab5d3856a0d8b85d625..7d023fc8674f16d71803db50d28e1fc42e148d80 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2017-05-04  Joseph Myers  <joseph@codesourcery.com>
 
+       [BZ #21445]
+       * signal/signal.h [__USE_XOPEN2K8] (bsd_signal): Do not declare.
+
        [BZ #21457]
        * sysdeps/unix/sysv/linux/mips/sys/ucontext.h
        [_MIPS_SIM != _ABIO32] (mcontext_t): Rename field reserved to
index 84f2a1f11e048a42cb63432a1fa502a635c61796..6db2d2f100ede40c9c4a640ac6ef52dc6061dfb8 100644 (file)
@@ -108,7 +108,7 @@ extern __sighandler_t __REDIRECT_NTH (signal,
 # endif
 #endif
 
-#ifdef __USE_XOPEN
+#if defined __USE_XOPEN && !defined __USE_XOPEN2K8
 /* The X/Open definition of `signal' conflicts with the BSD version.
    So they defined another function `bsd_signal'.  */
 extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler)