@@ -16,6 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifndef _BITS_PARAM_H
+#define _BITS_PARAM_H 1
+
#ifndef _SYS_PARAM_H
# error "Never use <bits/param.h> directly; include <sys/param.h> instead."
#endif
@@ -31,3 +34,7 @@
EXEC_PAGESIZE
*/
+
+#error "Generic bits/param.h should not have been used."
+
+#endif
@@ -19,7 +19,7 @@
#ifndef _BITS_SIGNUM_GENERIC_H
#define _BITS_SIGNUM_GENERIC_H 1
-#ifndef _SIGNAL_H
+#if !defined _SIGNAL_H && !defined _SYS_PARAM_H
#error "Never include <bits/signum-generic.h> directly; use <signal.h> instead."
#endif
@@ -19,7 +19,7 @@
#ifndef _BITS_SIGNUM_H
#define _BITS_SIGNUM_H 1
-#ifndef _SIGNAL_H
+#if !defined _SIGNAL_H && !defined _SYS_PARAM_H
#error "Never include <bits/signum.h> directly; use <signal.h> instead."
#endif
@@ -2,6 +2,7 @@
#ifdef POSIX
# define pid_t __pid_t
#endif
+#define uid_t __uid_t
constant WNOHANG
constant WUNTRACED
@@ -2,6 +2,7 @@
https://sourceware.org/bugzilla/show_bug.cgi?id=838. */
#include <assert.h>
#include <errno.h>
+#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -16,6 +16,12 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+/* This header is provided only for compatibility with historic Unix
+ systems. New programs should use some combination of <endian.h>,
+ <limits.h>, <signal.h>, <stddef.h>, <stdint.h>, and <sys/types.h>
+ instead, and the names defined in those headers. The utility
+ macros at the end of this header should not be used at all. */
+
#ifndef _SYS_PARAM_H
#define _SYS_PARAM_H 1
@@ -24,7 +30,7 @@
#include <sys/types.h>
#include <limits.h>
#include <endian.h> /* Define BYTE_ORDER et al. */
-#include <signal.h> /* Define NSIG. */
+#include <bits/signum.h> /* Define NSIG. */
#include <bits/NULL.h>
/* This file defines some things in system-specific ways. */
@@ -19,27 +19,28 @@
/* NOTE: this tests functionality beyond POSIX. POSIX does not allow
exit to be called more than once. */
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <pthread.h>
+#include <signal.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/types.h>
+#include <termios.h>
+#include <unistd.h>
+#include <sys/ipc.h>
+#include <sys/mman.h>
+#include <sys/msg.h>
+#include <sys/poll.h>
#include <sys/select.h>
#include <sys/socket.h>
-#include <sys/un.h>
-#include <sys/ipc.h>
-#include <sys/msg.h>
-#include <unistd.h>
-#include <errno.h>
-#include <limits.h>
-#include <pthread.h>
-#include <fcntl.h>
-#include <termios.h>
-#include <sys/mman.h>
-#include <sys/poll.h>
-#include <sys/wait.h>
#include <sys/stat.h>
+#include <sys/types.h>
#include <sys/uio.h>
+#include <sys/un.h>
+#include <sys/wait.h>
/* Since STREAMS are not supported in the standard Linux kernel and
@@ -18,6 +18,7 @@
#include <errno.h>
#include <pthread.h>
+#include <signal.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
@@ -1,5 +1,6 @@
#include <errno.h>
#include <pthread.h>
+#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -18,6 +18,7 @@
#include <errno.h>
#include <pthread.h>
+#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -18,6 +18,7 @@
#include <errno.h>
#include <pthread.h>
+#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -30,7 +30,7 @@ __BEGIN_DECLS
#include <bits/types/pid_t.h>
#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
-# include <signal.h>
+# include <bits/types/siginfo_t.h>
#endif
#if defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8
@@ -25,6 +25,7 @@
#include <gnu/lib-names.h>
#include <netdb.h>
#include <resolv/resolv_context.h>
+#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <support/capture_subprocess.h>
@@ -20,13 +20,14 @@
#include <errno.h>
#include <fcntl.h>
#include <mqueue.h>
+#include <signal.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
-#include <stdint.h>
+#include <sys/wait.h>
#include "tst-mqueue.h"
static int
@@ -531,15 +531,15 @@ HEADER_ALLOWED_INCLUDES = {
# sys/sem.h -> sys/ipc.h
# sys/shm.h -> sys/ipc.h
# sys/time.h -> sys/select.h (effectively)
- # allowed: sys/wait.h -> signal.h
"sys/msg.h": [ "sys/ipc.h" ],
"sys/sem.h": [ "sys/ipc.h" ],
"sys/shm.h": [ "sys/ipc.h" ],
"sys/time.h": [ "sys/select.h" ],
+ # necessary for backward compatibility with BSD
"sys/types.h": [ "endian.h" ],
+
"sys/uio.h": [ "sys/types.h" ],
"sys/un.h": [ "string.h" ],
- "sys/wait.h": [ "signal.h" ],
# POSIX networking headers
# allowed: netdb.h -> netinet/in.h
@@ -593,8 +593,7 @@ HEADER_ALLOWED_INCLUDES = {
"sys/ioctl.h": [ "sys/ttydefaults.h" ],
"sys/mount.h": [ "sys/ioctl.h" ],
"sys/mtio.h": [ "sys/ioctl.h", "sys/types.h" ],
- "sys/param.h": [ "endian.h", "limits.h", "signal.h",
- "sys/types.h" ],
+ "sys/param.h": [ "endian.h", "limits.h", "sys/types.h" ],
"sys/platform/ppc.h": [ "stdint.h" ],
"sys/procfs.h": [ "sys/time.h", "sys/types.h",
"sys/user.h" ],
@@ -16,21 +16,23 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <errno.h>
+#include <getopt.h>
+#include <limits.h>
+#include <paths.h>
+#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+#include <array_length.h>
#include <support/capture_subprocess.h>
#include <support/check.h>
#include <support/support.h>
#include <support/temp_file.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <paths.h>
-#include <getopt.h>
-#include <limits.h>
-#include <errno.h>
-#include <array_length.h>
/* Nonzero if the program gets called via 'exec'. */
static int restart;
@@ -273,7 +275,8 @@ do_multiple_tests (enum test_type type)
.out = random_string (lengths[length_idx_stdout]),
.err = random_string (lengths[length_idx_stderr]),
.write_mode = write_mode,
- .signal = signal * SIGTERM, /* 0 or SIGTERM. */
+ .signal = signal *
+ SIGTERM, /* 0 or SIGTERM. */
.status = status * 3, /* 0 or 3. */
};
TEST_VERIFY (strlen (test.out) == lengths[length_idx_stdout]);
@@ -16,19 +16,16 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifndef _BITS_PARAM_H
+#define _BITS_PARAM_H 1
+
#ifndef _SYS_PARAM_H
# error "Never use <bits/param.h> directly; include <sys/param.h> instead."
#endif
#include <bits/mach/param.h>
-/* This file is deprecated and is provided only for compatibility with
- Unix systems. It is unwise to include this file on programs which
- are intended only for GNU systems.
-
- Parts from:
-
- * Copyright (c) 1982, 1986, 1989 The Regents of the University of California.
+/* Copyright (c) 1982, 1986, 1989 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -85,3 +82,5 @@
#define FSHIFT 11 /* Bits to right of fixed binary point. */
#define FSCALE (1<<FSHIFT)
+
+#endif /* bits/param.h */
@@ -36,7 +36,6 @@ test-xfail-UNIX98/aio.h/conform = yes
test-xfail-UNIX98/ftw.h/conform = yes
test-xfail-UNIX98/mqueue.h/conform = yes
test-xfail-UNIX98/netinet/in.h/conform = yes
-test-xfail-UNIX98/sys/wait.h/conform = yes
test-xfail-UNIX98/sys/sem.h/conform = yes
test-xfail-UNIX98/sys/uio.h/conform = yes
test-xfail-UNIX98/sys/socket.h/conform = yes
@@ -51,7 +50,6 @@ test-xfail-POSIX2008/regex.h/conform = yes
test-xfail-POSIX2008/aio.h/conform = yes
test-xfail-POSIX2008/mqueue.h/conform = yes
test-xfail-POSIX2008/netinet/in.h/conform = yes
-test-xfail-POSIX2008/sys/wait.h/conform = yes
test-xfail-POSIX2008/sys/socket.h/conform = yes
test-xfail-POSIX2008/sys/types.h/conform = yes
test-xfail-POSIX2008/arpa/inet.h/conform = yes
@@ -64,7 +62,6 @@ test-xfail-XOPEN2K/aio.h/conform = yes
test-xfail-XOPEN2K/ftw.h/conform = yes
test-xfail-XOPEN2K/mqueue.h/conform = yes
test-xfail-XOPEN2K/netinet/in.h/conform = yes
-test-xfail-XOPEN2K/sys/wait.h/conform = yes
test-xfail-XOPEN2K/sys/sem.h/conform = yes
test-xfail-XOPEN2K/sys/uio.h/conform = yes
test-xfail-XOPEN2K/sys/socket.h/conform = yes
@@ -80,7 +77,6 @@ test-xfail-XOPEN2K8/aio.h/conform = yes
test-xfail-XOPEN2K8/ftw.h/conform = yes
test-xfail-XOPEN2K8/mqueue.h/conform = yes
test-xfail-XOPEN2K8/netinet/in.h/conform = yes
-test-xfail-XOPEN2K8/sys/wait.h/conform = yes
test-xfail-XOPEN2K8/sys/sem.h/conform = yes
test-xfail-XOPEN2K8/sys/uio.h/conform = yes
test-xfail-XOPEN2K8/sys/socket.h/conform = yes
@@ -16,6 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifndef _BITS_MACH_PARAM_H
+#define _BITS_MACH_PARAM_H 1
+
#ifndef _SYS_PARAM_H
# error "Never use <bits/mach/param.h> directly; include <sys/param.h> instead."
#endif
@@ -23,3 +26,5 @@
#ifndef EXEC_PAGESIZE
#define EXEC_PAGESIZE 4096
#endif
+
+#endif
@@ -19,7 +19,7 @@
#ifndef _BITS_SIGNUM_H
#define _BITS_SIGNUM_H 1
-#ifndef _SIGNAL_H
+#if !defined _SIGNAL_H && !defined _SYS_PARAM_H
#error "Never include <bits/signum.h> directly; use <signal.h> instead."
#endif
@@ -19,7 +19,7 @@
#ifndef _BITS_SIGNUM_H
#define _BITS_SIGNUM_H 1
-#ifndef _SIGNAL_H
+#if !defined _SIGNAL_H && !defined _SYS_PARAM_H
#error "Never include <bits/signum.h> directly; use <signal.h> instead."
#endif
@@ -16,6 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifndef _BITS_PARAM_H
+#define _BITS_PARAM_H 1
+
#ifndef _SYS_PARAM_H
# error "Never use <bits/param.h> directly; include <sys/param.h> instead."
#endif
@@ -40,3 +43,5 @@
and NCARGS anyway. */
#define NOFILE 256
#define NCARGS 131072
+
+#endif /* bits/param.h */
@@ -19,7 +19,7 @@
#ifndef _BITS_SIGNUM_H
#define _BITS_SIGNUM_H 1
-#ifndef _SIGNAL_H
+#if !defined _SIGNAL_H && !defined _SYS_PARAM_H
#error "Never include <bits/signum.h> directly; use <signal.h> instead."
#endif
@@ -19,7 +19,7 @@
#ifndef _BITS_SIGNUM_H
#define _BITS_SIGNUM_H 1
-#ifndef _SIGNAL_H
+#if !defined _SIGNAL_H && !defined _SYS_PARAM_H
#error "Never include <bits/signum.h> directly; use <signal.h> instead."
#endif
@@ -19,7 +19,7 @@
#ifndef _BITS_SIGNUM_H
#define _BITS_SIGNUM_H 1
-#ifndef _SIGNAL_H
+#if !defined _SIGNAL_H && !defined _SYS_PARAM_H
#error "Never include <bits/signum.h> directly; use <signal.h> instead."
#endif
@@ -16,6 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -19,7 +19,7 @@
#ifndef _BITS_SIGNUM_H
#define _BITS_SIGNUM_H 1
-#ifndef _SIGNAL_H
+#if !defined _SIGNAL_H && !defined _SYS_PARAM_H
#error "Never include <bits/signum.h> directly; use <signal.h> instead."
#endif
@@ -16,14 +16,15 @@
<http://www.gnu.org/licenses/>. */
#include <sched.h>
+#include <signal.h>
+#include <stackinfo.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
-#include <sys/wait.h>
#include <unistd.h>
+#include <sys/wait.h>
#include <tst-stack-align.h>
-#include <stackinfo.h>
static int
f (void *arg)