Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
1998-06-19  Ulrich Drepper  <[email protected]>

	* sysdeps/generic/bits/sem.h: Don't define union semun.

	* sysdeps/unix/sysv/linux/bits/sem.h: Fix typo.

	* sysdeps/unix/sysv/linux/bits/ipc.h: Remove ipc_kludge definition
	here.
	* sysdeps/unix/sysv/linux/msgrcv.c (msgrcv): Add ipc_kludge
	definition here.
  • Loading branch information
Ulrich Drepper committed Jun 19, 1998
1 parent dfab448 commit 977bfd7
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 30 deletions.
11 changes: 11 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
1998-06-19 Ulrich Drepper <[email protected]>

* sysdeps/generic/bits/sem.h: Don't define union semun.

* sysdeps/unix/sysv/linux/bits/sem.h: Fix typo.

* sysdeps/unix/sysv/linux/bits/ipc.h: Remove ipc_kludge definition
here.
* sysdeps/unix/sysv/linux/msgrcv.c (msgrcv): Add ipc_kludge
definition here.

1998-06-18 21:45 Ulrich Drepper <[email protected]>

* signal/signal.h: Add prototype for __sigaltstack.
Expand Down
26 changes: 17 additions & 9 deletions bits/sem.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* 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
Expand Down Expand Up @@ -44,11 +45,18 @@ 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 union or not. */
#define _SEM_SEMUN_UNDEFINED 1
26 changes: 17 additions & 9 deletions sysdeps/generic/bits/sem.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* 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
Expand Down Expand Up @@ -44,11 +45,18 @@ 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 union or not. */
#define _SEM_SEMUN_UNDEFINED 1
11 changes: 1 addition & 10 deletions sysdeps/unix/sysv/linux/bits/ipc.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -50,15 +50,6 @@ struct ipc_perm
};


/* Kludge to work around Linux' restriction of only up to five
arguments to a system call. */
struct ipc_kludge
{
void *msgp;
long int msgtyp;
};


__BEGIN_DECLS

/* The actual system call: all functions are multiplexed by this. */
Expand Down
2 changes: 1 addition & 1 deletion sysdeps/unix/sysv/linux/bits/sem.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ struct semid_ds
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. */
one must define the union or not. */
#define _SEM_SEMUN_UNDEFINED 1

#ifdef __USE_MISC
Expand Down
12 changes: 11 additions & 1 deletion sysdeps/unix/sysv/linux/msgrcv.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
/* Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <[email protected]>, August 1995.
Expand All @@ -19,6 +19,16 @@

#include <sys/msg.h>


/* Kludge to work around Linux' restriction of only up to five
arguments to a system call. */
struct ipc_kludge
{
void *msgp;
long int msgtyp;
};


int
msgrcv (msqid, msgp, msgsz, msgtyp, msgflg)
int msqid;
Expand Down

0 comments on commit 977bfd7

Please sign in to comment.