From e26f1e46658d61add90d00f3e5b615f3626a465e Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 27 Oct 2018 08:26:44 +0200 Subject: [PATCH] : Put the enum name under __BSD_VISIBLE. POSIX only defines idtype_t. In i just left it because that whole file isn't covered by the standard anyway. While here, cleanup whitespace a little bit and clarify DragonFly or FreeBSD a bit better in a comment. --- sys/sys/wait.h | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/sys/sys/wait.h b/sys/sys/wait.h index ebd7646c6d..a4960d2132 100644 --- a/sys/sys/wait.h +++ b/sys/sys/wait.h @@ -78,10 +78,10 @@ #define WNOHANG 0x0001 /* don't hang in wait */ #define WUNTRACED 0x0002 /* tell about stopped, untraced children */ #define WCONTINUED 0x0004 /* Report a job control continued process. */ -#define WSTOPPED WUNTRACED -#define WNOWAIT 0x0008 -#define WEXITED 0x0010 -#define WTRAPPED 0x0020 +#define WSTOPPED WUNTRACED +#define WNOWAIT 0x0008 +#define WEXITED 0x0010 +#define WTRAPPED 0x0020 #if __BSD_VISIBLE #define WLINUXCLONE 0x80000000 /* wait for kthread spawned from linux_clone */ @@ -94,22 +94,26 @@ #endif /* __BSD_VISIBLE */ #ifndef _ID_T_DECLARED -#define _ID_T_DECLARED -typedef __int64_t id_t; /* general id, can hold gid/pid/uid_t */ +#define _ID_T_DECLARED +typedef __int64_t id_t; /* general id, can hold gid/pid/uid_t */ #endif #ifndef _IDTYPE_T_DECLARED -#define _IDTYPE_T_DECLARED +#define _IDTYPE_T_DECLARED /* SEE ALSO SYS/PROCCTL.H */ -typedef enum idtype { +typedef enum +#if __BSD_VISIBLE + idtype +#endif +{ /* * These names were mostly lifted from Solaris source code and * still use Solaris style naming to avoid breaking any - * OpenSolaris code which has been ported to FreeBSD. There - * is no clear FreeBSD counterpart for all of the names, but - * some have a clear correspondence to FreeBSD entities. + * OpenSolaris code which has been ported to FreeBSD/DragonFly. + * There is no clear DragonFly counterpart for all of the names, but + * some have a clear correspondence to DragonFly entities. * * The numerical values are kept synchronized with the Solaris * values. -- 2.11.4.GIT