From: Ulrich Drepper Date: Fri, 17 Mar 2000 03:30:55 +0000 (+0000) Subject: Define msgqnum_t and msglen_t and use them in struct msqid_s. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d90639de275e13350a9401780f2e6d63c118a46;p=thirdparty%2Fglibc.git Define msgqnum_t and msglen_t and use them in struct msqid_s. --- diff --git a/sysdeps/generic/bits/msq.h b/sysdeps/generic/bits/msq.h index a263869a0e1..59093700ae4 100644 --- a/sysdeps/generic/bits/msq.h +++ b/sysdeps/generic/bits/msq.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,14 +17,18 @@ Boston, MA 02111-1307, USA. */ #ifndef _SYS_MSG_H -#error "Never use directly; include instead." +# error "Never use directly; include instead." #endif -#include +#include /* Define options for message queue functions. */ #define MSG_NOERROR 010000 /* no error if message is too big */ +/* Types used in the structure definition. */ +typedef unsigned short int msgqnum_t; +typedef unsigned short int msglen_t; + /* Structure of record for one message inside the kernel. The type `struct __msg' is opaque. */ @@ -34,8 +38,8 @@ struct msqid_ds __time_t msg_stime; /* time of last msgsnd command */ __time_t msg_rtime; /* time of last msgrcv command */ __time_t msg_ctime; /* time of last change */ - unsigned short int msg_qnum; /* number of messages currently on queue */ - unsigned short int msg_qbytes;/* max number of bytes allowed on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ __pid_t msg_lspid; /* pid of last msgsnd() */ __pid_t msg_lrpid; /* pid of last msgrcv() */ }; diff --git a/sysdeps/gnu/bits/msq.h b/sysdeps/gnu/bits/msq.h index d7a8e5ee0f4..874c369d650 100644 --- a/sysdeps/gnu/bits/msq.h +++ b/sysdeps/gnu/bits/msq.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,11 +20,17 @@ # error "Never use directly; include instead." #endif -#include +#include /* Define options for message queue functions. */ #define MSG_NOERROR 010000 /* no error if message is too big */ -#define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +#ifdef __USE_GNU +# define MSG_EXCEPT 020000 /* recv any msg except of specified type */ +#endif + +/* Types used in the structure definition. */ +typedef unsigned short int msgqnum_t; +typedef unsigned short int msglen_t; /* Structure of record for one message inside the kernel. @@ -40,8 +46,8 @@ struct msqid_ds struct wait_queue *__wwait; /* ??? */ struct wait_queue *__rwait; /* ??? */ unsigned short int __msg_cbytes;/* current number of bytes on queue */ - unsigned short int msg_qnum; /* number of messages currently on queue */ - unsigned short int msg_qbytes;/* max number of bytes allowed on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ __ipc_pid_t msg_lspid; /* pid of last msgsnd() */ __ipc_pid_t msg_lrpid; /* pid of last msgrcv() */ };