From: op Date: Tue, 30 Apr 2024 17:03:05 +0000 (+0000) Subject: add typedefs for msgqnum_t and msglen_t, required by POSIX. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=573d4f351487c847ca941b5f4bffed07d65862a9;p=openbsd add typedefs for msgqnum_t and msglen_t, required by POSIX. improvements from kettenis and jca ok millert, jca, guenther --- diff --git a/lib/libc/sys/msgctl.2 b/lib/libc/sys/msgctl.2 index f14360ea504..f041c78de0b 100644 --- a/lib/libc/sys/msgctl.2 +++ b/lib/libc/sys/msgctl.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: msgctl.2,v 1.18 2019/07/18 13:32:40 schwarze Exp $ +.\" $OpenBSD: msgctl.2,v 1.19 2024/04/30 17:03:14 op Exp $ .\" $NetBSD: msgctl.2,v 1.2 1997/03/27 08:20:35 mikel Exp $ .\" .\" Copyright (c) 1995 Frank van der Linden @@ -30,7 +30,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\"/ -.Dd $Mdocdate: July 18 2019 $ +.Dd $Mdocdate: April 30 2024 $ .Dt MSGCTL 2 .Os .Sh NAME @@ -58,9 +58,9 @@ and contains (amongst others) the following members: .Bd -literal struct msqid_ds { struct ipc_perm msg_perm; /* msg queue permission bits */ - u_long msg_cbytes; /* # of bytes in use on the queue */ - u_long msg_qnum; /* # of msgs in the queue */ - u_long msg_qbytes; /* max # of bytes on the queue */ + msglen_t msg_cbytes; /* # of bytes in use on the queue */ + msgqnum_t msg_qnum; /* # of msgs in the queue */ + msglen_t msg_qbytes; /* max # of bytes on the queue */ pid_t msg_lspid; /* pid of last msgsnd() */ pid_t msg_lrpid; /* pid of last msgrcv() */ time_t msg_stime; /* time of last msgsnd() */ diff --git a/sys/sys/msg.h b/sys/sys/msg.h index d7ebe4684b5..f93c27b92be 100644 --- a/sys/sys/msg.h +++ b/sys/sys/msg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: msg.h,v 1.20 2022/09/16 15:57:23 mbuhl Exp $ */ +/* $OpenBSD: msg.h,v 1.21 2024/04/30 17:03:05 op Exp $ */ /* $NetBSD: msg.h,v 1.9 1996/02/09 18:25:18 christos Exp $ */ /* @@ -32,13 +32,16 @@ #define MSG_NOERROR 010000 /* don't complain about too long msgs */ +typedef unsigned long msgqnum_t; +typedef unsigned long msglen_t; + struct msqid_ds { struct ipc_perm msg_perm; /* msg queue permission bits */ struct msg *msg_first; /* first message in the queue */ struct msg *msg_last; /* last message in the queue */ - unsigned long msg_cbytes; /* number of bytes in use on the queue */ - unsigned long msg_qnum; /* number of msgs in the queue */ - unsigned long msg_qbytes; /* max # of bytes on the queue */ + msglen_t msg_cbytes; /* number of bytes in use on the queue */ + msgqnum_t msg_qnum; /* number of msgs in the queue */ + msglen_t msg_qbytes; /* max # of bytes on the queue */ pid_t msg_lspid; /* pid of last msgsnd() */ pid_t msg_lrpid; /* pid of last msgrcv() */ time_t msg_stime; /* time of last msgsnd() */