- 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
This commit is contained in:
parent
a341ab7170
commit
8a512df52a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=163506
@ -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_ */
|
||||
|
Loading…
Reference in New Issue
Block a user