summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/sys/t_getlogin.c
diff options
context:
space:
mode:
authorderaadt <>2021-12-13 16:56:48 +0000
committerderaadt <>2021-12-13 16:56:48 +0000
commit9021d14f9c0c87cbe273ab6f4fe8e4f48363f4f6 (patch)
tree4d79dae357e2afe076d7157a01ff32c7b7546acc /src/regress/lib/libc/sys/t_getlogin.c
parent29eb1fc4c6f8014bf067b8a9ade4cf476193f0d5 (diff)
downloadopenbsd-9021d14f9c0c87cbe273ab6f4fe8e4f48363f4f6.tar.gz
openbsd-9021d14f9c0c87cbe273ab6f4fe8e4f48363f4f6.tar.bz2
openbsd-9021d14f9c0c87cbe273ab6f4fe8e4f48363f4f6.zip
remove a couple hundred sys/param.h includes in userland code, and
also whack some sys/cdefs.h early includes which is such a brutally bad pattern ok bluhm mbuhl
Diffstat (limited to 'src/regress/lib/libc/sys/t_getlogin.c')
-rw-r--r--src/regress/lib/libc/sys/t_getlogin.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/regress/lib/libc/sys/t_getlogin.c b/src/regress/lib/libc/sys/t_getlogin.c
index 3c98cd7de8..b4f06fdee6 100644
--- a/src/regress/lib/libc/sys/t_getlogin.c
+++ b/src/regress/lib/libc/sys/t_getlogin.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t_getlogin.c,v 1.1.1.1 2019/11/19 19:57:03 bluhm Exp $ */ 1/* $OpenBSD: t_getlogin.c,v 1.2 2021/12/13 16:56:48 deraadt Exp $ */
2/* $NetBSD: t_getlogin.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */ 2/* $NetBSD: t_getlogin.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */
3 3
4/*- 4/*-
@@ -32,16 +32,13 @@
32 32
33#include "macros.h" 33#include "macros.h"
34 34
35#include <sys/cdefs.h>
36__RCSID("$NetBSD: t_getlogin.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $");
37
38#include <sys/param.h>
39#include <sys/wait.h> 35#include <sys/wait.h>
40 36
41#include "atf-c.h" 37#include "atf-c.h"
42#include <errno.h> 38#include <errno.h>
43#include <stdlib.h> 39#include <stdlib.h>
44#include <string.h> 40#include <string.h>
41#include <limits.h>
45#include <unistd.h> 42#include <unistd.h>
46 43
47ATF_TC(getlogin_r_err); 44ATF_TC(getlogin_r_err);
@@ -65,7 +62,7 @@ ATF_TC_HEAD(getlogin_same, tc)
65 62
66ATF_TC_BODY(getlogin_same, tc) 63ATF_TC_BODY(getlogin_same, tc)
67{ 64{
68 char buf[MAXLOGNAME]; 65 char buf[LOGIN_NAME_MAX];
69 char *str; 66 char *str;
70 67
71 str = getlogin(); 68 str = getlogin();
@@ -128,7 +125,7 @@ ATF_TC_HEAD(setlogin_err, tc)
128 125
129ATF_TC_BODY(setlogin_err, tc) 126ATF_TC_BODY(setlogin_err, tc)
130{ 127{
131 char buf[MAXLOGNAME + 1]; 128 char buf[LOGIN_NAME_MAX + 1];
132 char *name; 129 char *name;
133 pid_t pid; 130 pid_t pid;
134 int sta; 131 int sta;