Date: Sat, 25 Jan 2003 14:07:33 -0500 (EST) From: Craig Rodrigues <rodrigc@attbi.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: standards/47469: Update <sys/shm.h> prototypes to POSIX standard Message-ID: <200301251907.h0PJ7XSF060476@h00609772adf0.ne.client2.attbi.com>
index | next in thread | raw e-mail
>Number: 47469
>Category: standards
>Synopsis: Update <sys/shm.h> prototypes to POSIX standard
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-standards
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Sat Jan 25 11:10:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Craig Rodrigues
>Release: FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD h00609772adf0.ne.client2.attbi.com 5.0-CURRENT FreeBSD 5.0-CURRENT #13: Fri Jan 3 13:39:46 EST 2003 rodrigc@h00609772adf0.ne.client2.attbi.com:/usr/obj/usr/src/sys/MYKERNEL1 i386
>Description:
Update <sys/shm.h> prototypes to POSIX standard.
Change:
void *shmat(int, void *, int);
int shmget(key_t, int, int);
int shmdt(void *);
to:
void *shmat(int, const void *, int);
int shmget(key_t, size_t, int);
int shmdt(const void *);
>How-To-Repeat:
>Fix:
Index: lib/libc/sys/shmat.2
===================================================================
RCS file: /home/ncvs/src/lib/libc/sys/shmat.2,v
retrieving revision 1.16
diff -u -r1.16 shmat.2
--- lib/libc/sys/shmat.2 2002/12/19 09:40:25 1.16
+++ lib/libc/sys/shmat.2 2003/01/25 19:01:08
@@ -40,9 +40,9 @@
.In sys/ipc.h
.In sys/shm.h
.Ft void *
-.Fn shmat "int shmid" "void *addr" "int flag"
+.Fn shmat "int shmid" "const void *addr" "int flag"
.Ft int
-.Fn shmdt "void *addr"
+.Fn shmdt "const void *addr"
.Sh DESCRIPTION
The
.Fn shmat
Index: lib/libc/sys/shmget.2
===================================================================
RCS file: /home/ncvs/src/lib/libc/sys/shmget.2,v
retrieving revision 1.16
diff -u -r1.16 shmget.2
--- lib/libc/sys/shmget.2 2002/12/19 09:40:25 1.16
+++ lib/libc/sys/shmget.2 2003/01/25 19:01:08
@@ -39,7 +39,7 @@
.In sys/ipc.h
.In sys/shm.h
.Ft int
-.Fn shmget "key_t key" "int size" "int flag"
+.Fn shmget "key_t key" "size_t size" "int flag"
.Sh DESCRIPTION
Based on the values of
.Fa key
Index: sys/kern/syscalls.master
===================================================================
RCS file: /home/ncvs/src/sys/kern/syscalls.master,v
retrieving revision 1.140
diff -u -r1.140 syscalls.master
--- sys/kern/syscalls.master 2003/01/04 11:41:12 1.140
+++ sys/kern/syscalls.master 2003/01/25 19:01:09
@@ -361,11 +361,11 @@
int msgflg); }
227 MNOSTD BSD { int msgrcv(int msqid, void *msgp, size_t msgsz, \
long msgtyp, int msgflg); }
-228 MNOSTD BSD { int shmat(int shmid, void *shmaddr, int shmflg); }
+228 MNOSTD BSD { int shmat(int shmid, const void *shmaddr, int shmflg); }
229 MNOSTD BSD { int shmctl(int shmid, int cmd, \
struct shmid_ds *buf); }
-230 MNOSTD BSD { int shmdt(void *shmaddr); }
-231 MNOSTD BSD { int shmget(key_t key, int size, int shmflg); }
+230 MNOSTD BSD { int shmdt(const void *shmaddr); }
+231 MNOSTD BSD { int shmget(key_t key, size_t size, int shmflg); }
;
232 MSTD POSIX { int clock_gettime(clockid_t clock_id, \
struct timespec *tp); }
Index: sys/kern/sysv_shm.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/sysv_shm.c,v
retrieving revision 1.77
diff -u -r1.77 sysv_shm.c
--- sys/kern/sysv_shm.c 2003/01/21 08:55:55 1.77
+++ sys/kern/sysv_shm.c 2003/01/25 19:01:10
@@ -240,7 +240,7 @@
#ifndef _SYS_SYSPROTO_H_
struct shmdt_args {
- void *shmaddr;
+ const void *shmaddr;
};
#endif
@@ -284,7 +284,7 @@
#ifndef _SYS_SYSPROTO_H_
struct shmat_args {
int shmid;
- void *shmaddr;
+ const void *shmaddr;
int shmflg;
};
#endif
Index: sys/sys/shm.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/shm.h,v
retrieving revision 1.18
diff -u -r1.18 shm.h
--- sys/sys/shm.h 2003/01/13 23:04:32 1.18
+++ sys/sys/shm.h 2003/01/25 19:01:10
@@ -105,12 +105,17 @@
#include <sys/cdefs.h>
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
+#endif
+
__BEGIN_DECLS
int shmsys(int, ...);
-void *shmat(int, void *, int);
-int shmget(key_t, int, int);
+void *shmat(int, const void *, int);
+int shmget(key_t, size_t, int);
int shmctl(int, int, struct shmid_ds *);
-int shmdt(void *);
+int shmdt(const void *);
__END_DECLS
#endif /* !_KERNEL */
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301251907.h0PJ7XSF060476>
