about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/bits/sem.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-04-28 14:12:52 +0000
committerUlrich Drepper <drepper@redhat.com>1998-04-28 14:12:52 +0000
commitdf493c3bef6369b5e80b8aaf0f90847eafbd63f2 (patch)
tree9feb62e49ab7cb33d0d5155efe87a3495b0e8d47 /sysdeps/unix/sysv/linux/bits/sem.h
parent0088435eeebe76ab4ab892c034f6da220328e271 (diff)
downloadglibc-df493c3bef6369b5e80b8aaf0f90847eafbd63f2.tar.gz
glibc-df493c3bef6369b5e80b8aaf0f90847eafbd63f2.tar.xz
glibc-df493c3bef6369b5e80b8aaf0f90847eafbd63f2.zip
Update.
1998-04-28  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/unix/sysv/linux/bits/sem.h: Don't define union semun.
	Define macro _SEM_SEMUN_UNDEFINED instead.
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits/sem.h')
-rw-r--r--sysdeps/unix/sysv/linux/bits/sem.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/sem.h b/sysdeps/unix/sysv/linux/bits/sem.h
index f3bbd89a12..dc0ec46cba 100644
--- a/sysdeps/unix/sysv/linux/bits/sem.h
+++ b/sysdeps/unix/sysv/linux/bits/sem.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998 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
@@ -48,14 +48,22 @@ struct semid_ds
   unsigned short int sem_nsems;		/* number of semaphores in set */
 };
 
-/* Union used for argument for `semctl'.  */
-union semun
-{
-  int val;				/* value for SETVAL */
-  struct semid_ds *buf;			/* buffer for IPC_STAT & IPC_SET */
-  unsigned short int *array;		/* array for GETALL & SETALL */
-  struct seminfo *__buf;		/* buffer for IPC_INFO */
-};
+
+/* The user should define a union like the following to use it for arguments
+   for `semctl'.
+
+   union semun
+   {
+     int val;				<= value for SETVAL
+     struct semid_ds *buf;		<= buffer for IPC_STAT & IPC_SET
+     unsigned short int *array;		<= array for GETALL & SETALL
+     struct seminfo *__buf;		<= buffer for IPC_INFO
+   };
+
+   Previous versions of this file used to define this union but this is
+   incorrect.  One can test the macro _SEM_SEMUN_UNDEFINED to see whether
+   one must define the unio or not.  */
+#define _SEM_SEMUN_UNDEFINED	1
 
 #ifdef __USE_MISC