hurd: drop elder MACH_IPC_COMPAT handling
This was dropped from GNU Mach in 2006. * mach/Machrules (MIGFLAGS): Do not set -DMACH_IPC_COMPAT=0. * mach/mach/mach_traps.h: Drop comment about MACH_IPC_COMPAT. * sysdeps/mach/hurd/fork.c (__fork): Drop special casing MACH_IPC_COMPAT.
This commit is contained in:
parent
903d3633ec
commit
7dab2d00ee
@ -21,6 +21,10 @@
|
|||||||
--disable-libcilkrts to gcc configure.
|
--disable-libcilkrts to gcc configure.
|
||||||
* sysdeps/mach/hurd/Makefile [$(subdir)==nis]: Add
|
* sysdeps/mach/hurd/Makefile [$(subdir)==nis]: Add
|
||||||
-DUSE_BINDINGDIR=1 to CFLAGS-ypclnt.c.
|
-DUSE_BINDINGDIR=1 to CFLAGS-ypclnt.c.
|
||||||
|
* mach/Machrules (MIGFLAGS): Do not set -DMACH_IPC_COMPAT=0.
|
||||||
|
* mach/mach/mach_traps.h: Drop comment about MACH_IPC_COMPAT.
|
||||||
|
* sysdeps/mach/hurd/fork.c (__fork): Drop special casing
|
||||||
|
MACH_IPC_COMPAT.
|
||||||
|
|
||||||
2018-01-27 James Clarke <jrtc27@jrtc27.com>
|
2018-01-27 James Clarke <jrtc27@jrtc27.com>
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ $(objpfx)dummy.mk:
|
|||||||
$(make-target-directory)
|
$(make-target-directory)
|
||||||
echo '# Empty' > $@
|
echo '# Empty' > $@
|
||||||
|
|
||||||
MIGFLAGS = -DMACH_IPC_COMPAT=0 -DSTANDALONE -DTypeCheck=0 \
|
MIGFLAGS = -DSTANDALONE -DTypeCheck=0 \
|
||||||
$(+includes) $(migdefines) -subrprefix __
|
$(+includes) $(migdefines) -subrprefix __
|
||||||
# Putting CC in the enivronment makes the mig wrapper script
|
# Putting CC in the enivronment makes the mig wrapper script
|
||||||
# use the same compiler setup we are using to run cpp.
|
# use the same compiler setup we are using to run cpp.
|
||||||
|
@ -17,8 +17,7 @@
|
|||||||
|
|
||||||
/* Declare the few Mach system calls (except mach_msg, in <mach/message.h>).
|
/* Declare the few Mach system calls (except mach_msg, in <mach/message.h>).
|
||||||
This does not include the kernel RPC shortcut calls (in <mach-shortcuts.h>).
|
This does not include the kernel RPC shortcut calls (in <mach-shortcuts.h>).
|
||||||
|
*/
|
||||||
This file omits the MACH_IPC_COMPAT functions. */
|
|
||||||
|
|
||||||
#ifndef _MACH_MACH_TRAPS_H
|
#ifndef _MACH_MACH_TRAPS_H
|
||||||
|
|
||||||
|
@ -213,38 +213,9 @@ __fork (void)
|
|||||||
{
|
{
|
||||||
/* This is a receive right. We want to give the child task
|
/* This is a receive right. We want to give the child task
|
||||||
its own new receive right under the same name. */
|
its own new receive right under the same name. */
|
||||||
err = __mach_port_allocate_name (newtask,
|
if (err = __mach_port_allocate_name (newtask,
|
||||||
MACH_PORT_RIGHT_RECEIVE,
|
MACH_PORT_RIGHT_RECEIVE,
|
||||||
portnames[i]);
|
portnames[i]))
|
||||||
if (err == KERN_NAME_EXISTS)
|
|
||||||
{
|
|
||||||
/* It already has a right under this name (?!). Well,
|
|
||||||
there is this bizarre old Mach IPC feature (in #ifdef
|
|
||||||
MACH_IPC_COMPAT in the ukernel) which results in new
|
|
||||||
tasks getting a new receive right for task special
|
|
||||||
port number 2. What else might be going on I'm not
|
|
||||||
sure. So let's check. */
|
|
||||||
#if !MACH_IPC_COMPAT
|
|
||||||
#define TASK_NOTIFY_PORT 2
|
|
||||||
#endif
|
|
||||||
assert (({ mach_port_t thisport, notify_port;
|
|
||||||
mach_msg_type_name_t poly;
|
|
||||||
(__task_get_special_port (newtask,
|
|
||||||
TASK_NOTIFY_PORT,
|
|
||||||
¬ify_port) == 0 &&
|
|
||||||
__mach_port_extract_right
|
|
||||||
(newtask,
|
|
||||||
portnames[i],
|
|
||||||
MACH_MSG_TYPE_MAKE_SEND,
|
|
||||||
&thisport, &poly) == 0 &&
|
|
||||||
(thisport == notify_port) &&
|
|
||||||
__mach_port_deallocate (__mach_task_self (),
|
|
||||||
thisport) == 0 &&
|
|
||||||
__mach_port_deallocate (__mach_task_self (),
|
|
||||||
notify_port) == 0);
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
else if (err)
|
|
||||||
LOSE;
|
LOSE;
|
||||||
if (porttypes[i] & MACH_PORT_TYPE_SEND)
|
if (porttypes[i] & MACH_PORT_TYPE_SEND)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user