From 17507760abd76f56cf10e40b906a05066093da2f Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Wed, 19 Jul 2017 22:10:11 +0200 Subject: [PATCH] : Clean up a bit. * This is only supposed to be included by the kernel. Error if _KERNEL isn't defined. * Adjust #endif comments. * Move include guard down. --- sys/sys/posix4.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sys/sys/posix4.h b/sys/sys/posix4.h index a165d5a5bc..f365caf737 100644 --- a/sys/sys/posix4.h +++ b/sys/sys/posix4.h @@ -1,5 +1,3 @@ -#ifndef _P1003_1B_P1003_1B_H_ -#define _P1003_1B_P1003_1B_H_ /*- * Copyright (c) 1996, 1997, 1998 * HD Associates, Inc. All rights reserved. @@ -32,9 +30,17 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/posix4/posix4.h,v 1.6 1999/12/27 10:22:09 bde Exp $ - * $DragonFly: src/sys/sys/posix4.h,v 1.8 2007/06/26 19:31:10 dillon Exp $ */ +#ifndef _P1003_1B_P1003_1B_H_ +#define _P1003_1B_P1003_1B_H_ + +#ifndef _KERNEL + +#error "This file should not be included by userland programs." + +#else + #include "opt_posix.h" #include @@ -99,4 +105,5 @@ int ksched_rr_get_interval(register_t *, struct ksched *, #endif /* _KPOSIX_PRIORITY_SCHEDULING */ -#endif /* _P1003_1B_P1003_1B_H_ */ +#endif /* !_KERNEL */ +#endif /* !_P1003_1B_P1003_1B_H_ */ -- 2.11.4.GIT