[uClibc-cvs] svn commit: trunk/uClibc/libc: misc/sysvipc sysdeps/linux/alpha/bits sy etc...

jocke at uclibc.org jocke at uclibc.org
Sun Apr 24 19:29:40 UTC 2005


Author: jocke
Date: 2005-04-24 13:29:39 -0600 (Sun, 24 Apr 2005)
New Revision: 10176

Log:
Fix bug 222: Move all archs to newer __IPC_64 interface for {msg,sem,shm}ctl
syscalls. This won't work on 2.2 kernels(I think).


Added:
   trunk/uClibc/libc/sysdeps/linux/alpha/bits/ipc.h
   trunk/uClibc/libc/sysdeps/linux/mips/bits/ipc.h
   trunk/uClibc/libc/sysdeps/linux/mips/bits/msq.h
   trunk/uClibc/libc/sysdeps/linux/powerpc/bits/ipc.h
   trunk/uClibc/libc/sysdeps/linux/sparc/bits/ipc.h
   trunk/uClibc/libc/sysdeps/linux/x86_64/bits/msq.h

Modified:
   trunk/uClibc/libc/misc/sysvipc/ipc.h
   trunk/uClibc/libc/misc/sysvipc/msgq.c
   trunk/uClibc/libc/misc/sysvipc/sem.c
   trunk/uClibc/libc/misc/sysvipc/shm.c
   trunk/uClibc/libc/sysdeps/linux/common/bits/ipc.h
   trunk/uClibc/libc/sysdeps/linux/common/bits/msq.h
   trunk/uClibc/libc/sysdeps/linux/powerpc/bits/msq.h


Changeset:
Modified: trunk/uClibc/libc/misc/sysvipc/ipc.h
===================================================================
--- trunk/uClibc/libc/misc/sysvipc/ipc.h	2005-04-24 05:39:52 UTC (rev 10175)
+++ trunk/uClibc/libc/misc/sysvipc/ipc.h	2005-04-24 19:29:39 UTC (rev 10176)
@@ -4,6 +4,8 @@
 
 #ifdef __NR_ipc
 
+#define __IPC_64	0x100
+
 /* The actual system call: all functions are multiplexed by this.  */
 extern int __syscall_ipc __P((int __call, int __first, int __second,
 					  int __third, void *__ptr));

Modified: trunk/uClibc/libc/misc/sysvipc/msgq.c
===================================================================
--- trunk/uClibc/libc/misc/sysvipc/msgq.c	2005-04-24 05:39:52 UTC (rev 10175)
+++ trunk/uClibc/libc/misc/sysvipc/msgq.c	2005-04-24 19:29:39 UTC (rev 10176)
@@ -6,12 +6,12 @@
 #ifdef L_msgctl
 
 #ifdef __NR_msgctl
-_syscall3(int, msgctl, int, msqid, int, cmd, struct msqid_ds *, buf);
+_syscall3(int, msgctl, int, msqid, int, cmd | __IPC_64, struct msqid_ds *, buf);
 #else
 /* Message queue control operation.  */
 int msgctl (int msqid, int cmd, struct msqid_ds *buf)
 {
-    return __syscall_ipc(IPCOP_msgctl ,msqid ,cmd ,0 ,buf);
+    return __syscall_ipc(IPCOP_msgctl ,msqid ,cmd | __IPC_64 ,0 ,buf);
 }
 #endif
 #endif

Modified: trunk/uClibc/libc/misc/sysvipc/sem.c
===================================================================
--- trunk/uClibc/libc/misc/sysvipc/sem.c	2005-04-24 05:39:52 UTC (rev 10175)
+++ trunk/uClibc/libc/misc/sysvipc/sem.c	2005-04-24 19:29:39 UTC (rev 10176)
@@ -51,9 +51,9 @@
     arg = va_arg (ap, union semun);
     va_end (ap);
 #ifdef __NR_semctl
-    return __semctl(semid, semnum, cmd, arg.__pad);
+    return __semctl(semid, semnum, cmd | __IPC_64, arg.__pad);
 #else
-    return __syscall_ipc(IPCOP_semctl, semid, semnum, cmd, &arg);
+    return __syscall_ipc(IPCOP_semctl, semid, semnum, cmd | __IPC_64, &arg);
 #endif
 }
 #endif

Modified: trunk/uClibc/libc/misc/sysvipc/shm.c
===================================================================
--- trunk/uClibc/libc/misc/sysvipc/shm.c	2005-04-24 05:39:52 UTC (rev 10175)
+++ trunk/uClibc/libc/misc/sysvipc/shm.c	2005-04-24 19:29:39 UTC (rev 10176)
@@ -48,11 +48,11 @@
 #ifdef L_shmctl
 /* Provide operations to control over shared memory segments.  */
 #ifdef __NR_shmctl
-_syscall3(int, shmctl, int, shmid, int, cmd, struct shmid_ds *, buf);
+_syscall3(int, shmctl, int, shmid, int, cmd | __IPC_64, struct shmid_ds *, buf);
 #else
 int shmctl (int shmid, int cmd, struct shmid_ds *buf)
 {
-    return __syscall_ipc(IPCOP_shmctl, shmid, cmd, 0, buf);
+    return __syscall_ipc(IPCOP_shmctl, shmid, cmd | __IPC_64 , 0, buf);
 }
 #endif
 #endif

Added: trunk/uClibc/libc/sysdeps/linux/alpha/bits/ipc.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/alpha/bits/ipc.h	2005-04-24 05:39:52 UTC (rev 10175)
+++ trunk/uClibc/libc/sysdeps/linux/alpha/bits/ipc.h	2005-04-24 19:29:39 UTC (rev 10176)
@@ -0,0 +1,55 @@
+/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _SYS_IPC_H
+# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
+#endif
+
+#include <bits/types.h>
+
+/* Mode bits for `msgget', `semget', and `shmget'.  */
+#define IPC_CREAT	01000		/* Create key if key does not exist. */
+#define IPC_EXCL	02000		/* Fail if key exists.  */
+#define IPC_NOWAIT	04000		/* Return error on wait.  */
+
+/* Control commands for `msgctl', `semctl', and `shmctl'.  */
+#define IPC_RMID	0		/* Remove identifier.  */
+#define IPC_SET		1		/* Set `ipc_perm' options.  */
+#define IPC_STAT	2		/* Get `ipc_perm' options.  */
+#ifdef __USE_GNU
+# define IPC_INFO	3		/* See ipcs.  */
+#endif
+
+/* Special key values.  */
+#define IPC_PRIVATE	((__key_t) 0)	/* Private key.  */
+
+
+/* Data structure used to pass permission information to IPC operations.  */
+struct ipc_perm
+  {
+    __key_t __key;			/* Key.  */
+    unsigned int uid;			/* Owner's user ID.  */
+    unsigned int gid;			/* Owner's group ID.  */
+    unsigned int cuid;			/* Creator's user ID.  */
+    unsigned int cgid;			/* Creator's group ID.  */
+    unsigned int mode;			/* Read/write permission.  */
+    unsigned short int __seq;		/* Sequence number.  */
+    unsigned short int __pad1;
+    unsigned long int __unused1;
+    unsigned long int __unused2;
+  };

Modified: trunk/uClibc/libc/sysdeps/linux/common/bits/ipc.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/bits/ipc.h	2005-04-24 05:39:52 UTC (rev 10175)
+++ trunk/uClibc/libc/sysdeps/linux/common/bits/ipc.h	2005-04-24 19:29:39 UTC (rev 10176)
@@ -35,22 +35,22 @@
 # define IPC_INFO	3		/* See ipcs.  */
 #endif
 
-/* Type of a SYSV IPC key.  */
-typedef int __kernel_key_t;
-
 /* Special key values.  */
 #define IPC_PRIVATE	((__key_t) 0)	/* Private key.  */
 
-
 /* Data structure used to pass permission information to IPC operations.  */
 struct ipc_perm
-{
-    __kernel_key_t	__key;
-    __kernel_uid_t	uid;
-    __kernel_gid_t	gid;
-    __kernel_uid_t	cuid;
-    __kernel_gid_t	cgid;
-    __kernel_mode_t	mode; 
-    unsigned long	seq;
-};
+  {
+    __key_t __key;		/* Key.  */
+    __uid_t uid;		/* Owner's user ID.  */
+    __gid_t gid;		/* Owner's group ID.  */
+    __uid_t cuid;		/* Creator's user ID.  */
+    __gid_t cgid;		/* Creator's group ID.  */
+    unsigned short int mode;	/* Read/write permission.  */
+    unsigned short int __pad1;
+    unsigned short int __seq;	/* Sequence number.  */
+    unsigned short int __pad2;
+    unsigned long int __unused1;
+    unsigned long int __unused2;
+  };
 

Modified: trunk/uClibc/libc/sysdeps/linux/common/bits/msq.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/bits/msq.h	2005-04-24 05:39:52 UTC (rev 10175)
+++ trunk/uClibc/libc/sysdeps/linux/common/bits/msq.h	2005-04-24 19:29:39 UTC (rev 10176)
@@ -32,23 +32,24 @@
 typedef unsigned long int msgqnum_t;
 typedef unsigned long int msglen_t;
 
-
 /* Structure of record for one message inside the kernel.
    The type `struct msg' is opaque.  */
-struct msqid_ds {
-    struct ipc_perm msg_perm;
-    struct msg *msg_first;		/* first message on queue,unused  */
-    struct msg *msg_last;		/* last message in queue,unused */
-    __kernel_time_t msg_stime;	/* last msgsnd time */
-    __kernel_time_t msg_rtime;	/* last msgrcv time */
-    __kernel_time_t msg_ctime;	/* last change time */
-    unsigned long  msg_lcbytes;	/* Reuse junk fields for 32 bit */
-    unsigned long  msg_lqbytes;	/* ditto */
-    unsigned short __msg_cbytes;	/* current number of bytes on queue */
-    unsigned short msg_qnum;	/* number of messages in queue */
-    unsigned short msg_qbytes;	/* max number of bytes on queue */
-    __kernel_ipc_pid_t msg_lspid;	/* pid of last msgsnd */
-    __kernel_ipc_pid_t msg_lrpid;	/* last receive pid */
+struct msqid_ds
+{
+  struct ipc_perm msg_perm;	/* structure describing operation permission */
+  __time_t msg_stime;		/* time of last msgsnd command */
+  unsigned long int __unused1;
+  __time_t msg_rtime;		/* time of last msgrcv command */
+  unsigned long int __unused2;
+  __time_t msg_ctime;		/* time of last change */
+  unsigned long int __unused3;
+  unsigned long int __msg_cbytes; /* current number of bytes 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() */
+  unsigned long int __unused4;
+  unsigned long int __unused5;
 };
 
 #ifdef __USE_MISC

Added: trunk/uClibc/libc/sysdeps/linux/mips/bits/ipc.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/mips/bits/ipc.h	2005-04-24 05:39:52 UTC (rev 10175)
+++ trunk/uClibc/libc/sysdeps/linux/mips/bits/ipc.h	2005-04-24 19:29:39 UTC (rev 10176)
@@ -0,0 +1,55 @@
+/* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _SYS_IPC_H
+# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
+#endif
+
+#include <bits/types.h>
+
+/* Mode bits for `msgget', `semget', and `shmget'.  */
+#define IPC_CREAT	01000		/* Create key if key does not exist. */
+#define IPC_EXCL	02000		/* Fail if key exists.	*/
+#define IPC_NOWAIT	04000		/* Return error on wait.  */
+
+/* Control commands for `msgctl', `semctl', and `shmctl'.  */
+#define IPC_RMID	0		/* Remove identifier.  */
+#define IPC_SET		1		/* Set `ipc_perm' options.  */
+#define IPC_STAT	2		/* Get `ipc_perm' options.  */
+#ifdef __USE_GNU
+# define IPC_INFO	3		/* See ipcs.  */
+#endif
+
+/* Special key values.	*/
+#define IPC_PRIVATE	((__key_t) 0)	/* Private key.	 */
+
+
+/* Data structure used to pass permission information to IPC operations.  */
+struct ipc_perm
+  {
+    __key_t __key;			/* Key.  */
+    unsigned int uid;			/* Owner's user ID.  */
+    unsigned int gid;			/* Owner's group ID.  */
+    unsigned int cuid;			/* Creator's user ID.  */
+    unsigned int cgid;			/* Creator's group ID.	*/
+    unsigned int mode;			/* Read/write permission.  */
+    unsigned short int __seq;		/* Sequence number.  */
+    unsigned short int __pad1;
+    unsigned long int __unused1;
+    unsigned long int __unused2;
+};

Added: trunk/uClibc/libc/sysdeps/linux/mips/bits/msq.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/mips/bits/msq.h	2005-04-24 05:39:52 UTC (rev 10175)
+++ trunk/uClibc/libc/sysdeps/linux/mips/bits/msq.h	2005-04-24 19:29:39 UTC (rev 10176)
@@ -0,0 +1,74 @@
+/* Copyright (C) 2002 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _SYS_MSG_H
+# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
+#endif
+
+#include <bits/types.h>
+
+/* Define options for message queue functions.  */
+#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 */
+#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.
+   The type `struct msg' is opaque.  */
+struct msqid_ds
+{
+  struct ipc_perm msg_perm;	/* structure describing operation permission */
+  __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 long int __msg_cbytes; /* current number of bytes 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() */
+  unsigned long int __unused1;
+  unsigned long int __unused2;
+};
+
+#ifdef __USE_MISC
+
+# define msg_cbytes	__msg_cbytes
+
+/* ipcs ctl commands */
+# define MSG_STAT 11
+# define MSG_INFO 12
+
+/* buffer for msgctl calls IPC_INFO, MSG_INFO */
+struct msginfo
+  {
+    int msgpool;
+    int msgmap;
+    int msgmax;
+    int msgmnb;
+    int msgmni;
+    int msgssz;
+    int msgtql;
+    unsigned short int msgseg;
+  };
+
+#endif /* __USE_MISC */

Added: trunk/uClibc/libc/sysdeps/linux/powerpc/bits/ipc.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/powerpc/bits/ipc.h	2005-04-24 05:39:52 UTC (rev 10175)
+++ trunk/uClibc/libc/sysdeps/linux/powerpc/bits/ipc.h	2005-04-24 19:29:39 UTC (rev 10176)
@@ -0,0 +1,54 @@
+/* Copyright (C) 1995-1999, 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _SYS_IPC_H
+# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
+#endif
+
+#include <bits/types.h>
+
+/* Mode bits for `msgget', `semget', and `shmget'.  */
+#define IPC_CREAT	01000		/* Create key if key does not exist. */
+#define IPC_EXCL	02000		/* Fail if key exists.  */
+#define IPC_NOWAIT	04000		/* Return error on wait.  */
+
+/* Control commands for `msgctl', `semctl', and `shmctl'.  */
+#define IPC_RMID	0		/* Remove identifier.  */
+#define IPC_SET		1		/* Set `ipc_perm' options.  */
+#define IPC_STAT	2		/* Get `ipc_perm' options.  */
+#ifdef __USE_GNU
+# define IPC_INFO	3		/* See ipcs.  */
+#endif
+
+/* Special key values.  */
+#define IPC_PRIVATE	((__key_t) 0)	/* Private key.  */
+
+/* Data structure used to pass permission information to IPC operations.  */
+struct ipc_perm
+  {
+    __key_t __key;		/* Key. */
+    __uid_t uid;		/* Owner's user ID. */
+    __gid_t gid;		/* Owner's group ID. */
+    __uid_t cuid;		/* Creator's user ID. */
+    __gid_t cgid;		/* Creator's group ID. */
+    __mode_t mode;		/* Read/write permission. */
+    unsigned long __seq;	/* Sequence number. */
+    unsigned int __pad2;
+    unsigned long long int __unused1;
+    unsigned long long int __unused2;
+  };

Modified: trunk/uClibc/libc/sysdeps/linux/powerpc/bits/msq.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/powerpc/bits/msq.h	2005-04-24 05:39:52 UTC (rev 10175)
+++ trunk/uClibc/libc/sysdeps/linux/powerpc/bits/msq.h	2005-04-24 19:29:39 UTC (rev 10176)
@@ -21,6 +21,7 @@
 #endif
 
 #include <bits/types.h>
+#include <bits/wordsize.h>
 
 /* Define options for message queue functions.  */
 #define MSG_NOERROR    010000  /* no error if message is too big */
@@ -38,11 +39,17 @@
 struct msqid_ds
 {
   struct ipc_perm msg_perm;    /* structure describing operation permission */
+#if __WORDSIZE == 32
   unsigned int __unused1;
+#endif
   __time_t msg_stime;          /* time of last msgsnd command */
+#if __WORDSIZE == 32
   unsigned int __unused2;
+#endif
   __time_t msg_rtime;          /* time of last msgrcv command */
+#if __WORDSIZE == 32
   unsigned int __unused3;
+#endif
   __time_t msg_ctime;          /* time of last change */
   unsigned long __msg_cbytes; /* current number of bytes on queue */
   msgqnum_t msg_qnum;          /* number of messages currently on queue */

Added: trunk/uClibc/libc/sysdeps/linux/sparc/bits/ipc.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/sparc/bits/ipc.h	2005-04-24 05:39:52 UTC (rev 10175)
+++ trunk/uClibc/libc/sysdeps/linux/sparc/bits/ipc.h	2005-04-24 19:29:39 UTC (rev 10176)
@@ -0,0 +1,62 @@
+/* Copyright (C) 1995-1999, 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _SYS_IPC_H
+# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
+#endif
+
+#include <bits/types.h>
+#include <bits/wordsize.h>
+
+/* Mode bits for `msgget', `semget', and `shmget'.  */
+#define IPC_CREAT	01000		/* Create key if key does not exist. */
+#define IPC_EXCL	02000		/* Fail if key exists.  */
+#define IPC_NOWAIT	04000		/* Return error on wait.  */
+
+/* Control commands for `msgctl', `semctl', and `shmctl'.  */
+#define IPC_RMID	0		/* Remove identifier.  */
+#define IPC_SET		1		/* Set `ipc_perm' options.  */
+#define IPC_STAT	2		/* Get `ipc_perm' options.  */
+#ifdef __USE_GNU
+# define IPC_INFO	3		/* See ipcs.  */
+#endif
+
+/* Special key values.  */
+#define IPC_PRIVATE	((__key_t) 0)	/* Private key.  */
+
+
+/* Data structure used to pass permission information to IPC operations.  */
+struct ipc_perm
+  {
+    __key_t __key;			/* Key.  */
+    __uid_t uid;			/* Owner's user ID.  */
+    __gid_t gid;			/* Owner's group ID.  */
+    __uid_t cuid;			/* Creator's user ID.  */
+    __gid_t cgid;			/* Creator's group ID.  */
+#if __WORDSIZE == 32
+    unsigned short int __pad1;
+    unsigned short int mode;		/* Read/write permission.  */
+    unsigned short int __pad2;
+#else
+    __mode_t mode;			/* Read/write permission.  */
+    unsigned short int __pad1;
+#endif
+    unsigned short int __seq;		/* Sequence number.  */
+    unsigned long long int __unused1;
+    unsigned long long int __unused2;
+  };

Added: trunk/uClibc/libc/sysdeps/linux/x86_64/bits/msq.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/x86_64/bits/msq.h	2005-04-24 05:39:52 UTC (rev 10175)
+++ trunk/uClibc/libc/sysdeps/linux/x86_64/bits/msq.h	2005-04-24 19:29:39 UTC (rev 10176)
@@ -0,0 +1,83 @@
+/* Copyright (C) 1995, 1996, 1997, 2000, 2002 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _SYS_MSG_H
+# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
+#endif
+
+#include <bits/types.h>
+#include <bits/wordsize.h>
+
+/* Define options for message queue functions.  */
+#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 */
+#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.
+   The type `struct msg' is opaque.  */
+struct msqid_ds
+{
+  struct ipc_perm msg_perm;	/* structure describing operation permission */
+  __time_t msg_stime;		/* time of last msgsnd command */
+#if __WORDSIZE == 32
+  unsigned long int __unused1;
+#endif
+  __time_t msg_rtime;		/* time of last msgrcv command */
+#if __WORDSIZE == 32
+  unsigned long int __unused2;
+#endif
+  __time_t msg_ctime;		/* time of last change */
+#if __WORDSIZE == 32
+  unsigned long int __unused3;
+#endif
+  unsigned long int __msg_cbytes; /* current number of bytes 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() */
+  unsigned long int __unused4;
+  unsigned long int __unused5;
+};
+
+#ifdef __USE_MISC
+
+# define msg_cbytes	__msg_cbytes
+
+/* ipcs ctl commands */
+# define MSG_STAT 11
+# define MSG_INFO 12
+
+/* buffer for msgctl calls IPC_INFO, MSG_INFO */
+struct msginfo
+  {
+    int msgpool;
+    int msgmap;
+    int msgmax;
+    int msgmnb;
+    int msgmni;
+    int msgssz;
+    int msgtql;
+    unsigned short int msgseg;
+  };
+
+#endif /* __USE_MISC */




More information about the uClibc-cvs mailing list