about summary refs log tree commit diff
path: root/sysdeps/mach/hurd/mmap.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-07-16 21:19:13 +0000
committerRoland McGrath <roland@gnu.org>1996-07-16 21:19:13 +0000
commitf36f8dcf1cf07c66e9f7a3eba408e2b0af12d717 (patch)
tree93cf1bcdcb0c5b31f1b731184b32471443b9c287 /sysdeps/mach/hurd/mmap.c
parentec42724d6970b2d3e9007de0841394856e84d287 (diff)
downloadglibc-f36f8dcf1cf07c66e9f7a3eba408e2b0af12d717.tar.gz
glibc-f36f8dcf1cf07c66e9f7a3eba408e2b0af12d717.tar.xz
glibc-f36f8dcf1cf07c66e9f7a3eba408e2b0af12d717.zip
Tue Jul 16 16:43:58 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
	* sysdeps/mach/hurd/mmap.c: Use same inheritance arg in second vm_map
	call as in first.

	* Makerules (make-link): Install the new link with atomic mv -f in
	case ln itself requires the library being installed.
Diffstat (limited to 'sysdeps/mach/hurd/mmap.c')
-rw-r--r--sysdeps/mach/hurd/mmap.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c
index f42c4e55c3..8753fd644b 100644
--- a/sysdeps/mach/hurd/mmap.c
+++ b/sysdeps/mach/hurd/mmap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 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
@@ -135,11 +135,10 @@ __mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
 	err = __vm_map (__mach_task_self (),
 			&mapaddr, (vm_size_t) len, (vm_address_t) 0,
 			0, memobj, (vm_offset_t) offset,
-			flags & (MAP_COPY|MAP_PRIVATE),
+			! (flags & MAP_SHARED),
 			vmprot, VM_PROT_ALL,
-			(flags & MAP_INHERIT) == 0 ? VM_INHERIT_NONE :
-			(flags & (MAP_COPY|MAP_PRIVATE)) ? VM_INHERIT_COPY :
-			VM_INHERIT_SHARE);
+			(flags & MAP_SHARED) ? VM_INHERIT_SHARE
+			: VM_INHERIT_COPY);
     }
 
   if (memobj != MACH_PORT_NULL)