+2017-08-16 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #21944]
+ * signal/bits/types/__sigval_t.h: New file.
+ * signal/Makefile (headers): Add bits/types/__sigval_t.h.
+ * signal/bits/types/sigval_t.h: Include <bits/types/__sigval_t.h>
+ and define sigval_t using __sigval_t.
+ * include/bits/types/__sigval_t.h: New file.
+ * bits/types/sigevent_t.h: Include <bits/types/__sigval_t.h>
+ instead of <bits/types/__sigval_t.h>.
+ (struct sigevent): Use __sigval_t instead of sigval_t.
+ * bits/types/siginfo_t.h: Include <bits/types/__sigval_t.h>
+ instead of <bits/types/__sigval_t.h>.
+ (siginfo_t): Use __sigval_t instead of sigval_t.
+ * sysdeps/unix/sysv/linux/bits/types/sigevent_t.h: Include
+ <bits/types/__sigval_t.h> instead of <bits/types/__sigval_t.h>.
+ (struct sigevent): Use __sigval_t instead of sigval_t.
+ * sysdeps/unix/sysv/linux/bits/types/siginfo_t.h: Include
+ <bits/types/__sigval_t.h> instead of <bits/types/__sigval_t.h>.
+ (siginfo_t): Use __sigval_t instead of sigval_t.
+ * signal/signal.h [__USE_MISC]: Include <bits/types/sigval_t.h>.
+
2017-08-16 H.J. Lu <hongjiu.lu@intel.com>
* NEWS: Remove "[Add new features here]" for 2.27.
#define __sigevent_t_defined 1
#include <bits/types.h>
-#include <bits/types/sigval_t.h>
+#include <bits/types/__sigval_t.h>
/* Structure to transport application-defined values with signals. */
typedef struct sigevent
{
- sigval_t sigev_value;
+ __sigval_t sigev_value;
int sigev_signo;
int sigev_notify;
- void (*sigev_notify_function) (sigval_t); /* Function to start. */
+ void (*sigev_notify_function) (__sigval_t); /* Function to start. */
void *sigev_notify_attributes; /* Really pthread_attr_t.*/
} sigevent_t;
#define __siginfo_t_defined 1
#include <bits/types.h>
-#include <bits/types/sigval_t.h>
+#include <bits/types/__sigval_t.h>
typedef struct siginfo
{
void *si_addr; /* Address of faulting instruction. */
int si_status; /* Exit value or signal. */
long int si_band; /* Band event for SIGPOLL. */
- sigval_t si_value; /* Signal value. */
+ __sigval_t si_value; /* Signal value. */
} siginfo_t;
#endif
--- /dev/null
+#include <signal/bits/types/__sigval_t.h>
bits/types/__sigset_t.h bits/types/sig_atomic_t.h \
bits/types/sigevent_t.h bits/types/siginfo_t.h \
bits/types/sigset_t.h bits/types/sigval_t.h \
- bits/types/stack_t.h bits/types/struct_sigstack.h
+ bits/types/stack_t.h bits/types/struct_sigstack.h \
+ bits/types/__sigval_t.h
routines := signal raise killpg \
sigaction sigprocmask kill \
--- /dev/null
+/* Define __sigval_t.
+ Copyright (C) 1997-2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef ____sigval_t_defined
+#define ____sigval_t_defined
+
+/* Type for data associated with a signal. */
+#ifdef __USE_POSIX199309
+union sigval
+{
+ int sival_int;
+ void *sival_ptr;
+};
+
+typedef union sigval __sigval_t;
+#else
+union __sigval
+{
+ int __sival_int;
+ void *__sival_ptr;
+};
+
+typedef union __sigval __sigval_t;
+#endif
+
+#endif
#ifndef __sigval_t_defined
#define __sigval_t_defined
-/* Type for data associated with a signal. */
-union sigval
-{
- int sival_int;
- void *sival_ptr;
-};
-
-typedef union sigval sigval_t;
+#include <bits/types/__sigval_t.h>
+
+/* To avoid sigval_t (not a standard type name) having C++ name
+ mangling depending on whether the selected standard includes union
+ sigval, it should not be defined at all when using a standard for
+ which the sigval name is not reserved; in that case, headers should
+ not include <bits/types/sigval_t.h> and should use only the
+ internal __sigval_t name. */
+#ifndef __USE_POSIX199309
+# error "sigval_t defined for standard not including union sigval"
+#endif
+
+typedef __sigval_t sigval_t;
#endif
# include <bits/siginfo-consts.h>
#endif
+#ifdef __USE_MISC
+# include <bits/types/sigval_t.h>
+#endif
+
#ifdef __USE_POSIX199309
# include <bits/types/sigevent_t.h>
# include <bits/sigevent-consts.h>
#include <bits/wordsize.h>
#include <bits/types.h>
-#include <bits/types/sigval_t.h>
+#include <bits/types/__sigval_t.h>
#define __SIGEV_MAX_SIZE 64
#if __WORDSIZE == 64
/* Structure to transport application-defined values with signals. */
typedef struct sigevent
{
- sigval_t sigev_value;
+ __sigval_t sigev_value;
int sigev_signo;
int sigev_notify;
struct
{
- void (*_function) (sigval_t); /* Function to start. */
+ void (*_function) (__sigval_t); /* Function to start. */
pthread_attr_t *_attribute; /* Thread attributes. */
} _sigev_thread;
} _sigev_un;
#include <bits/wordsize.h>
#include <bits/types.h>
-#include <bits/types/sigval_t.h>
+#include <bits/types/__sigval_t.h>
#define __SI_MAX_SIZE 128
#if __WORDSIZE == 64
{
int si_tid; /* Timer ID. */
int si_overrun; /* Overrun count. */
- sigval_t si_sigval; /* Signal value. */
+ __sigval_t si_sigval; /* Signal value. */
} _timer;
/* POSIX.1b signals. */
{
__pid_t si_pid; /* Sending process ID. */
__uid_t si_uid; /* Real user ID of sending process. */
- sigval_t si_sigval; /* Signal value. */
+ __sigval_t si_sigval; /* Signal value. */
} _rt;
/* SIGCHLD. */