* Public domain.
*/
-#include <sys/param.h>
-
#include <libgen.h>
#include <stdio.h>
#include <string.h>
int
main(void)
{
- char path[2 * MAXPATHLEN];
+ char path[2 * PATH_MAX];
const char *dir = "junk/";
const char *fname = "file.name.ext";
char *str;
* 1) path is NULL
* 2) path is the empty string
* 3) path is composed entirely of slashes
- * 4) the resulting name is larger than MAXPATHLEN
+ * 4) the resulting name is larger than PATH_MAX
*
* The first two cases require that a pointer
* to the string "." be returned.
goto fail;
/* Case 3 */
- for (i = 0; i < MAXPATHLEN - 1; i++)
+ for (i = 0; i < PATH_MAX - 1; i++)
strlcat(path, "/", sizeof(path)); /* path cleared above */
str = basename(path);
if (strcmp(str, "/") != 0)
/* Case 4 */
strlcpy(path, "/", sizeof(path));
strlcat(path, dir, sizeof(path));
- for (i = 0; i <= MAXPATHLEN; i += sizeof(fname))
+ for (i = 0; i <= PATH_MAX; i += sizeof(fname))
strlcat(path, fname, sizeof(path));
str = basename(path);
if (str != NULL || errno != ENAMETOOLONG)
-/* $OpenBSD: dbtest.c,v 1.18 2021/10/24 21:24:20 deraadt Exp $ */
+/* $OpenBSD: dbtest.c,v 1.19 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: dbtest.c,v 1.8 1996/05/03 21:57:48 cgd Exp $ */
/*-
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/stat.h>
#include <ctype.h>
#include <db.h>
+#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
+
enum S { COMMAND, COMPARE, GET, PUT, REMOVE, SEQ, SEQFLAG, KEY, DATA };
void compare(DBT *, DBT *);
printf("compare failed: key->data len %lu != data len %lu\n",
db1->size, db2->size);
- len = MIN(db1->size, db2->size);
+ len = MINIMUM(db1->size, db2->size);
for (p1 = db1->data, p2 = db2->data; len--;)
if (*p1++ != *p2++) {
printf("compare failed at offset %ld\n",
(void)write(ofd, NOSUCHKEY, sizeof(NOSUCHKEY) - 1);
else
(void)fprintf(stderr, "%lu: %.*s: %s", lineno,
- MIN((int)kp->size, 20), kp->data, NOSUCHKEY);
+ MINIMUM((int)kp->size, 20), kp->data, NOSUCHKEY);
#undef NOSUCHKEY
break;
}
(void)write(ofd, NOSUCHKEY, sizeof(NOSUCHKEY) - 1);
else if (flags != R_CURSOR)
(void)fprintf(stderr, "%lu: %.*s: %s", lineno,
- MIN((int)kp->size, 20), kp->data, NOSUCHKEY);
+ MINIMUM((int)kp->size, 20), kp->data, NOSUCHKEY);
else
(void)fprintf(stderr,
"%lu: rem of cursor failed\n", lineno);
(void)write(ofd, NOSUCHKEY, sizeof(NOSUCHKEY) - 1);
else if (flags == R_CURSOR)
(void)fprintf(stderr, "%lu: %.*s: %s", lineno,
- MIN((int)kp->size, 20), kp->data, NOSUCHKEY);
+ MINIMUM((int)kp->size, 20), kp->data, NOSUCHKEY);
else
(void)fprintf(stderr,
"%lu: seq (%s) failed\n", lineno, sflags(flags));
* Public domain.
*/
-#include <sys/param.h>
-
#include <libgen.h>
#include <stdio.h>
#include <string.h>
int
main(void)
{
- char path[2 * MAXPATHLEN];
+ char path[2 * PATH_MAX];
char dname[128];
const char *dir = "junk";
const char *fname = "/file.name.ext";
* 1) path is NULL
* 2) path is the empty string
* 3) path is composed entirely of slashes
- * 4) the resulting name is larger than MAXPATHLEN
+ * 4) the resulting name is larger than PATH_MAX
*
* The first two cases require that a pointer
* to the string "." be returned.
errx(1, "2: dirname(%s) = %s != .", path, str);
/* Case 3 */
- for (i = 0; i < MAXPATHLEN - 1; i++)
+ for (i = 0; i < PATH_MAX - 1; i++)
strlcat(path, "/", sizeof(path)); /* path cleared above */
str = dirname(path);
if (strcmp(str, "/") != 0)
/* Case 4 */
strlcpy(path, "/", sizeof(path)); /* reset path */
- for (i = 0; i <= MAXPATHLEN; i += strlen(dir))
+ for (i = 0; i <= PATH_MAX; i += strlen(dir))
strlcat(path, dir, sizeof(path));
strlcat(path, fname, sizeof(path));
str = dirname(path);
* contain any X's
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <limits.h>
#include <unistd.h>
#define MAX_TEMPLATE_LEN 10
main(void)
{
struct stat sb, fsb;
- char cwd[MAXPATHLEN + 1];
+ char cwd[PATH_MAX + 1];
char *p;
size_t clen;
int i;
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <err.h>
#include <errno.h>
#include <paths.h>
#include <stdio.h>
#include <stdlib.h>
+#include <limits.h>
#include <time.h>
#include <unistd.h>
int
main(int argc, char **argv)
{
- char *buffer, command[MAXPATHLEN];
+ char *buffer, command[PATH_MAX];
int index, in;
FILE *pipe;
-/* $OpenBSD: macros.h,v 1.4 2021/09/02 15:28:41 mbuhl Exp $ */
+/* $OpenBSD: macros.h,v 1.5 2021/12/13 16:56:48 deraadt Exp $ */
/* Public domain - Moritz Buhl */
-#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stdint.h>
#include <sys/sysctl.h>
#include <string.h>
#include <stdio.h>
-#define __RCSID(str)
-#define __COPYRIGHT(str)
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
#define __arraycount(_a) nitems(_a)
#define __unreachable() atf_tc_fail("unreachable")
-/* $OpenBSD: t_access.c,v 1.2 2019/11/22 15:59:53 bluhm Exp $ */
+/* $OpenBSD: t_access.c,v 1.3 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_access.c,v 1.3 2019/07/16 17:29:18 martin Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_access.c,v 1.3 2019/07/16 17:29:18 martin Exp $");
-
#include "atf-c.h"
#include <sys/stat.h>
-/* $OpenBSD: t_chroot.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */
+/* $OpenBSD: t_chroot.c,v 1.3 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_chroot.c,v 1.2 2017/01/10 22:36:29 christos Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_chroot.c,v 1.2 2017/01/10 22:36:29 christos Exp $");
-
#include <sys/wait.h>
#include <sys/stat.h>
-/* $OpenBSD: t_clock_gettime.c,v 1.2 2021/09/02 12:40:44 mbuhl Exp $ */
+/* $OpenBSD: t_clock_gettime.c,v 1.3 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_clock_gettime.c,v 1.3 2017/01/13 21:30:41 christos Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__COPYRIGHT("@(#) Copyright (c) 2008\
- The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_clock_gettime.c,v 1.3 2017/01/13 21:30:41 christos Exp $");
-
-#include <sys/param.h>
#include <sys/sysctl.h>
-/* $OpenBSD: t_dup.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */
+/* $OpenBSD: t_dup.c,v 1.3 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_dup.c,v 1.9 2017/01/13 20:31:53 christos Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_dup.c,v 1.9 2017/01/13 20:31:53 christos Exp $");
-
#include <sys/resource.h>
#include <sys/stat.h>
#include <sys/wait.h>
-/* $OpenBSD: t_fork.c,v 1.4 2021/09/28 05:39:24 anton Exp $ */
+/* $OpenBSD: t_fork.c,v 1.5 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_fork.c,v 1.4 2019/04/06 15:41:54 kamil Exp $ */
/*-
*/
#include "macros.h"
-#include <sys/cdefs.h>
-__COPYRIGHT("@(#) Copyright (c) 2018, 2019\
- The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_fork.c,v 1.4 2019/04/06 15:41:54 kamil Exp $");
-
-#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/signal.h>
#ifdef __OpenBSD__
#include <sys/proc.h>
#endif
-#include <sys/types.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
#include <sched.h>
-/* $OpenBSD: t_fsync.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */
+/* $OpenBSD: t_fsync.c,v 1.3 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_fsync.c,v 1.2 2012/03/18 07:00:52 jruoho Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_fsync.c,v 1.2 2012/03/18 07:00:52 jruoho Exp $");
-
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
-/* $OpenBSD: t_getgroups.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */
+/* $OpenBSD: t_getgroups.c,v 1.3 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_getgroups.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_getgroups.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $");
-
#include <sys/wait.h>
#include "atf-c.h"
-/* $OpenBSD: t_getitimer.c,v 1.3 2020/11/09 23:18:51 bluhm Exp $ */
+/* $OpenBSD: t_getitimer.c,v 1.4 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_getitimer.c,v 1.3 2019/07/13 12:44:02 gson Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_getitimer.c,v 1.3 2019/07/13 12:44:02 gson Exp $");
-
#include <sys/time.h>
#include "atf-c.h"
-/* $OpenBSD: t_getlogin.c,v 1.1.1.1 2019/11/19 19:57:03 bluhm Exp $ */
+/* $OpenBSD: t_getlogin.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_getlogin.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_getlogin.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $");
-
-#include <sys/param.h>
#include <sys/wait.h>
#include "atf-c.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include <limits.h>
#include <unistd.h>
ATF_TC(getlogin_r_err);
ATF_TC_BODY(getlogin_same, tc)
{
- char buf[MAXLOGNAME];
+ char buf[LOGIN_NAME_MAX];
char *str;
str = getlogin();
ATF_TC_BODY(setlogin_err, tc)
{
- char buf[MAXLOGNAME + 1];
+ char buf[LOGIN_NAME_MAX + 1];
char *name;
pid_t pid;
int sta;
-/* $OpenBSD: t_getpid.c,v 1.1.1.1 2019/11/19 19:57:03 bluhm Exp $ */
+/* $OpenBSD: t_getpid.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_getpid.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_getpid.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $");
-
#include <sys/wait.h>
#include <stdlib.h>
-/* $OpenBSD: t_getrusage.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */
+/* $OpenBSD: t_getrusage.c,v 1.3 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_getrusage.c,v 1.8 2018/05/09 08:45:03 mrg Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_getrusage.c,v 1.8 2018/05/09 08:45:03 mrg Exp $");
-
#include <sys/resource.h>
#include <sys/time.h>
-/* $OpenBSD: t_getsid.c,v 1.1.1.1 2019/11/19 19:57:03 bluhm Exp $ */
+/* $OpenBSD: t_getsid.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_getsid.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_getsid.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $");
-
#include <sys/wait.h>
#include <errno.h>
-/* $OpenBSD: t_gettimeofday.c,v 1.4 2021/09/27 14:07:44 mbuhl Exp $ */
+/* $OpenBSD: t_gettimeofday.c,v 1.5 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_gettimeofday.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_gettimeofday.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $");
-
#include <sys/time.h>
#include "atf-c.h"
#include <errno.h>
+#include <signal.h>
#include <string.h>
#ifdef __OpenBSD__
-/* $OpenBSD: t_kevent.c,v 1.1 2021/09/02 12:40:44 mbuhl Exp $ */
+/* $OpenBSD: t_kevent.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_kevent.c,v 1.9 2020/10/31 01:08:32 christos Exp $ */
/*-
*/
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_kevent.c,v 1.9 2020/10/31 01:08:32 christos Exp $");
-
#include <sys/types.h>
#include <sys/event.h>
-/* $OpenBSD: t_kill.c,v 1.3 2021/09/28 05:39:24 anton Exp $ */
+/* $OpenBSD: t_kill.c,v 1.4 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_kill.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_kill.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $");
-
#include <sys/wait.h>
#include <errno.h>
-/* $OpenBSD: t_link.c,v 1.1.1.1 2019/11/19 19:57:03 bluhm Exp $ */
+/* $OpenBSD: t_link.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_link.c,v 1.3 2017/01/13 20:42:36 christos Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_link.c,v 1.3 2017/01/13 20:42:36 christos Exp $");
-
-#include <sys/param.h>
#include <sys/stat.h>
#include "atf-c.h"
ATF_TC_BODY(link_err, tc)
{
- char buf[MAXPATHLEN + 1];
+ char buf[PATH_MAX + 1];
int fd;
(void)memset(buf, 'x', sizeof(buf));
-/* $OpenBSD: t_minherit.c,v 1.1 2021/09/02 12:40:44 mbuhl Exp $ */
+/* $OpenBSD: t_minherit.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_minherit.c,v 1.1 2014/07/18 12:34:52 christos Exp $ */
/*-
*/
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_minherit.c,v 1.1 2014/07/18 12:34:52 christos Exp $");
-
-#include <sys/param.h>
#include <sys/mman.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
+#include <signal.h>
#include <unistd.h>
#include "atf-c.h"
-/* $OpenBSD: t_mkdir.c,v 1.1.1.1 2019/11/19 19:57:03 bluhm Exp $ */
+/* $OpenBSD: t_mkdir.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_mkdir.c,v 1.2 2011/10/15 07:38:31 jruoho Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__COPYRIGHT("@(#) Copyright (c) 2008\
- The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_mkdir.c,v 1.2 2011/10/15 07:38:31 jruoho Exp $");
-
#include <sys/stat.h>
#include <sys/wait.h>
-/* $OpenBSD: t_mkfifo.c,v 1.1.1.1 2019/11/19 19:57:03 bluhm Exp $ */
+/* $OpenBSD: t_mkfifo.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_mkfifo.c,v 1.3 2019/06/20 03:31:54 kamil Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_mkfifo.c,v 1.3 2019/06/20 03:31:54 kamil Exp $");
-
#include <sys/stat.h>
#include <sys/wait.h>
-/* $OpenBSD: t_mknod.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */
+/* $OpenBSD: t_mknod.c,v 1.3 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_mknod.c,v 1.2 2012/03/18 07:00:52 jruoho Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_mknod.c,v 1.2 2012/03/18 07:00:52 jruoho Exp $");
-
#include <sys/stat.h>
#include "atf-c.h"
-/* $OpenBSD: t_mlock.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */
+/* $OpenBSD: t_mlock.c,v 1.3 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_mlock.c,v 1.8 2020/01/24 08:45:16 skrll Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_mlock.c,v 1.8 2020/01/24 08:45:16 skrll Exp $");
-
#include <sys/mman.h>
#include <sys/resource.h>
#include <sys/sysctl.h>
-/* $OpenBSD: t_mmap.c,v 1.3 2020/12/06 18:46:07 bluhm Exp $ */
+/* $OpenBSD: t_mmap.c,v 1.4 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_mmap.c,v 1.14 2020/06/26 07:50:11 jruoho Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_mmap.c,v 1.14 2020/06/26 07:50:11 jruoho Exp $");
-
-#include <sys/param.h>
#include <sys/disklabel.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
+#include <limits.h>
#include <string.h>
#include <unistd.h>
#include <paths.h>
-/* $OpenBSD: t_msgctl.c,v 1.1.1.1 2019/11/19 19:57:04 bluhm Exp $ */
+/* $OpenBSD: t_msgctl.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_msgctl.c,v 1.7 2017/10/07 17:15:44 kre Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_msgctl.c,v 1.7 2017/10/07 17:15:44 kre Exp $");
-
#include <sys/msg.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
-/* $OpenBSD: t_msgget.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */
+/* $OpenBSD: t_msgget.c,v 1.3 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_msgget.c,v 1.3 2017/10/08 08:31:05 kre Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_msgget.c,v 1.3 2017/10/08 08:31:05 kre Exp $");
-
#include <sys/msg.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
+#include <signal.h>
#include <string.h>
#include <sysexits.h>
#include <time.h>
-/* $OpenBSD: t_msgrcv.c,v 1.1.1.1 2019/11/19 19:57:04 bluhm Exp $ */
+/* $OpenBSD: t_msgrcv.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_msgrcv.c,v 1.5 2017/10/08 08:31:05 kre Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_msgrcv.c,v 1.5 2017/10/08 08:31:05 kre Exp $");
-
#include <sys/msg.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
-/* $OpenBSD: t_msgsnd.c,v 1.1.1.1 2019/11/19 19:57:04 bluhm Exp $ */
+/* $OpenBSD: t_msgsnd.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_msgsnd.c,v 1.4 2017/10/08 08:31:05 kre Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_msgsnd.c,v 1.4 2017/10/08 08:31:05 kre Exp $");
-
#include <sys/msg.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
-/* $OpenBSD: t_msync.c,v 1.1.1.1 2019/11/19 19:57:04 bluhm Exp $ */
+/* $OpenBSD: t_msync.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_msync.c,v 1.3 2017/01/14 20:52:42 christos Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_msync.c,v 1.3 2017/01/14 20:52:42 christos Exp $");
-
#include <sys/mman.h>
#include "atf-c.h"
-/* $OpenBSD: t_pipe.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */
+/* $OpenBSD: t_pipe.c,v 1.3 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_pipe.c,v 1.7 2020/06/26 07:50:11 jruoho Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-#include <sys/cdefs.h>
-__COPYRIGHT("@(#) Copyright (c) 2008\
- The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_pipe.c,v 1.7 2020/06/26 07:50:11 jruoho Exp $");
-
#include <sys/types.h>
#include <sys/wait.h>
-/* $OpenBSD: t_pipe2.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */
+/* $OpenBSD: t_pipe2.c,v 1.3 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_pipe2.c,v 1.9 2017/01/13 21:19:45 christos Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_pipe2.c,v 1.9 2017/01/13 21:19:45 christos Exp $");
-
#include "atf-c.h"
#include <fcntl.h>
#include <unistd.h>
-/* $OpenBSD: t_ptrace.c,v 1.4 2020/11/09 23:18:51 bluhm Exp $ */
+/* $OpenBSD: t_ptrace.c,v 1.5 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_ptrace.c,v 1.4 2018/05/14 12:44:40 kamil Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ptrace.c,v 1.4 2018/05/14 12:44:40 kamil Exp $");
-
-#include <sys/param.h>
#include <sys/types.h>
#include <sys/ptrace.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
#include <err.h>
#include <errno.h>
+#include <limits.h>
#include <unistd.h>
#include "atf-c.h"
-/* $OpenBSD: t_revoke.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */
+/* $OpenBSD: t_revoke.c,v 1.3 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_revoke.c,v 1.2 2017/01/13 21:15:57 christos Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_revoke.c,v 1.2 2017/01/13 21:15:57 christos Exp $");
-
#include <sys/resource.h>
#include <sys/wait.h>
-/* $OpenBSD: t_sendrecv.c,v 1.2 2021/05/31 16:56:27 bluhm Exp $ */
+/* $OpenBSD: t_sendrecv.c,v 1.3 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_sendrecv.c,v 1.8 2021/03/28 17:30:01 christos Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_sendrecv.c,v 1.8 2021/03/28 17:30:01 christos Exp $");
-
#include "atf-c.h"
#include <sys/types.h>
#include <sys/socket.h>
-/* $OpenBSD: t_setrlimit.c,v 1.1 2021/09/02 12:40:44 mbuhl Exp $ */
+/* $OpenBSD: t_setrlimit.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_setrlimit.c,v 1.7 2020/10/13 06:58:57 rin Exp $ */
/*-
*/
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_setrlimit.c,v 1.7 2020/10/13 06:58:57 rin Exp $");
-
#include <sys/resource.h>
#include <sys/mman.h>
#include <sys/wait.h>
-/* $OpenBSD: t_setuid.c,v 1.1.1.1 2019/11/19 19:57:04 bluhm Exp $ */
+/* $OpenBSD: t_setuid.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_setuid.c,v 1.1 2011/07/07 06:57:54 jruoho Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_setuid.c,v 1.1 2011/07/07 06:57:54 jruoho Exp $");
-
#include <sys/wait.h>
#include "atf-c.h"
-/* $OpenBSD: t_sigaction.c,v 1.1.1.1 2019/11/19 19:57:04 bluhm Exp $ */
+/* $OpenBSD: t_sigaction.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_sigaction.c,v 1.5 2017/01/13 21:30:41 christos Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__COPYRIGHT("@(#) Copyright (c) 2010\
- The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_sigaction.c,v 1.5 2017/01/13 21:30:41 christos Exp $");
-
#include <sys/wait.h>
#include <signal.h>
-/* $OpenBSD: t_sigaltstack.c,v 1.1 2021/09/02 12:40:44 mbuhl Exp $ */
+/* $OpenBSD: t_sigaltstack.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_sigaltstack.c,v 1.2 2020/05/01 21:35:30 christos Exp $ */
/*-
*/
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_sigaltstack.c,v 1.2 2020/05/01 21:35:30 christos Exp $");
-
#include <signal.h>
#include <stdbool.h>
-/* $OpenBSD: t_socketpair.c,v 1.1.1.1 2019/11/19 19:57:04 bluhm Exp $ */
+/* $OpenBSD: t_socketpair.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_socketpair.c,v 1.2 2017/01/13 20:04:52 christos Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_socketpair.c,v 1.2 2017/01/13 20:04:52 christos Exp $");
-
#include "atf-c.h"
#include <fcntl.h>
#include <unistd.h>
-/* $OpenBSD: t_stat.c,v 1.3 2020/11/09 23:18:51 bluhm Exp $ */
+/* $OpenBSD: t_stat.c,v 1.4 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_stat.c,v 1.6 2019/07/16 17:29:18 martin Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_stat.c,v 1.6 2019/07/16 17:29:18 martin Exp $");
-
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/types.h>
-/* $OpenBSD: t_syscall.c,v 1.3 2021/09/02 12:40:44 mbuhl Exp $ */
+/* $OpenBSD: t_syscall.c,v 1.4 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_syscall.c,v 1.4 2021/01/18 05:44:20 simonb Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_syscall.c,v 1.4 2021/01/18 05:44:20 simonb Exp $");
-
-
#include "atf-c.h"
#include <stdio.h>
#include <unistd.h>
-/* $OpenBSD: t_truncate.c,v 1.2 2021/10/24 21:24:20 deraadt Exp $ */
+/* $OpenBSD: t_truncate.c,v 1.3 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_truncate.c,v 1.3 2017/01/13 20:03:51 christos Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_truncate.c,v 1.3 2017/01/13 20:03:51 christos Exp $");
-
#include <sys/stat.h>
#include "atf-c.h"
-/* $OpenBSD: t_umask.c,v 1.1.1.1 2019/11/19 19:57:04 bluhm Exp $ */
+/* $OpenBSD: t_umask.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_umask.c,v 1.2 2017/01/13 19:34:19 christos Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_umask.c,v 1.2 2017/01/13 19:34:19 christos Exp $");
-
#include <sys/stat.h>
#include <sys/wait.h>
-/* $OpenBSD: t_unlink.c,v 1.1.1.1 2019/11/19 19:57:04 bluhm Exp $ */
+/* $OpenBSD: t_unlink.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_unlink.c,v 1.4 2017/01/14 20:55:26 christos Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_unlink.c,v 1.4 2017/01/14 20:55:26 christos Exp $");
-
#include <sys/stat.h>
#include "atf-c.h"
-/* $OpenBSD: t_wait_noproc.c,v 1.1 2021/09/02 12:40:44 mbuhl Exp $ */
+/* $OpenBSD: t_wait_noproc.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_wait_noproc.c,v 1.5 2016/11/09 17:50:19 kamil Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_wait_noproc.c,v 1.5 2016/11/09 17:50:19 kamil Exp $");
-
#include <sys/wait.h>
#include <sys/resource.h>
-/* $OpenBSD: t_write.c,v 1.3 2020/11/09 23:18:51 bluhm Exp $ */
+/* $OpenBSD: t_write.c,v 1.4 2021/12/13 16:56:48 deraadt Exp $ */
/* $NetBSD: t_write.c,v 1.7 2019/07/16 17:29:18 martin Exp $ */
/*-
#include "macros.h"
-#include <sys/cdefs.h>
-__COPYRIGHT("@(#) Copyright (c) 2008\
- The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_write.c,v 1.7 2019/07/16 17:29:18 martin Exp $");
-
#include <sys/uio.h>
#include <sys/mman.h>
-/* $OpenBSD: cexp_test.c,v 1.1 2021/10/22 18:00:22 mbuhl Exp $ */
+/* $OpenBSD: cexp_test.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/*-
* Copyright (c) 2008-2011 David Schultz <das@FreeBSD.org>
* All rights reserved.
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/param.h>
+#include <sys/types.h>
#include <complex.h>
#include <fenv.h>
-/* $OpenBSD: csqrt_test.c,v 1.1 2021/10/22 18:00:22 mbuhl Exp $ */
+/* $OpenBSD: csqrt_test.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/*-
* Copyright (c) 2007 David Schultz <das@FreeBSD.org>
* All rights reserved.
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/param.h>
+#include <sys/types.h>
#include <complex.h>
#include <float.h>
-/* $OpenBSD: ctrig_test.c,v 1.1 2021/10/22 18:00:22 mbuhl Exp $ */
+/* $OpenBSD: ctrig_test.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/*-
* Copyright (c) 2008-2011 David Schultz <das@FreeBSD.org>
* All rights reserved.
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/param.h>
+#include <sys/types.h>
#include <complex.h>
#include <fenv.h>
#include <float.h>
-/* $OpenBSD: fma_test.c,v 1.1 2021/10/22 18:00:22 mbuhl Exp $ */
+/* $OpenBSD: fma_test.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/*-
* Copyright (c) 2008 David Schultz <das@FreeBSD.org>
* All rights reserved.
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/param.h>
+#include <sys/types.h>
#include <fenv.h>
#include <float.h>
#include <math.h>
-/* $OpenBSD: invctrig_test.c,v 1.1 2021/10/22 18:00:22 mbuhl Exp $ */
+/* $OpenBSD: invctrig_test.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/*-
* Copyright (c) 2008-2013 David Schultz <das@FreeBSD.org>
* All rights reserved.
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/param.h>
+#include <sys/types.h>
#include <complex.h>
#include <fenv.h>
#include <float.h>
-/* $OpenBSD: logarithm_test.c,v 1.1 2021/10/22 18:00:22 mbuhl Exp $ */
+/* $OpenBSD: logarithm_test.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/*-
* Copyright (c) 2008-2010 David Schultz <das@FreeBSD.org>
* All rights reserved.
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/param.h>
+#include <sys/types.h>
#include <fenv.h>
#include <float.h>
#include <math.h>
-/* $OpenBSD: macros.h,v 1.1 2021/10/22 18:00:22 mbuhl Exp $ */
+/* $OpenBSD: macros.h,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/* Public domain - Moritz Buhl */
#define __FBSDID(a)
#define rounddown(x, y) (((x)/(y))*(y))
#define fpequal(a, b) fpequal_cs(a, b, 1)
#define hexdump(...)
+
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
-/* $OpenBSD: nan_test.c,v 1.1 2021/10/22 18:00:23 mbuhl Exp $ */
+/* $OpenBSD: nan_test.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/*-
* Copyright (C) 2007 David Schultz <das@FreeBSD.org>
* All rights reserved.
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/param.h>
+#include <sys/types.h>
#include <fenv.h>
#include <float.h>
#include <locale.h>
-/* $OpenBSD: nearbyint_test.c,v 1.1 2021/10/22 18:00:23 mbuhl Exp $ */
+/* $OpenBSD: nearbyint_test.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/*-
* Copyright (c) 2010 David Schultz <das@FreeBSD.org>
* All rights reserved.
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/param.h>
+#include <sys/types.h>
#include <fenv.h>
#include <math.h>
#include <stdio.h>
-/* $OpenBSD: trig_test.c,v 1.1 2021/10/22 18:00:23 mbuhl Exp $ */
+/* $OpenBSD: trig_test.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
/*-
* Copyright (c) 2008 David Schultz <das@FreeBSD.org>
* All rights reserved.
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/param.h>
+#include <sys/types.h>
#include <fenv.h>
#include <float.h>
-/* $OpenBSD: cwd.c,v 1.2 2001/09/20 16:43:15 todd Exp $ */
+/* $OpenBSD: cwd.c,v 1.3 2021/12/13 16:56:48 deraadt Exp $ */
/*
* Copyright (c) 1993, 1994, 1995, 1996 by Chris Provenzano and contributors,
* proven@mit.edu All rights reserved.
*/
#include <stdio.h>
-#include <sys/param.h>
#include <stdlib.h>
#include <unistd.h>
+#include <limits.h>
#include "test.h"
int
main(int argc, char **argv)
{
- char wd[MAXPATHLEN];
+ char wd[PATH_MAX];
char *path;
ASSERT(path = getcwd(wd, sizeof wd));
-/* $OpenBSD: test_parser_fuzz.c,v 1.4 2020/09/21 20:10:14 tobhe Exp $ */
+/* $OpenBSD: test_parser_fuzz.c,v 1.5 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Fuzz tests for payload parsing
*
*/
#include <sys/socket.h>
-#include <sys/param.h>
#include <sys/queue.h>
#include <sys/uio.h>
-/* $OpenBSD: cryptotest.c,v 1.2 2016/09/02 16:54:28 mikeb Exp $ */
+/* $OpenBSD: cryptotest.c,v 1.3 2021/12/13 16:56:49 deraadt Exp $ */
/* $EOM: cryptotest.c,v 1.5 1998/10/07 16:40:49 niklas Exp $ */
/*
* This code was written under funding by Ericsson Radio Systems.
*/
-#include <sys/param.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
-/* $OpenBSD: hmactest.c,v 1.1 2005/04/08 17:12:49 cloder Exp $ */
+/* $OpenBSD: hmactest.c,v 1.2 2021/12/13 16:56:49 deraadt Exp $ */
/* $EOM: hmactest.c,v 1.3 1998/08/09 19:16:24 niklas Exp $ */
/*
* This code was written under funding by Ericsson Radio Systems.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-/* $OpenBSD: prftest.c,v 1.2 2016/09/04 17:47:37 mikeb Exp $ */
+/* $OpenBSD: prftest.c,v 1.3 2021/12/13 16:56:49 deraadt Exp $ */
/* $EOM: prftest.c,v 1.2 1998/10/07 16:40:50 niklas Exp $ */
/*
* This code was written under funding by Ericsson Radio Systems.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-/* $OpenBSD: x509test.c,v 1.2 2014/11/18 20:51:00 krw Exp $ */
+/* $OpenBSD: x509test.c,v 1.3 2021/12/13 16:56:49 deraadt Exp $ */
/* $EOM: x509test.c,v 1.9 2000/12/21 15:24:25 ho Exp $ */
/*
* isakmpd.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
-/* $OpenBSD: dump_tables.c,v 1.6 2019/04/23 04:46:03 guenther Exp $ */
+/* $OpenBSD: dump_tables.c,v 1.7 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Copyright (c) 2019 Philip Guenther <guenther@openbsd.org>
*
* Requires "kern.allowkmem=1" sysctl
*/
-#include <sys/param.h>
+#include <sys/param.h> /* PAGE_SIZE and other things */
#include <sys/sysctl.h>
#include <sys/time.h>
#include <uvm/uvm_extern.h>
-/* $OpenBSD: fdfl.c,v 1.1.1.1 2018/08/21 18:35:18 bluhm Exp $ */
+/* $OpenBSD: fdfl.c,v 1.2 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Copyright (c) 2018 Alexander Bluhm <bluhm@openbsd.org>
*
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <fenv.h>
#include <stdio.h>
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+
int
main(int argc, char *argv[])
{
-/* $OpenBSD: fdump.c,v 1.1.1.1 2018/08/21 18:35:18 bluhm Exp $ */
+/* $OpenBSD: fdump.c,v 1.2 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Copyright (c) 2018 Alexander Bluhm <bluhm@openbsd.org>
*
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <err.h>
#include <fenv.h>
#include <stdio.h>
#include <unistd.h>
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+
int
main(int argc, char *argv[])
{
-/* $OpenBSD: feget.c,v 1.1.1.1 2018/08/21 18:35:18 bluhm Exp $ */
+/* $OpenBSD: feget.c,v 1.2 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Copyright (c) 2018 Alexander Bluhm <bluhm@openbsd.org>
*
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <err.h>
#include <fenv.h>
#include <stdio.h>
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+
int
main(int argc, char *argv[])
{
-/* $OpenBSD: fxproc0.c,v 1.1.1.1 2018/08/21 18:35:18 bluhm Exp $ */
+/* $OpenBSD: fxproc0.c,v 1.2 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Copyright (c) 2018 Alexander Bluhm <bluhm@openbsd.org>
*
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/signal.h>
#include <sys/proc.h>
#include <sys/user.h>
#include <machine/fpu.h>
#include <stdlib.h>
#include <unistd.h>
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+
void __dead usage(void);
void fenv_proc(kvm_t *, unsigned long);
-/* $OpenBSD: probe.c,v 1.3 2017/01/13 15:28:02 kettenis Exp $ */
+/* $OpenBSD: probe.c,v 1.4 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Written by Michael Shalayeff, 2004. Public Domain.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <signal.h>
#include <unistd.h>
#include <stdio.h>
-/* $OpenBSD: sfuid.c,v 1.3 2017/01/13 15:28:02 kettenis Exp $ */
+/* $OpenBSD: sfuid.c,v 1.4 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Written by Michael Shalayeff, 2004. Public Domain.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <signal.h>
#include <unistd.h>
#include <stdio.h>
-/* $OpenBSD: copy.c,v 1.5 2016/08/19 01:37:50 deraadt Exp $ */
+/* $OpenBSD: copy.c,v 1.6 2021/12/13 16:56:49 deraadt Exp $ */
/* Written by Ted Unangst 2004 Public Domain */
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/mount.h>
#include <sys/sysctl.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/syslimits.h>
-/* $OpenBSD: aestest.c,v 1.4 2017/04/30 21:34:45 mikeb Exp $ */
+/* $OpenBSD: aestest.c,v 1.5 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Copyright (c) 2002 Markus Friedl. All rights reserved.
* Dr Brian Gladman: http://fp.gladman.plus.com/AES/
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <crypto/aes.h>
#include <err.h>
#include <stdio.h>
-/* $OpenBSD: aesctr.c,v 1.3 2017/05/02 11:46:00 mikeb Exp $ */
+/* $OpenBSD: aesctr.c,v 1.4 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Copyright (c) 2005 Markus Friedl <markus@openbsd.org>
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <crypto/aes.h>
#include <err.h>
#include <stdio.h>
-/* $OpenBSD: chachapoly_test.c,v 1.1 2015/11/03 01:46:08 mikeb Exp $ */
+/* $OpenBSD: chachapoly_test.c,v 1.2 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Copyright (c) 2010,2015 Mike Belopuhov <mikeb@openbsd.org>
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <crypto/chachapoly.h>
#include <err.h>
#include <errno.h>
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <crypto/aes.h>
#include <crypto/cmac.h>
#include <stdio.h>
-/* $OpenBSD: des3.c,v 1.9 2014/08/15 15:13:38 mikeb Exp $ */
+/* $OpenBSD: des3.c,v 1.10 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Copyright (c) 2002 Markus Friedl. All rights reserved.
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <openssl/des.h>
#include <err.h>
#include <fcntl.h>
-/* $OpenBSD: gmac_test.c,v 1.5 2017/05/02 11:46:00 mikeb Exp $ */
+/* $OpenBSD: gmac_test.c,v 1.6 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Copyright (c) 2010 Mike Belopuhov <mikeb@openbsd.org>
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <crypto/aes.h>
#include <crypto/gmac.h>
#include <err.h>
-/* $OpenBSD: fstest.c,v 1.6 2017/01/12 01:12:56 bluhm Exp $ */
+/* $OpenBSD: fstest.c,v 1.7 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Copyright (c) 2006-2007 Pawel Jakub Dawidek <pjd@FreeBSD.org>
* $FreeBSD: src/tools/regression/fstest/fstest.c,v 1.1 2007/01/17 01:42:07 pjd Exp $
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <errno.h>
-/* $OpenBSD: accept.c,v 1.5 2015/01/19 00:22:30 guenther Exp $ */
+/* $OpenBSD: accept.c,v 1.6 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Written by Artur Grabowski <art@openbsd.org>, 2002 Public Domain.
*/
-#include <sys/param.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/wait.h>
-/* $OpenBSD: monotonicrelapse.c,v 1.2 2019/06/17 08:19:30 anton Exp $ */
+/* $OpenBSD: monotonicrelapse.c,v 1.3 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Scott Cheloha <scottcheloha@gmail.com>, 2019. Public Domain.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/sysctl.h>
#include <sys/time.h>
-/* $OpenBSD: kqueue-random.c,v 1.11 2018/04/26 15:55:14 guenther Exp $ */
+/* $OpenBSD: kqueue-random.c,v 1.12 2021/12/13 16:56:49 deraadt Exp $ */
/* Written by Michael Shalayeff, 2002, Public Domain */
-#include <sys/param.h> /* MIN() */
+#include <sys/types.h>
#include <sys/event.h>
#include <err.h>
#include "main.h"
+#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
+
int
do_random(void)
{
n = kevent(kq, NULL, 0, &ev, 1, &ts);
ASSX(n >= 0);
- n = MIN((ev.data + 7) / 8, sizeof(buf));
+ n = MINIMUM((ev.data + 7) / 8, sizeof(buf));
ASSX(read(fd, buf, n) > 0);
close(kq);
-/* $OpenBSD: mbuftest.c,v 1.2 2007/05/29 17:58:02 david Exp $ */
+/* $OpenBSD: mbuftest.c,v 1.3 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Copyright (c) 2003 Jason L. Wright (jason@thought.net)
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/mbuf.h>
#include <stdio.h>
#include <err.h>
-/* $OpenBSD: noexec.c,v 1.20 2019/05/10 15:57:39 visa Exp $ */
+/* $OpenBSD: noexec.c,v 1.21 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Copyright (c) 2002,2003 Michael Shalayeff
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/mman.h>
#include <unistd.h>
#include <stdio.h>
-/* $OpenBSD: unfdpass.c,v 1.1 2017/01/26 04:58:08 benno Exp $ */
+/* $OpenBSD: unfdpass.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/* $NetBSD: unfdpass.c,v 1.3 1998/06/24 23:51:30 thorpej Exp $ */
/*-
* is then used for ioctl()
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-/* $OpenBSD: macros.h,v 1.1 2020/02/28 12:48:30 mpi Exp $ */
+/* $OpenBSD: macros.h,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/* Public domain - Moritz Buhl */
-#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stdint.h>
#include <sys/sysctl.h>
#include <string.h>
#include <stdio.h>
-#define __FBSDID(str)
-#define __RCSID(str)
-#define __COPYRIGHT(str)
-
#define __arraycount(_a) nitems(_a)
#define __unreachable() atf_tc_fail("unreachable")
#define __UNCONST(a) (a)
-/* $OpenBSD: ptrace_test.c,v 1.3 2020/04/03 13:17:12 jca Exp $ */
+/* $OpenBSD: ptrace_test.c,v 1.4 2021/12/13 16:56:50 deraadt Exp $ */
/*-
* Copyright (c) 2015 John Baldwin <jhb@FreeBSD.org>
#include "macros.h"
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <sys/types.h>
#include <sys/event.h>
#include <sys/file.h>
#include <sys/time.h>
+#include <sys/signal.h>
#include <sys/proc.h>
#include <sys/ptrace.h>
#include <sys/queue.h>
#include <unistd.h>
#include "atf-c.h"
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+
/*
* A variant of ATF_REQUIRE that is suitable for use in child
* processes. This only works if the parent process is tripped up by
-/* $OpenBSD: rcvtimeo.c,v 1.5 2014/07/19 18:11:12 miod Exp $ */
+/* $OpenBSD: rcvtimeo.c,v 1.6 2021/12/13 16:56:50 deraadt Exp $ */
/* Written by Michael Shalayeff, 2002, Public Domain */
-#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.h>
-/* $OpenBSD: setegid.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setegid.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: seteuid.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: seteuid.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: setgid.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setgid.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: setgid_child.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setgid_child.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: setgid_exec_inherit.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setgid_exec_inherit.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: setgid_none.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setgid_none.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: setresgid.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setresgid.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: setresgid_effective_exec.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setresgid_effective_exec.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: setresgid_real_exec.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setresgid_real_exec.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: setresgid_saved_exec.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setresgid_saved_exec.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: setresuid.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setresuid.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: setresuid_effective_exec.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setresuid_effective_exec.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: setresuid_real_exec.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setresuid_real_exec.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: setresuid_saved_exec.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setresuid_saved_exec.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: setuid.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setuid.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: setuid_child.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setuid_child.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: setuid_exec_inherit.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setuid_exec_inherit.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: setuid_none.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setuid_none.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: setuid_real_exec.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: setuid_real_exec.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: sgidexec.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: sgidexec.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: sgidexec_inherit.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: sgidexec_inherit.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: sgidexec_none.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: sgidexec_none.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: suidexec.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: suidexec.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: suidexec_inherit.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: suidexec_inherit.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: suidexec_none.c,v 1.1 2014/08/27 07:36:14 blambert Exp $ */
+/* $OpenBSD: suidexec_none.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Written by Bret Stephen Lambert <blambert@openbsd.org> 2014
* Public Domain.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
-/* $OpenBSD: cansig.c,v 1.1 2008/06/10 18:04:31 hshoexer Exp $ */
+/* $OpenBSD: cansig.c,v 1.2 2021/12/13 16:56:50 deraadt Exp $ */
/* Written by Michael Shalayeff, 2008. Public Domain */
-#include <sys/param.h>
+#include <sys/types.h>
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
-/* $OpenBSD: msgtest.c,v 1.6 2008/06/26 05:42:06 ray Exp $ */
+/* $OpenBSD: msgtest.c,v 1.7 2021/12/13 16:56:50 deraadt Exp $ */
/* $NetBSD: msgtest.c,v 1.6 2001/02/19 22:44:41 cgd Exp $ */
/*-
* Test the SVID-compatible Message Queue facility.
*/
-#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <sys/wait.h>
* Test the SVID-compatible Semaphore facility.
*/
-#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <sys/wait.h>
* Test the SVID-compatible Shared Memory facility.
*/
-#include <sys/param.h>
#include <sys/ipc.h>
#include <sys/mman.h>
#include <sys/shm.h>
-/* $OpenBSD: unfdpass.c,v 1.21 2021/10/24 21:24:20 deraadt Exp $ */
+/* $OpenBSD: unfdpass.c,v 1.22 2021/12/13 16:56:50 deraadt Exp $ */
/* $NetBSD: unfdpass.c,v 1.3 1998/06/24 23:51:30 thorpej Exp $ */
/*-
* Test passing of file descriptors over Unix domain sockets and socketpairs.
*/
-#include <sys/param.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/wait.h>
-/* $OpenBSD: syscalls.c,v 1.30 2021/08/30 09:09:21 claudio Exp $ */
+/* $OpenBSD: syscalls.c,v 1.31 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Copyright (c) 2017-2019 Bob Beck <beck@openbsd.org>
#include <sys/errno.h>
#include <sys/wait.h>
#include <sys/stat.h>
-#include <sys/param.h>
#include <sys/mount.h>
pid_t child;
-/* $OpenBSD: mmap-sysctl-copyin.c,v 1.2 2017/01/13 01:33:14 bluhm Exp $ */
+/* $OpenBSD: mmap-sysctl-copyin.c,v 1.3 2021/12/13 16:56:50 deraadt Exp $ */
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/mman.h>
#include <sys/queue.h>
#include <sys/socket.h>
#include <err.h>
#include <fcntl.h>
#include <stdlib.h>
+#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-/* $OpenBSD: mmap-sysctl-copyout.c,v 1.2 2017/01/13 01:33:14 bluhm Exp $ */
+/* $OpenBSD: mmap-sysctl-copyout.c,v 1.3 2021/12/13 16:56:50 deraadt Exp $ */
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/mman.h>
#include <sys/queue.h>
#include <sys/socket.h>
#include <err.h>
#include <fcntl.h>
#include <stdlib.h>
+#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-/* $OpenBSD: mmap_hint.c,v 1.5 2017/07/13 11:24:58 bluhm Exp $ */
+/* $OpenBSD: mmap_hint.c,v 1.6 2021/12/13 16:56:50 deraadt Exp $ */
/*
* Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl>
*
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
+#include <sys/param.h> /* PAGE_SIZE PAGE_MASK */
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/tree.h>
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <stdio.h>