Add include guards to bits/sigaction.h
Commit Message
* bits/sigaction.h: Add include guard.
* sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/hppa/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/s390/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/tile/bits/sigaction.h: Likewise.
---
ChangeLog | 9 +++++++++
bits/sigaction.h | 5 +++++
sysdeps/unix/sysv/linux/alpha/bits/sigaction.h | 5 +++++
sysdeps/unix/sysv/linux/bits/sigaction.h | 5 +++++
sysdeps/unix/sysv/linux/hppa/bits/sigaction.h | 5 +++++
sysdeps/unix/sysv/linux/ia64/bits/sigaction.h | 5 +++++
sysdeps/unix/sysv/linux/mips/bits/sigaction.h | 5 +++++
sysdeps/unix/sysv/linux/s390/bits/sigaction.h | 5 +++++
sysdeps/unix/sysv/linux/sparc/bits/sigaction.h | 5 +++++
sysdeps/unix/sysv/linux/tile/bits/sigaction.h | 5 +++++
10 files changed, 54 insertions(+)
Comments
On Mon, 5 Mar 2018, Samuel Thibault wrote:
> +#ifndef __struct_sigaction_defined
> +#define __struct_sigaction_defined 1
I don't think this is an appropriate guard for a header that defines more
than just struct sigaction; I think you should use _BITS_SIGACTION_H in
this case.
Joseph Myers, on lun. 05 mars 2018 21:43:06 +0000, wrote:
> On Mon, 5 Mar 2018, Samuel Thibault wrote:
> > +#ifndef __struct_sigaction_defined
> > +#define __struct_sigaction_defined 1
>
> I don't think this is an appropriate guard for a header that defines more
> than just struct sigaction; I think you should use _BITS_SIGACTION_H in
> this case.
Ok, thanks!
Samuel
@@ -48,6 +48,15 @@
* hurd/hurd/signal.h: Include <bits/types/error_t.h>
* hurd/hurd/sigpreempt.h: Include <bits/types/error_t.h>
* sysdeps/mach/hurd/futimens.c: New file.
+ * bits/sigaction.h: Add include guard.
+ * sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Likewise.
+ * sysdeps/unix/sysv/linux/bits/sigaction.h: Likewise.
+ * sysdeps/unix/sysv/linux/hppa/bits/sigaction.h: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/bits/sigaction.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/bits/sigaction.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise.
+ * sysdeps/unix/sysv/linux/tile/bits/sigaction.h: Likewise.
2018-03-03 Andreas Schwab <schwab@linux-m68k.org>
@@ -15,6 +15,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifndef __struct_sigaction_defined
+#define __struct_sigaction_defined 1
+
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
#endif
@@ -77,3 +80,5 @@ struct sigaction
#define SIG_BLOCK 1 /* Block signals. */
#define SIG_UNBLOCK 2 /* Unblock signals. */
#define SIG_SETMASK 3 /* Set the set of blocked signals. */
+
+#endif
@@ -16,6 +16,9 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
+#ifndef __struct_sigaction_defined
+#define __struct_sigaction_defined 1
+
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
#endif
@@ -73,3 +76,5 @@ struct sigaction
#define SIG_BLOCK 1 /* Block signals. */
#define SIG_UNBLOCK 2 /* Unblock signals. */
#define SIG_SETMASK 3 /* Set the set of blocked signals. */
+
+#endif
@@ -16,6 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifndef __struct_sigaction_defined
+#define __struct_sigaction_defined 1
+
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
#endif
@@ -76,3 +79,5 @@ struct sigaction
#define SIG_BLOCK 0 /* Block signals. */
#define SIG_UNBLOCK 1 /* Unblock signals. */
#define SIG_SETMASK 2 /* Set the set of blocked signals. */
+
+#endif
@@ -16,6 +16,9 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
+#ifndef __struct_sigaction_defined
+#define __struct_sigaction_defined 1
+
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
#endif
@@ -79,3 +82,5 @@ struct sigaction
#define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */
#define SIG_SETMASK 2 /* for setting the signal mask */
+
+#endif
@@ -16,6 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifndef __struct_sigaction_defined
+#define __struct_sigaction_defined 1
+
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
#endif
@@ -73,3 +76,5 @@ struct sigaction
#define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */
#define SIG_SETMASK 2 /* for setting the signal mask */
+
+#endif
@@ -16,6 +16,9 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
+#ifndef __struct_sigaction_defined
+#define __struct_sigaction_defined 1
+
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
#endif
@@ -87,3 +90,5 @@ struct sigaction
# define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility:
set only the low 32 bit of the sigset. */
#endif
+
+#endif
@@ -16,6 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifndef __struct_sigaction_defined
+#define __struct_sigaction_defined 1
+
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
#endif
@@ -110,3 +113,5 @@ struct sigaction
#define SIG_BLOCK 0 /* Block signals. */
#define SIG_UNBLOCK 1 /* Unblock signals. */
#define SIG_SETMASK 2 /* Set the set of blocked signals. */
+
+#endif
@@ -16,6 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifndef __struct_sigaction_defined
+#define __struct_sigaction_defined 1
+
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
#endif
@@ -82,3 +85,5 @@ struct sigaction
#define SIG_BLOCK 1 /* Block signals. */
#define SIG_UNBLOCK 2 /* Unblock signals. */
#define SIG_SETMASK 4 /* Set the set of blocked signals. */
+
+#endif
@@ -16,6 +16,9 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
+#ifndef __struct_sigaction_defined
+#define __struct_sigaction_defined 1
+
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
#endif
@@ -77,3 +80,5 @@ struct sigaction
#define SIG_BLOCK 0 /* Block signals. */
#define SIG_UNBLOCK 1 /* Unblock signals. */
#define SIG_SETMASK 2 /* Set the set of blocked signals. */
+
+#endif