From 7752137a6a9d9a042d2c2f00e245b920e41737bc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 25 Aug 1995 19:23:32 +0000 Subject: Fri Aug 25 12:12:42 1995 Roland McGrath * sysdeps/mach/hurd/mmap.c: Fix inverted test of MAP_FIXED. * stdio/vfscanf.c (number): Allow field width to inhibit first digit after base detection. * stdio/vfprintf.c (vfprintf: %s): Never search past the limit specified by the precision. * grp/grpread.c (__grpscan): New function. * grp/grp.h (__grpscan): Declare it. * grp/getgrgid.c: Use __grpscan. * grp/getgrnam.c: Likewise. * pwd/pwdread.c (__pwdscan): New function. * pwd/pwd.h (__pwdscan): Declare it. * pwd/getpwnam.c: Use __pwdscan. * pwd/getpwuid.c: Likewise. Thu Aug 24 16:29:40 1995 Roland McGrath * sysdeps/mach/hurd/mmap.c: Treat (FLAGS & MAP_TYPE) == 0 like MAP_FILE. * hurd/thread-cancel.c: Return EINTR when called on self. * sysdeps/i386/elf/start.S (data_start): Define as weak alias for __data_start. --- sysdeps/i386/elf/start.S | 2 ++ sysdeps/mach/hurd/mmap.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'sysdeps') diff --git a/sysdeps/i386/elf/start.S b/sysdeps/i386/elf/start.S index 67d7916..c5796e8 100644 --- a/sysdeps/i386/elf/start.S +++ b/sysdeps/i386/elf/start.S @@ -90,3 +90,5 @@ nofini: .globl __data_start __data_start: .long 0 + .weak data_start + data_start = __data_start diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c index 0fb1a08..9793077 100644 --- a/sysdeps/mach/hurd/mmap.c +++ b/sysdeps/mach/hurd/mmap.c @@ -57,6 +57,7 @@ __mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset) break; case MAP_FILE: + case 0: /* Allow, e.g., just MAP_SHARED. */ { mach_port_t robj, wobj; if (err = HURD_DPORT_USE (fd, __io_map (port, &robj, &wobj))) @@ -91,7 +92,7 @@ __mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset) mapaddr = (vm_address_t) addr; err = __vm_map (__mach_task_self (), &mapaddr, (vm_size_t) len, (vm_address_t) 0, - flags & MAP_FIXED, + ! (flags & MAP_FIXED), memobj, (vm_offset_t) offset, flags & (MAP_COPY|MAP_PRIVATE), vmprot, VM_PROT_ALL, -- cgit v1.1