void weak_function _dl_sysdep_fatal (const char *msg, ...) { va_list ap;  va_start (ap, msg); do { size_t len = strlen (msg); mach_msg_type_number_t nwrote; do { if (__io_write (_hurd_init_dtable[2], msg, len, -1, &nwrote)) break; len -= nwrote; msg += nwrote; } while (nwrote > 0); msg = va_arg (ap, const char *); } while (msg); va_end (ap);  _exit (127); }   void weak_function _dl_sysdep_error (const char *msg, ...) { va_list ap;  va_start (ap, msg); do { size_t len = strlen (msg); mach_msg_type_number_t nwrote; do { if (__io_write (_hurd_init_dtable[2], msg, len, -1, &nwrote)) break; len -= nwrote; msg += nwrote; } while (nwrote > 0); msg = va_arg (ap, const char *); } while (msg); va_end (ap); }   void weak_function _dl_sysdep_message (const char *msg, ...) { va_list ap;  va_start (ap, msg); do { size_t len = strlen (msg); mach_msg_type_number_t nwrote; do { if (__io_write (_hurd_init_dtable[1], msg, len, -1, &nwrote)) break; len -= nwrote; msg += nwrote; } while (nwrote > 0); msg = va_arg (ap, const char *); } while (msg); va_end (ap); }
__mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset){  error_t err;  vm_prot_t vmprot;  vm_address_t mapaddr;  vmprot = VM_PROT_NONE;  if (prot & PROT_READ)    vmprot |= VM_PROT_READ;  if (prot & PROT_WRITE)    vmprot |= VM_PROT_WRITE;  if (prot & PROT_EXEC)    vmprot |= VM_PROT_EXECUTE;  mapaddr = (vm_address_t) addr;  err = __vm_map (__mach_task_self (),		  &mapaddr, (vm_size_t) len, 0 /*ELF_MACHINE_USER_ADDRESS_MASK*/,		  !(flags & MAP_FIXED),		  (flags & MAP_ANON) ? MACH_PORT_NULL : (mach_port_t) fd,		  (vm_offset_t) offset,		  flags & (MAP_COPY|MAP_PRIVATE),		  vmprot, VM_PROT_ALL,		  (flags & MAP_SHARED) ? VM_INHERIT_SHARE : VM_INHERIT_COPY);  if (err == KERN_NO_SPACE && (flags & MAP_FIXED))    {      /* XXX this is not atomic as it is in unix! */      /* The region is already allocated; deallocate it first.  */      err = __vm_deallocate (__mach_task_self (), mapaddr, len);      if (! err)	err = __vm_map (__mach_task_self (),			&mapaddr, (vm_size_t) len, 0 /*ELF_MACHINE_USER_ADDRESS_MASK*/,			!(flags & MAP_FIXED),			(mach_port_t) fd, (vm_offset_t) offset,			flags & (MAP_COPY|MAP_PRIVATE),			vmprot, VM_PROT_ALL,			(flags & MAP_SHARED)			? VM_INHERIT_SHARE : VM_INHERIT_COPY);    }  return err ? (caddr_t) __hurd_fail (err) : (caddr_t) mapaddr;}