mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-27 04:41:02 +08:00
Include bits/types.h, not sys/types.h.
(MSG_EXCEPT): Only define if __USE_GNU. Define msgqnum_t and msglen_t and use them in struct msqid_ds definition.
This commit is contained in:
parent
6d70eeb43c
commit
40d4354938
@ -20,11 +20,17 @@
|
|||||||
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
|
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <bits/types.h>
|
||||||
|
|
||||||
/* Define options for message queue functions. */
|
/* Define options for message queue functions. */
|
||||||
#define MSG_NOERROR 010000 /* no error if message is too big */
|
#define MSG_NOERROR 010000 /* no error if message is too big */
|
||||||
|
#ifdef __USE_GNU
|
||||||
# define MSG_EXCEPT 020000 /* recv any msg except of specified type */
|
# define MSG_EXCEPT 020000 /* recv any msg except of specified type */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Types used in the structure definition. */
|
||||||
|
typedef unsigned long int msgqnum_t;
|
||||||
|
typedef unsigned long int msglen_t;
|
||||||
|
|
||||||
|
|
||||||
/* Structure of record for one message inside the kernel.
|
/* Structure of record for one message inside the kernel.
|
||||||
@ -36,8 +42,8 @@ struct msqid_ds
|
|||||||
__time_t msg_rtime; /* time of last msgrcv command */
|
__time_t msg_rtime; /* time of last msgrcv command */
|
||||||
__time_t msg_ctime; /* time of last change */
|
__time_t msg_ctime; /* time of last change */
|
||||||
unsigned long int __msg_cbytes; /* current number of bytes on queue */
|
unsigned long int __msg_cbytes; /* current number of bytes on queue */
|
||||||
unsigned long int msg_qnum; /* number of messages currently on queue */
|
msgqnum_t msg_qnum; /* number of messages currently on queue */
|
||||||
unsigned long int msg_qbytes; /* max number of bytes allowed on queue */
|
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
|
||||||
pid_t msg_lspid; /* pid of last msgsnd() */
|
pid_t msg_lspid; /* pid of last msgsnd() */
|
||||||
pid_t msg_lrpid; /* pid of last msgrcv() */
|
pid_t msg_lrpid; /* pid of last msgrcv() */
|
||||||
unsigned long int __unused1;
|
unsigned long int __unused1;
|
||||||
|
Loading…
Reference in New Issue
Block a user