Change the return type of msgrcv() to ssize_t as required by POSIX.
It looks like the msgrcv() system call is already written in such a way that the size is internally computed as a size_t and written into all of td_retval[0]. This means that it is effectively already returning ssize_t. It's just that the userspace prototype doesn't match up.
This commit is contained in:
parent
910e26641a
commit
4eb594a8c4
@ -31,7 +31,7 @@
|
|||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.\"/
|
.\"/
|
||||||
.Dd July 9, 2009
|
.Dd July 28, 2016
|
||||||
.Dt MSGRCV 2
|
.Dt MSGRCV 2
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -43,7 +43,7 @@
|
|||||||
.In sys/types.h
|
.In sys/types.h
|
||||||
.In sys/ipc.h
|
.In sys/ipc.h
|
||||||
.In sys/msg.h
|
.In sys/msg.h
|
||||||
.Ft int
|
.Ft ssize_t
|
||||||
.Fn msgrcv "int msqid" "void *msgp" "size_t msgsz" "long msgtyp" "int msgflg"
|
.Fn msgrcv "int msqid" "void *msgp" "size_t msgsz" "long msgtyp" "int msgflg"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The
|
The
|
||||||
|
@ -428,7 +428,7 @@
|
|||||||
225 AUE_MSGGET NOSTD { int msgget(key_t key, int msgflg); }
|
225 AUE_MSGGET NOSTD { int msgget(key_t key, int msgflg); }
|
||||||
226 AUE_MSGSND NOSTD { int msgsnd(int msqid, const void *msgp, \
|
226 AUE_MSGSND NOSTD { int msgsnd(int msqid, const void *msgp, \
|
||||||
size_t msgsz, int msgflg); }
|
size_t msgsz, int msgflg); }
|
||||||
227 AUE_MSGRCV NOSTD { int msgrcv(int msqid, void *msgp, \
|
227 AUE_MSGRCV NOSTD { ssize_t msgrcv(int msqid, void *msgp, \
|
||||||
size_t msgsz, long msgtyp, int msgflg); }
|
size_t msgsz, long msgtyp, int msgflg); }
|
||||||
228 AUE_SHMAT NOSTD { int shmat(int shmid, const void *shmaddr, \
|
228 AUE_SHMAT NOSTD { int shmat(int shmid, const void *shmaddr, \
|
||||||
int shmflg); }
|
int shmflg); }
|
||||||
|
@ -169,8 +169,7 @@ struct msqid_kernel {
|
|||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
int msgctl(int, int, struct msqid_ds *);
|
int msgctl(int, int, struct msqid_ds *);
|
||||||
int msgget(key_t, int);
|
int msgget(key_t, int);
|
||||||
/* XXX return value should be ssize_t. */
|
ssize_t msgrcv(int, void *, size_t, long, int);
|
||||||
int msgrcv(int, void *, size_t, long, int);
|
|
||||||
int msgsnd(int, const void *, size_t, int);
|
int msgsnd(int, const void *, size_t, int);
|
||||||
#if __BSD_VISIBLE
|
#if __BSD_VISIBLE
|
||||||
int msgsys(int, ...);
|
int msgsys(int, ...);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user