diff options
author | jhb <jhb@FreeBSD.org> | 2006-10-19 14:36:41 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-10-19 14:36:41 +0000 |
commit | fdfc992d93258f355d457acf8ea17914c8b7c442 (patch) | |
tree | 42d37d5f2320d8db73f6f83fa45b42ad00f38ae7 /sys | |
parent | f22f76ff631ee4fb95c74d51fb1ff09792abd614 (diff) | |
download | FreeBSD-src-fdfc992d93258f355d457acf8ea17914c8b7c442.zip FreeBSD-src-fdfc992d93258f355d457acf8ea17914c8b7c442.tar.gz |
- Define time_t in sys/sem.h so it doesn't require sys/types.h.
- Move the pid_t, size_t, and time_t definitions earlier in the file, sort
them, and fix whitespace.
- Drop redundant includes of sys/cdefs.h and sys/_types.h as sys/ipc.h
already includes them.
PR: kern/104436
Reviewed by: bde
Reported by: clsung
MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/sem.h | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/sys/sys/sem.h b/sys/sys/sem.h index 9c96ddf..28b41a7 100644 --- a/sys/sys/sem.h +++ b/sys/sys/sem.h @@ -12,6 +12,21 @@ #include <sys/ipc.h> +#ifndef _PID_T_DECLARED +typedef __pid_t pid_t; +#define _PID_T_DECLARED +#endif + +#ifndef _SIZE_T_DECLARED +typedef __size_t size_t; +#define _SIZE_T_DECLARED +#endif + +#ifndef _TIME_T_DECLARED +typedef __time_t time_t; +#define _TIME_T_DECLARED +#endif + struct sem; struct semid_ds { @@ -100,21 +115,8 @@ struct semid_kernel { * Process sem_undo vectors at proc exit. */ void semexit(struct proc *p); -#endif /* _KERNEL */ -#ifndef _KERNEL -#include <sys/cdefs.h> -#include <sys/_types.h> - -#ifndef _SIZE_T_DECLARED -typedef __size_t size_t; -#define _SIZE_T_DECLARED -#endif - -#ifndef _PID_T_DECLARED -typedef __pid_t pid_t; -#define _PID_T_DECLARED -#endif +#else /* ! _KERNEL */ __BEGIN_DECLS int semsys(int, ...); @@ -122,6 +124,7 @@ int semctl(int, int, int, ...); int semget(key_t, int, int); int semop(int, struct sembuf *, size_t); __END_DECLS + #endif /* !_KERNEL */ #endif /* !_SYS_SEM_H_ */ |