s/u_short/unsigned short/ to make this compile if _POSIX_C_SOURCE=200112
Fix a few but probably not all style bugs. Suggested by: bde MFC after: 2 weeks
This commit is contained in:
parent
792ca19a6f
commit
a1e506308f
@ -15,25 +15,25 @@
|
||||
struct sem;
|
||||
|
||||
struct semid_ds {
|
||||
struct ipc_perm sem_perm; /* operation permission struct */
|
||||
struct sem *sem_base; /* pointer to first semaphore in set */
|
||||
u_short sem_nsems; /* number of sems in set */
|
||||
time_t sem_otime; /* last operation time */
|
||||
long sem_pad1; /* SVABI/386 says I need this here */
|
||||
time_t sem_ctime; /* last change time */
|
||||
/* Times measured in secs since */
|
||||
/* 00:00:00 GMT, Jan. 1, 1970 */
|
||||
long sem_pad2; /* SVABI/386 says I need this here */
|
||||
long sem_pad3[4]; /* SVABI/386 says I need this here */
|
||||
struct ipc_perm sem_perm; /* operation permission struct */
|
||||
struct sem *sem_base; /* pointer to first semaphore in set */
|
||||
unsigned short sem_nsems; /* number of sems in set */
|
||||
time_t sem_otime; /* last operation time */
|
||||
long sem_pad1; /* SVABI/386 says I need this here */
|
||||
time_t sem_ctime; /* last change time */
|
||||
/* Times measured in secs since */
|
||||
/* 00:00:00 GMT, Jan. 1, 1970 */
|
||||
long sem_pad2; /* SVABI/386 says I need this here */
|
||||
long sem_pad3[4]; /* SVABI/386 says I need this here */
|
||||
};
|
||||
|
||||
/*
|
||||
* semop's sops parameter structure
|
||||
*/
|
||||
struct sembuf {
|
||||
u_short sem_num; /* semaphore # */
|
||||
short sem_op; /* semaphore operation */
|
||||
short sem_flg; /* operation flags */
|
||||
unsigned short sem_num; /* semaphore # */
|
||||
short sem_op; /* semaphore operation */
|
||||
short sem_flg; /* operation flags */
|
||||
};
|
||||
#define SEM_UNDO 010000
|
||||
|
||||
@ -41,9 +41,9 @@ struct sembuf {
|
||||
* semctl's arg parameter structure
|
||||
*/
|
||||
union semun {
|
||||
int val; /* value for SETVAL */
|
||||
struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */
|
||||
u_short *array; /* array for GETALL & SETALL */
|
||||
int val; /* value for SETVAL */
|
||||
struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */
|
||||
unsigned short *array; /* array for GETALL & SETALL */
|
||||
};
|
||||
|
||||
/*
|
||||
@ -57,7 +57,7 @@ union semun {
|
||||
#define SETVAL 8 /* Set the value of semval to arg.val {ALTER} */
|
||||
#define SETALL 9 /* Set semvals from arg.array {ALTER} */
|
||||
#define SEM_STAT 10 /* Like IPC_STAT but treats semid as sema-index */
|
||||
#define SEM_INFO 11 /* Like IPC_INFO but treats semid as sema-index */
|
||||
#define SEM_INFO 11 /* Like IPC_INFO but treats semid as sema-index */
|
||||
|
||||
/*
|
||||
* Permissions
|
||||
@ -112,8 +112,8 @@ __BEGIN_DECLS
|
||||
int semsys(int, ...);
|
||||
int semctl(int, int, int, ...);
|
||||
int semget(key_t, int, int);
|
||||
int semop(int, struct sembuf *,size_t);
|
||||
int semop(int, struct sembuf *, size_t);
|
||||
__END_DECLS
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
#endif /* !_SEM_H_ */
|
||||
#endif /* !_SYS_SEM_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user