summaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:15:57 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:15:57 +0000
commitc7e872bca3c3f2831bb426bdb29f6e3baf12d487 (patch)
tree22643ef845482489284e49a088e9043877cea223 /sysdeps/mach/hurd
parentdd8cbb15da8a2d4912a7f54781537e01032f6556 (diff)
parent3fcbb67b7949a8b362de5558bf1c6dd7ec5d21cf (diff)
Merge branch 't/tls-threadvar' into refs/top-bases/t/gsync-libc-merge
Diffstat (limited to 'sysdeps/mach/hurd')
-rw-r--r--sysdeps/mach/hurd/Makefile15
-rw-r--r--sysdeps/mach/hurd/Versions19
-rw-r--r--sysdeps/mach/hurd/_exit.c2
-rw-r--r--sysdeps/mach/hurd/accept.c2
-rw-r--r--sysdeps/mach/hurd/accept4.c2
-rw-r--r--sysdeps/mach/hurd/access.c14
-rw-r--r--sysdeps/mach/hurd/adjtime.c6
-rw-r--r--sysdeps/mach/hurd/bind.c2
-rw-r--r--sysdeps/mach/hurd/bits/errno.h705
-rw-r--r--sysdeps/mach/hurd/bits/fcntl.h4
-rw-r--r--sysdeps/mach/hurd/bits/ioctls.h2
-rw-r--r--sysdeps/mach/hurd/bits/local_lim.h11
-rw-r--r--sysdeps/mach/hurd/bits/param.h4
-rw-r--r--sysdeps/mach/hurd/bits/posix_opt.h54
-rw-r--r--sysdeps/mach/hurd/bits/socket.h41
-rw-r--r--sysdeps/mach/hurd/bits/stat.h7
-rw-r--r--sysdeps/mach/hurd/bits/statfs.h18
-rw-r--r--sysdeps/mach/hurd/bits/statvfs.h18
-rw-r--r--sysdeps/mach/hurd/bits/sysmacros.h60
-rw-r--r--sysdeps/mach/hurd/bits/types/error_t.h29
-rw-r--r--sysdeps/mach/hurd/bits/typesizes.h2
-rw-r--r--sysdeps/mach/hurd/brk.c2
-rw-r--r--sysdeps/mach/hurd/chdir.c2
-rw-r--r--sysdeps/mach/hurd/check_fds.c2
-rw-r--r--sysdeps/mach/hurd/check_native.c1
-rw-r--r--sysdeps/mach/hurd/check_pf.c1
-rw-r--r--sysdeps/mach/hurd/chflags.c2
-rw-r--r--sysdeps/mach/hurd/chmod.c3
-rw-r--r--sysdeps/mach/hurd/chown.c2
-rw-r--r--sysdeps/mach/hurd/chroot.c2
-rw-r--r--sysdeps/mach/hurd/clock.c2
-rw-r--r--sysdeps/mach/hurd/close.c2
-rw-r--r--sysdeps/mach/hurd/closedir.c2
-rw-r--r--sysdeps/mach/hurd/configure4
-rw-r--r--sysdeps/mach/hurd/configure.ac8
-rw-r--r--sysdeps/mach/hurd/connect.c2
-rw-r--r--sysdeps/mach/hurd/cthreads.c21
-rw-r--r--sysdeps/mach/hurd/device-nrs.h2
-rw-r--r--sysdeps/mach/hurd/dirfd.c7
-rw-r--r--sysdeps/mach/hurd/dirstream.h2
-rw-r--r--sysdeps/mach/hurd/dl-execstack.c3
-rw-r--r--sysdeps/mach/hurd/dl-fcntl.h22
-rw-r--r--sysdeps/mach/hurd/dl-mman.h2
-rw-r--r--sysdeps/mach/hurd/dl-sysdep.c104
-rw-r--r--sysdeps/mach/hurd/dl-sysdep.h2
-rw-r--r--sysdeps/mach/hurd/dl-unistd.h12
-rw-r--r--sysdeps/mach/hurd/dup2.c2
-rw-r--r--sysdeps/mach/hurd/dup3.c2
-rw-r--r--sysdeps/mach/hurd/eloop-threshold.h2
-rw-r--r--sysdeps/mach/hurd/enbl-secure.c9
-rw-r--r--sysdeps/mach/hurd/errlist.c2
-rw-r--r--sysdeps/mach/hurd/errno-loc.c16
-rw-r--r--sysdeps/mach/hurd/errnos.awk218
-rw-r--r--sysdeps/mach/hurd/euidaccess.c2
-rw-r--r--sysdeps/mach/hurd/execve.c38
-rw-r--r--sysdeps/mach/hurd/faccessat.c37
-rw-r--r--sysdeps/mach/hurd/fchdir.c2
-rw-r--r--sysdeps/mach/hurd/fchflags.c2
-rw-r--r--sysdeps/mach/hurd/fchmod.c2
-rw-r--r--sysdeps/mach/hurd/fchmodat.c2
-rw-r--r--sysdeps/mach/hurd/fchown.c2
-rw-r--r--sysdeps/mach/hurd/fchownat.c2
-rw-r--r--sysdeps/mach/hurd/fcntl.c7
-rw-r--r--sysdeps/mach/hurd/fdatasync.c2
-rw-r--r--sysdeps/mach/hurd/fdopendir.c2
-rw-r--r--sysdeps/mach/hurd/fexecve.c7
-rw-r--r--sysdeps/mach/hurd/fgetxattr.c2
-rw-r--r--sysdeps/mach/hurd/flistxattr.c2
-rw-r--r--sysdeps/mach/hurd/flock.c2
-rw-r--r--sysdeps/mach/hurd/fork.c55
-rw-r--r--sysdeps/mach/hurd/fpathconf.c2
-rw-r--r--sysdeps/mach/hurd/fremovexattr.c2
-rw-r--r--sysdeps/mach/hurd/fsetxattr.c2
-rw-r--r--sysdeps/mach/hurd/fstatfs.c2
-rw-r--r--sysdeps/mach/hurd/fstatfs64.c2
-rw-r--r--sysdeps/mach/hurd/fstatvfs.c2
-rw-r--r--sysdeps/mach/hurd/fstatvfs64.c2
-rw-r--r--sysdeps/mach/hurd/fsync.c2
-rw-r--r--sysdeps/mach/hurd/ftruncate.c2
-rw-r--r--sysdeps/mach/hurd/ftruncate64.c34
-rw-r--r--sysdeps/mach/hurd/futimens.c50
-rw-r--r--sysdeps/mach/hurd/futimes.c28
-rw-r--r--sysdeps/mach/hurd/futimesat.c45
-rw-r--r--sysdeps/mach/hurd/fxstat.c2
-rw-r--r--sysdeps/mach/hurd/fxstat64.c2
-rw-r--r--sysdeps/mach/hurd/fxstatat.c2
-rw-r--r--sysdeps/mach/hurd/fxstatat64.c2
-rw-r--r--sysdeps/mach/hurd/gai_misc.h67
-rw-r--r--sysdeps/mach/hurd/getclktck.c2
-rw-r--r--sysdeps/mach/hurd/getcwd.c11
-rw-r--r--sysdeps/mach/hurd/getdomain.c2
-rw-r--r--sysdeps/mach/hurd/getdtsz.c2
-rw-r--r--sysdeps/mach/hurd/getegid.c2
-rw-r--r--sysdeps/mach/hurd/geteuid.c2
-rw-r--r--sysdeps/mach/hurd/getgid.c2
-rw-r--r--sysdeps/mach/hurd/getgroups.c2
-rw-r--r--sysdeps/mach/hurd/gethostid.c2
-rw-r--r--sysdeps/mach/hurd/gethostname.c2
-rw-r--r--sysdeps/mach/hurd/getitimer.c2
-rw-r--r--sysdeps/mach/hurd/getlogin.c2
-rw-r--r--sysdeps/mach/hurd/getlogin_r.c2
-rw-r--r--sysdeps/mach/hurd/getpeername.c2
-rw-r--r--sysdeps/mach/hurd/getpgid.c2
-rw-r--r--sysdeps/mach/hurd/getpid.c2
-rw-r--r--sysdeps/mach/hurd/getppid.c2
-rw-r--r--sysdeps/mach/hurd/getpriority.c2
-rw-r--r--sysdeps/mach/hurd/getresgid.c19
-rw-r--r--sysdeps/mach/hurd/getresuid.c19
-rw-r--r--sysdeps/mach/hurd/getrlimit.c2
-rw-r--r--sysdeps/mach/hurd/getrusage.c2
-rw-r--r--sysdeps/mach/hurd/getsid.c2
-rw-r--r--sysdeps/mach/hurd/getsockname.c2
-rw-r--r--sysdeps/mach/hurd/getsockopt.c2
-rw-r--r--sysdeps/mach/hurd/getuid.c2
-rw-r--r--sysdeps/mach/hurd/getxattr.c2
-rw-r--r--sysdeps/mach/hurd/group_member.c2
-rw-r--r--sysdeps/mach/hurd/hp-timing.h21
-rw-r--r--sysdeps/mach/hurd/htl/Implies2
-rw-r--r--sysdeps/mach/hurd/htl/bits/pthread-np.h37
-rw-r--r--sysdeps/mach/hurd/htl/bits/types/struct___pthread_mutex.h49
-rw-r--r--sysdeps/mach/hurd/htl/pt-attr-setstackaddr.c28
-rw-r--r--sysdeps/mach/hurd/htl/pt-attr-setstacksize.c28
-rw-r--r--sysdeps/mach/hurd/htl/pt-docancel.c66
-rw-r--r--sysdeps/mach/hurd/htl/pt-hurd-cond-timedwait.c169
-rw-r--r--sysdeps/mach/hurd/htl/pt-hurd-cond-wait.c40
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-consistent.c47
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-destroy.c37
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-getprioceiling.c34
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-init.c57
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-lock.c80
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-setprioceiling.c35
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-timedlock.c78
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c76
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-trylock.c84
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-unlock.c91
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex.h90
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutexattr-destroy.c33
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutexattr-getprioceiling.c34
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutexattr-getprotocol.c31
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutexattr-getpshared.c31
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c34
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutexattr-gettype.c31
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutexattr-init.c39
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutexattr-setprioceiling.c34
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutexattr-setprotocol.c33
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutexattr-setpshared.c34
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutexattr-setrobust.c36
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutexattr-settype.c35
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutexattr.c1
-rw-r--r--sysdeps/mach/hurd/htl/pt-sigstate-destroy.c26
-rw-r--r--sysdeps/mach/hurd/htl/pt-sigstate-init.c44
-rw-r--r--sysdeps/mach/hurd/htl/pt-sigstate.c70
-rw-r--r--sysdeps/mach/hurd/htl/pt-sysdep.c100
-rw-r--r--sysdeps/mach/hurd/htl/pt-sysdep.h65
-rw-r--r--sysdeps/mach/hurd/i386/Implies2
-rw-r--r--sysdeps/mach/hurd/i386/Makefile96
-rw-r--r--sysdeps/mach/hurd/i386/____longjmp_chk.S6
-rw-r--r--sysdeps/mach/hurd/i386/bits/sigcontext.h10
-rw-r--r--sysdeps/mach/hurd/i386/c++-types.data67
-rw-r--r--sysdeps/mach/hurd/i386/exc2signal.c3
-rw-r--r--sysdeps/mach/hurd/i386/htl/Implies2
-rw-r--r--sysdeps/mach/hurd/i386/htl/pt-machdep.c82
-rw-r--r--sysdeps/mach/hurd/i386/htl/pt-setup.c110
-rw-r--r--sysdeps/mach/hurd/i386/init-first.c48
-rw-r--r--sysdeps/mach/hurd/i386/intr-msg.h2
-rw-r--r--sysdeps/mach/hurd/i386/ioperm.c2
-rw-r--r--sysdeps/mach/hurd/i386/jmp_buf-macros.h6
-rw-r--r--sysdeps/mach/hurd/i386/ld.abilist25
-rw-r--r--sysdeps/mach/hurd/i386/libBrokenLocale.abilist1
-rw-r--r--sysdeps/mach/hurd/i386/libanl.abilist4
-rw-r--r--sysdeps/mach/hurd/i386/libc.abilist2306
-rw-r--r--sysdeps/mach/hurd/i386/libcrypt.abilist7
-rw-r--r--sysdeps/mach/hurd/i386/libdl.abilist9
-rw-r--r--sysdeps/mach/hurd/i386/libm.abilist1070
-rw-r--r--sysdeps/mach/hurd/i386/libnsl.abilist121
-rw-r--r--sysdeps/mach/hurd/i386/libpthread.abilist149
-rw-r--r--sysdeps/mach/hurd/i386/libresolv.abilist91
-rw-r--r--sysdeps/mach/hurd/i386/librt.abilist42
-rw-r--r--sysdeps/mach/hurd/i386/libutil.abilist6
-rw-r--r--sysdeps/mach/hurd/i386/localplt.data64
-rw-r--r--sysdeps/mach/hurd/i386/longjmp-ts.c2
-rw-r--r--sysdeps/mach/hurd/i386/makecontext-helper.c2
-rw-r--r--sysdeps/mach/hurd/i386/makecontext.S2
-rw-r--r--sysdeps/mach/hurd/i386/sigcontextinfo.h7
-rw-r--r--sysdeps/mach/hurd/i386/signal-defines.sym6
-rw-r--r--sysdeps/mach/hurd/i386/sigreturn.c2
-rw-r--r--sysdeps/mach/hurd/i386/static-start.S2
-rw-r--r--sysdeps/mach/hurd/i386/sys/io.h2
-rw-r--r--sysdeps/mach/hurd/i386/tls.h82
-rw-r--r--sysdeps/mach/hurd/i386/tlsdesc.sym19
-rw-r--r--sysdeps/mach/hurd/i386/trampoline.c2
-rw-r--r--sysdeps/mach/hurd/if_index.c9
-rw-r--r--sysdeps/mach/hurd/ifreq.c4
-rw-r--r--sysdeps/mach/hurd/ifreq.h16
-rw-r--r--sysdeps/mach/hurd/ioctl.c3
-rw-r--r--sysdeps/mach/hurd/isatty.c2
-rw-r--r--sysdeps/mach/hurd/jmp-unwind.c2
-rw-r--r--sysdeps/mach/hurd/kernel-features.h6
-rw-r--r--sysdeps/mach/hurd/kill.c3
-rw-r--r--sysdeps/mach/hurd/lchmod.c2
-rw-r--r--sysdeps/mach/hurd/lchown.c2
-rw-r--r--sysdeps/mach/hurd/lgetxattr.c2
-rw-r--r--sysdeps/mach/hurd/libc-lock.h216
-rw-r--r--sysdeps/mach/hurd/libc-start.h31
-rw-r--r--sysdeps/mach/hurd/libhurduser.abilist0
-rw-r--r--sysdeps/mach/hurd/link.c2
-rw-r--r--sysdeps/mach/hurd/linkat.c2
-rw-r--r--sysdeps/mach/hurd/listen.c2
-rw-r--r--sysdeps/mach/hurd/listxattr.c2
-rw-r--r--sysdeps/mach/hurd/llistxattr.c2
-rw-r--r--sysdeps/mach/hurd/lremovexattr.c2
-rw-r--r--sysdeps/mach/hurd/lseek.c14
-rw-r--r--sysdeps/mach/hurd/lseek64.c2
-rw-r--r--sysdeps/mach/hurd/lsetxattr.c2
-rw-r--r--sysdeps/mach/hurd/lutimes.c23
-rw-r--r--sysdeps/mach/hurd/lxstat.c2
-rw-r--r--sysdeps/mach/hurd/lxstat64.c2
-rw-r--r--sysdeps/mach/hurd/malloc-machine.h31
-rw-r--r--sysdeps/mach/hurd/mig-reply.c6
-rw-r--r--sysdeps/mach/hurd/mkdir.c3
-rw-r--r--sysdeps/mach/hurd/mkdirat.c2
-rw-r--r--sysdeps/mach/hurd/mlock.c2
-rw-r--r--sysdeps/mach/hurd/mlockall.c42
-rw-r--r--sysdeps/mach/hurd/mmap.c23
-rw-r--r--sysdeps/mach/hurd/mmap64.c7
-rw-r--r--sysdeps/mach/hurd/munlock.c2
-rw-r--r--sysdeps/mach/hurd/munlockall.c40
-rw-r--r--sysdeps/mach/hurd/net/ethernet.h11
-rw-r--r--sysdeps/mach/hurd/net/if_arp.h5
-rw-r--r--sysdeps/mach/hurd/net/if_ether.h2
-rw-r--r--sysdeps/mach/hurd/net/if_ppp.h169
-rw-r--r--sysdeps/mach/hurd/net/route.h14
-rw-r--r--sysdeps/mach/hurd/not-errno.h21
-rw-r--r--sysdeps/mach/hurd/open.c2
-rw-r--r--sysdeps/mach/hurd/openat.c4
-rw-r--r--sysdeps/mach/hurd/opendir.c7
-rw-r--r--sysdeps/mach/hurd/pathconf.c2
-rw-r--r--sysdeps/mach/hurd/pipe.c23
-rw-r--r--sysdeps/mach/hurd/pipe2.c59
-rw-r--r--sysdeps/mach/hurd/poll.c2
-rw-r--r--sysdeps/mach/hurd/ppoll.c2
-rw-r--r--sysdeps/mach/hurd/pread.c2
-rw-r--r--sysdeps/mach/hurd/pread64.c3
-rw-r--r--sysdeps/mach/hurd/profil.c18
-rw-r--r--sysdeps/mach/hurd/pselect.c2
-rw-r--r--sysdeps/mach/hurd/ptrace.c4
-rw-r--r--sysdeps/mach/hurd/ptsname.c25
-rw-r--r--sysdeps/mach/hurd/pwrite.c2
-rw-r--r--sysdeps/mach/hurd/pwrite64.c2
-rw-r--r--sysdeps/mach/hurd/read.c3
-rw-r--r--sysdeps/mach/hurd/readdir.c2
-rw-r--r--sysdeps/mach/hurd/readdir64.c3
-rw-r--r--sysdeps/mach/hurd/readdir64_r.c2
-rw-r--r--sysdeps/mach/hurd/readdir_r.c2
-rw-r--r--sysdeps/mach/hurd/readlink.c2
-rw-r--r--sysdeps/mach/hurd/readlinkat.c2
-rw-r--r--sysdeps/mach/hurd/reboot.c7
-rw-r--r--sysdeps/mach/hurd/recv.c10
-rw-r--r--sysdeps/mach/hurd/recvfrom.c2
-rw-r--r--sysdeps/mach/hurd/recvmsg.c6
-rw-r--r--sysdeps/mach/hurd/removexattr.c2
-rw-r--r--sysdeps/mach/hurd/rename.c2
-rw-r--r--sysdeps/mach/hurd/renameat.c6
-rw-r--r--sysdeps/mach/hurd/revoke.c6
-rw-r--r--sysdeps/mach/hurd/rewinddir.c4
-rw-r--r--sysdeps/mach/hurd/rmdir.c2
-rw-r--r--sysdeps/mach/hurd/sbrk.c2
-rw-r--r--sysdeps/mach/hurd/seekdir.c7
-rw-r--r--sysdeps/mach/hurd/select.c2
-rw-r--r--sysdeps/mach/hurd/send.c6
-rw-r--r--sysdeps/mach/hurd/sendfile.c6
-rw-r--r--sysdeps/mach/hurd/sendfile64.c7
-rw-r--r--sysdeps/mach/hurd/sendmsg.c2
-rw-r--r--sysdeps/mach/hurd/sendto.c2
-rw-r--r--sysdeps/mach/hurd/setdomain.c2
-rw-r--r--sysdeps/mach/hurd/setegid.c2
-rw-r--r--sysdeps/mach/hurd/seteuid.c2
-rw-r--r--sysdeps/mach/hurd/setgid.c2
-rw-r--r--sysdeps/mach/hurd/setgroups.c2
-rw-r--r--sysdeps/mach/hurd/sethostid.c2
-rw-r--r--sysdeps/mach/hurd/sethostname.c2
-rw-r--r--sysdeps/mach/hurd/setitimer.c4
-rw-r--r--sysdeps/mach/hurd/setlogin.c2
-rw-r--r--sysdeps/mach/hurd/setpgid.c12
-rw-r--r--sysdeps/mach/hurd/setpriority.c2
-rw-r--r--sysdeps/mach/hurd/setregid.c2
-rw-r--r--sysdeps/mach/hurd/setresgid.c2
-rw-r--r--sysdeps/mach/hurd/setresuid.c2
-rw-r--r--sysdeps/mach/hurd/setreuid.c2
-rw-r--r--sysdeps/mach/hurd/setrlimit.c3
-rw-r--r--sysdeps/mach/hurd/setsid.c12
-rw-r--r--sysdeps/mach/hurd/setsockopt.c2
-rw-r--r--sysdeps/mach/hurd/settimeofday.c2
-rw-r--r--sysdeps/mach/hurd/setuid.c2
-rw-r--r--sysdeps/mach/hurd/setxattr.c2
-rw-r--r--sysdeps/mach/hurd/shutdown.c2
-rw-r--r--sysdeps/mach/hurd/sigaction.c2
-rw-r--r--sysdeps/mach/hurd/sigaltstack.c9
-rw-r--r--sysdeps/mach/hurd/siglist.h2
-rw-r--r--sysdeps/mach/hurd/sigpending.c2
-rw-r--r--sysdeps/mach/hurd/sigprocmask.c3
-rw-r--r--sysdeps/mach/hurd/sigstack.c4
-rw-r--r--sysdeps/mach/hurd/sigsuspend.c3
-rw-r--r--sysdeps/mach/hurd/sigwait.c2
-rw-r--r--sysdeps/mach/hurd/socket.c17
-rw-r--r--sysdeps/mach/hurd/socketpair.c29
-rw-r--r--sysdeps/mach/hurd/spawni.c80
-rw-r--r--sysdeps/mach/hurd/statfs.c2
-rw-r--r--sysdeps/mach/hurd/statfs64.c2
-rw-r--r--sysdeps/mach/hurd/statfsconv.c2
-rw-r--r--sysdeps/mach/hurd/statvfs.c2
-rw-r--r--sysdeps/mach/hurd/statvfs64.c2
-rw-r--r--sysdeps/mach/hurd/symlink.c2
-rw-r--r--sysdeps/mach/hurd/symlinkat.c2
-rw-r--r--sysdeps/mach/hurd/sync.c2
-rw-r--r--sysdeps/mach/hurd/syncfs.c2
-rw-r--r--sysdeps/mach/hurd/sysconf.c2
-rw-r--r--sysdeps/mach/hurd/sysdep-cancel.h9
-rw-r--r--sysdeps/mach/hurd/telldir.c2
-rw-r--r--sysdeps/mach/hurd/times.c2
-rw-r--r--sysdeps/mach/hurd/tls.h23
-rw-r--r--sysdeps/mach/hurd/tmpfile.c2
-rw-r--r--sysdeps/mach/hurd/truncate.c2
-rw-r--r--sysdeps/mach/hurd/truncate64.c42
-rw-r--r--sysdeps/mach/hurd/ttyname.c2
-rw-r--r--sysdeps/mach/hurd/ttyname_r.c2
-rw-r--r--sysdeps/mach/hurd/umask.c2
-rw-r--r--sysdeps/mach/hurd/uname.c2
-rw-r--r--sysdeps/mach/hurd/unlink.c2
-rw-r--r--sysdeps/mach/hurd/unlinkat.c2
-rw-r--r--sysdeps/mach/hurd/utime-helper.c154
-rw-r--r--sysdeps/mach/hurd/utimensat.c46
-rw-r--r--sysdeps/mach/hurd/utimes.c24
-rw-r--r--sysdeps/mach/hurd/wait4.c5
-rw-r--r--sysdeps/mach/hurd/write.c3
-rw-r--r--sysdeps/mach/hurd/x86/dl-sysdep.c21
-rw-r--r--sysdeps/mach/hurd/xmknod.c2
-rw-r--r--sysdeps/mach/hurd/xmknodat.c7
-rw-r--r--sysdeps/mach/hurd/xstat.c2
-rw-r--r--sysdeps/mach/hurd/xstat64.c2
-rw-r--r--sysdeps/mach/hurd/xstatconv.c2
341 files changed, 8397 insertions, 1514 deletions
diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
index 3845c57c14..3a853a6cd9 100644
--- a/sysdeps/mach/hurd/Makefile
+++ b/sysdeps/mach/hurd/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1993-2016 Free Software Foundation, Inc.
+# Copyright (C) 1993-2018 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
@@ -79,9 +79,11 @@ endef
# the headers we want to search for Mach error codes, listed above (and
# incidentally, all other headers those include).
-include $(common-objpfx)errnos.d
-$(common-objpfx)errnos.d: $(mach-errnos-deps) libc-modules.h
+$(common-objpfx)errnos.d: $(mach-errnos-deps)
$(mach-errno-h) | \
- $(CC) $(CFLAGS) $(CPPFLAGS) -M -x c - | \
+ $(CC) $(CFLAGS) \
+ $(subst -include $(common-objpfx)libc-modules.h,,$(CPPFLAGS)) \
+ -M -x c - | \
sed $(sed-remove-objpfx) -e 's,- *:,mach-errnos-deps :=,' \
-e 's, \.\./, $(..),g' > $@t
mv -f $@t $@
@@ -197,8 +199,11 @@ sysdep_headers += nfs/nfs.h
endif
ifeq ($(subdir),socket)
-sysdep_headers += net/ethernet.h net/if_arp.h net/if_ether.h net/if_ppp.h \
- net/route.h
+sysdep_headers += net/ethernet.h net/if_arp.h net/if_ether.h net/route.h
+endif
+
+ifeq ($(subdir),nis)
+CFLAGS-ypclnt.c += -DUSE_BINDINGDIR=1
endif
endif # in-Makerules
diff --git a/sysdeps/mach/hurd/Versions b/sysdeps/mach/hurd/Versions
index 7cab8e8551..f69d5fef67 100644
--- a/sysdeps/mach/hurd/Versions
+++ b/sysdeps/mach/hurd/Versions
@@ -1,11 +1,15 @@
libc {
GLIBC_2.0 {
# functions with a weak definition in the dynamic linker
- __getcwd; __mmap;
+ __access; __getcwd; __mmap;
+ }
+ GLIBC_2.2.6 {
+ # functions with a weak definition in the dynamic linker
+ __writev;
}
GLIBC_PRIVATE {
# Functions shared with the dynamic linker
- __libc_read; __libc_write; __libc_lseek64;
+ __access_noerrno; __libc_read; __libc_write; __libc_lseek64;
__libc_lock_self0;
_dl_init_first;
@@ -18,11 +22,16 @@ ld {
__hurd_threadvar_stack_mask; __hurd_threadvar_stack_offset;
# functions that must be shared with libc
- __close; __getcwd; __getpid;
- __mmap; __open; __xstat64; __fxstat64;
+ __access; __close; __getcwd; __getpid;
+ __mmap; __open; __read; __sbrk; __strtoul_internal;
+ __write; __writev; __xstat64; __fxstat64;
_exit; _hurd_intr_rpc_mach_msg;
abort;
}
+ GLIBC_2.2 {
+ # functions that must be shared with libc
+ __open64;
+ }
GLIBC_2.2.6 {
# this also must be shared with libc.
__errno_location;
@@ -31,7 +40,7 @@ ld {
_dl_init_first;
# functions that must be shared with libc
- __libc_read; __libc_write; __libc_lseek64;
+ __access_noerrno; __libc_read; __libc_write; __libc_lseek64;
__libc_lock_self0;
}
}
diff --git a/sysdeps/mach/hurd/_exit.c b/sysdeps/mach/hurd/_exit.c
index f057768c3c..3cbda3ffa9 100644
--- a/sysdeps/mach/hurd/_exit.c
+++ b/sysdeps/mach/hurd/_exit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/accept.c b/sysdeps/mach/hurd/accept.c
index 870a53af09..a6a3a9a0a0 100644
--- a/sysdeps/mach/hurd/accept.c
+++ b/sysdeps/mach/hurd/accept.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/sysdeps/mach/hurd/accept4.c b/sysdeps/mach/hurd/accept4.c
index 9a64b06798..92bf92ddc3 100644
--- a/sysdeps/mach/hurd/accept4.c
+++ b/sysdeps/mach/hurd/accept4.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/sysdeps/mach/hurd/access.c b/sysdeps/mach/hurd/access.c
index dc64183f96..31fd5bea56 100644
--- a/sysdeps/mach/hurd/access.c
+++ b/sysdeps/mach/hurd/access.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -15,14 +15,24 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
+/* Test for access to FILE by our real user and group IDs without setting
+ errno. This may be unsafe to run during initialization of tunables
+ since access_common calls __hurd_file_name_lookup, which calls
+ __hurd_file_name_lookup_retry, which can set errno. */
+int
+__access_noerrno (const char *file, int type)
+{
+ return __faccessat_noerrno (AT_FDCWD, file, type, 0);
+}
+
/* Test for access to FILE by our real user and group IDs. */
int
__access (const char *file, int type)
{
return __faccessat (AT_FDCWD, file, type, 0);
}
-
weak_alias (__access, access)
diff --git a/sysdeps/mach/hurd/adjtime.c b/sysdeps/mach/hurd/adjtime.c
index d65b95b9c6..66ee42a6ff 100644
--- a/sysdeps/mach/hurd/adjtime.c
+++ b/sysdeps/mach/hurd/adjtime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -28,11 +28,15 @@ __adjtime (const struct timeval *delta, struct timeval *olddelta)
{
error_t err;
mach_port_t hostpriv;
+ struct timeval dummy;
err = __get_privileged_ports (&hostpriv, NULL);
if (err)
return __hurd_fail (EPERM);
+ if (olddelta == NULL)
+ olddelta = &dummy;
+
err = __host_adjust_time (hostpriv,
/* `time_value_t' and `struct timeval' are in
fact identical with the names changed. */
diff --git a/sysdeps/mach/hurd/bind.c b/sysdeps/mach/hurd/bind.c
index e605e31c5f..fae826d534 100644
--- a/sysdeps/mach/hurd/bind.c
+++ b/sysdeps/mach/hurd/bind.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
diff --git a/sysdeps/mach/hurd/bits/errno.h b/sysdeps/mach/hurd/bits/errno.h
index d20ffe654a..8096fb9c05 100644
--- a/sysdeps/mach/hurd/bits/errno.h
+++ b/sysdeps/mach/hurd/bits/errno.h
@@ -1,329 +1,414 @@
-/* This file generated by errnos.awk. */
+/* This file generated by errnos.awk from
+ errno.texi
+ mach/message.h
+ mach/kern_return.h
+ mach/mig_errors.h
+ device/device_types.h
+ Do not edit this file; edit errnos.awk and regenerate it. */
-/* The Hurd uses Mach error system 0x10, currently only subsystem 0. */
-#ifndef _HURD_ERRNO
-#define _HURD_ERRNO(n) ((0x10 << 26) | ((n) & 0x3fff))
+#ifndef _BITS_ERRNO_H
+#define _BITS_ERRNO_H 1
+
+#if !defined _ERRNO_H
+# error "Never include <bits/errno.h> directly; use <errno.h> instead."
#endif
-#ifdef _ERRNO_H
+#ifndef __ASSEMBLER__
enum __error_t_codes
{
- /* The value zero always means success and it is perfectly fine for
- code to use 0 explicitly (or implicitly, e.g. via Boolean coercion).
- Having an enum entry for zero both makes the debugger print the name
- for error_t-typed zero values, and prevents the compiler from
- issuing warnings about 'case 0:' in a switch on an error_t-typed
- value. */
- ESUCCESS = 0,
+ /* The value zero always means success and it is perfectly fine
+ for code to use 0 explicitly (or implicitly, e.g. via Boolean
+ coercion.) Having an enum entry for zero both makes the
+ debugger print the name for error_t-typed zero values, and
+ prevents the compiler from issuing warnings about 'case 0:'
+ in a switch on an error_t-typed value. */
+ ESUCCESS = 0,
-#undef EDOM
-#undef ERANGE
- EPERM = _HURD_ERRNO (1),
-#define EPERM _HURD_ERRNO (1) /* Operation not permitted */
- ENOENT = _HURD_ERRNO (2),
-#define ENOENT _HURD_ERRNO (2) /* No such file or directory */
- ESRCH = _HURD_ERRNO (3),
-#define ESRCH _HURD_ERRNO (3) /* No such process */
- EINTR = _HURD_ERRNO (4),
-#define EINTR _HURD_ERRNO (4) /* Interrupted system call */
- EIO = _HURD_ERRNO (5),
-#define EIO _HURD_ERRNO (5) /* Input/output error */
- ENXIO = _HURD_ERRNO (6),
-#define ENXIO _HURD_ERRNO (6) /* No such device or address */
- E2BIG = _HURD_ERRNO (7),
-#define E2BIG _HURD_ERRNO (7) /* Argument list too long */
- ENOEXEC = _HURD_ERRNO (8),
-#define ENOEXEC _HURD_ERRNO (8) /* Exec format error */
- EBADF = _HURD_ERRNO (9),
-#define EBADF _HURD_ERRNO (9) /* Bad file descriptor */
- ECHILD = _HURD_ERRNO (10),
-#define ECHILD _HURD_ERRNO (10)/* No child processes */
- EDEADLK = _HURD_ERRNO (11),
-#define EDEADLK _HURD_ERRNO (11)/* Resource deadlock avoided */
- ENOMEM = _HURD_ERRNO (12),
-#define ENOMEM _HURD_ERRNO (12)/* Cannot allocate memory */
- EACCES = _HURD_ERRNO (13),
-#define EACCES _HURD_ERRNO (13)/* Permission denied */
- EFAULT = _HURD_ERRNO (14),
-#define EFAULT _HURD_ERRNO (14)/* Bad address */
- ENOTBLK = _HURD_ERRNO (15),
-#define ENOTBLK _HURD_ERRNO (15)/* Block device required */
- EBUSY = _HURD_ERRNO (16),
-#define EBUSY _HURD_ERRNO (16)/* Device or resource busy */
- EEXIST = _HURD_ERRNO (17),
-#define EEXIST _HURD_ERRNO (17)/* File exists */
- EXDEV = _HURD_ERRNO (18),
-#define EXDEV _HURD_ERRNO (18)/* Invalid cross-device link */
- ENODEV = _HURD_ERRNO (19),
-#define ENODEV _HURD_ERRNO (19)/* No such device */
- ENOTDIR = _HURD_ERRNO (20),
-#define ENOTDIR _HURD_ERRNO (20)/* Not a directory */
- EISDIR = _HURD_ERRNO (21),
-#define EISDIR _HURD_ERRNO (21)/* Is a directory */
- EINVAL = _HURD_ERRNO (22),
-#define EINVAL _HURD_ERRNO (22)/* Invalid argument */
- EMFILE = _HURD_ERRNO (24),
-#define EMFILE _HURD_ERRNO (24)/* Too many open files */
- ENFILE = _HURD_ERRNO (23),
-#define ENFILE _HURD_ERRNO (23)/* Too many open files in system */
- ENOTTY = _HURD_ERRNO (25),
-#define ENOTTY _HURD_ERRNO (25)/* Inappropriate ioctl for device */
- ETXTBSY = _HURD_ERRNO (26),
-#define ETXTBSY _HURD_ERRNO (26)/* Text file busy */
- EFBIG = _HURD_ERRNO (27),
-#define EFBIG _HURD_ERRNO (27)/* File too large */
- ENOSPC = _HURD_ERRNO (28),
-#define ENOSPC _HURD_ERRNO (28)/* No space left on device */
- ESPIPE = _HURD_ERRNO (29),
-#define ESPIPE _HURD_ERRNO (29)/* Illegal seek */
- EROFS = _HURD_ERRNO (30),
-#define EROFS _HURD_ERRNO (30)/* Read-only file system */
- EMLINK = _HURD_ERRNO (31),
-#define EMLINK _HURD_ERRNO (31)/* Too many links */
- EPIPE = _HURD_ERRNO (32),
-#define EPIPE _HURD_ERRNO (32)/* Broken pipe */
- EDOM = _HURD_ERRNO (33),
-#define EDOM _HURD_ERRNO (33)/* Numerical argument out of domain */
- ERANGE = _HURD_ERRNO (34),
-#define ERANGE _HURD_ERRNO (34)/* Numerical result out of range */
- EAGAIN = _HURD_ERRNO (35),
-#define EAGAIN _HURD_ERRNO (35)/* Resource temporarily unavailable */
-#define EWOULDBLOCK EAGAIN /* Operation would block */
- EINPROGRESS = _HURD_ERRNO (36),
-#define EINPROGRESS _HURD_ERRNO (36)/* Operation now in progress */
- EALREADY = _HURD_ERRNO (37),
-#define EALREADY _HURD_ERRNO (37)/* Operation already in progress */
- ENOTSOCK = _HURD_ERRNO (38),
-#define ENOTSOCK _HURD_ERRNO (38)/* Socket operation on non-socket */
- EMSGSIZE = _HURD_ERRNO (40),
-#define EMSGSIZE _HURD_ERRNO (40)/* Message too long */
- EPROTOTYPE = _HURD_ERRNO (41),
-#define EPROTOTYPE _HURD_ERRNO (41)/* Protocol wrong type for socket */
- ENOPROTOOPT = _HURD_ERRNO (42),
-#define ENOPROTOOPT _HURD_ERRNO (42)/* Protocol not available */
- EPROTONOSUPPORT = _HURD_ERRNO (43),
-#define EPROTONOSUPPORT _HURD_ERRNO (43)/* Protocol not supported */
- ESOCKTNOSUPPORT = _HURD_ERRNO (44),
-#define ESOCKTNOSUPPORT _HURD_ERRNO (44)/* Socket type not supported */
- EOPNOTSUPP = _HURD_ERRNO (45),
-#define EOPNOTSUPP _HURD_ERRNO (45)/* Operation not supported */
- EPFNOSUPPORT = _HURD_ERRNO (46),
-#define EPFNOSUPPORT _HURD_ERRNO (46)/* Protocol family not supported */
- EAFNOSUPPORT = _HURD_ERRNO (47),
-#define EAFNOSUPPORT _HURD_ERRNO (47)/* Address family not supported by protocol */
- EADDRINUSE = _HURD_ERRNO (48),
-#define EADDRINUSE _HURD_ERRNO (48)/* Address already in use */
- EADDRNOTAVAIL = _HURD_ERRNO (49),
-#define EADDRNOTAVAIL _HURD_ERRNO (49)/* Cannot assign requested address */
- ENETDOWN = _HURD_ERRNO (50),
-#define ENETDOWN _HURD_ERRNO (50)/* Network is down */
- ENETUNREACH = _HURD_ERRNO (51),
-#define ENETUNREACH _HURD_ERRNO (51)/* Network is unreachable */
- ENETRESET = _HURD_ERRNO (52),
-#define ENETRESET _HURD_ERRNO (52)/* Network dropped connection on reset */
- ECONNABORTED = _HURD_ERRNO (53),
-#define ECONNABORTED _HURD_ERRNO (53)/* Software caused connection abort */
- ECONNRESET = _HURD_ERRNO (54),
-#define ECONNRESET _HURD_ERRNO (54)/* Connection reset by peer */
- ENOBUFS = _HURD_ERRNO (55),
-#define ENOBUFS _HURD_ERRNO (55)/* No buffer space available */
- EISCONN = _HURD_ERRNO (56),
-#define EISCONN _HURD_ERRNO (56)/* Transport endpoint is already connected */
- ENOTCONN = _HURD_ERRNO (57),
-#define ENOTCONN _HURD_ERRNO (57)/* Transport endpoint is not connected */
- EDESTADDRREQ = _HURD_ERRNO (39),
-#define EDESTADDRREQ _HURD_ERRNO (39)/* Destination address required */
- ESHUTDOWN = _HURD_ERRNO (58),
-#define ESHUTDOWN _HURD_ERRNO (58)/* Cannot send after transport endpoint shutdown */
- ETOOMANYREFS = _HURD_ERRNO (59),
-#define ETOOMANYREFS _HURD_ERRNO (59)/* Too many references: cannot splice */
- ETIMEDOUT = _HURD_ERRNO (60),
-#define ETIMEDOUT _HURD_ERRNO (60)/* Connection timed out */
- ECONNREFUSED = _HURD_ERRNO (61),
-#define ECONNREFUSED _HURD_ERRNO (61)/* Connection refused */
- ELOOP = _HURD_ERRNO (62),
-#define ELOOP _HURD_ERRNO (62)/* Too many levels of symbolic links */
- ENAMETOOLONG = _HURD_ERRNO (63),
-#define ENAMETOOLONG _HURD_ERRNO (63)/* File name too long */
- EHOSTDOWN = _HURD_ERRNO (64),
-#define EHOSTDOWN _HURD_ERRNO (64)/* Host is down */
- EHOSTUNREACH = _HURD_ERRNO (65),
-#define EHOSTUNREACH _HURD_ERRNO (65)/* No route to host */
- ENOTEMPTY = _HURD_ERRNO (66),
-#define ENOTEMPTY _HURD_ERRNO (66)/* Directory not empty */
- EPROCLIM = _HURD_ERRNO (67),
-#define EPROCLIM _HURD_ERRNO (67)/* Too many processes */
- EUSERS = _HURD_ERRNO (68),
-#define EUSERS _HURD_ERRNO (68)/* Too many users */
- EDQUOT = _HURD_ERRNO (69),
-#define EDQUOT _HURD_ERRNO (69)/* Disk quota exceeded */
- ESTALE = _HURD_ERRNO (70),
-#define ESTALE _HURD_ERRNO (70)/* Stale file handle */
- EREMOTE = _HURD_ERRNO (71),
-#define EREMOTE _HURD_ERRNO (71)/* Object is remote */
- EBADRPC = _HURD_ERRNO (72),
-#define EBADRPC _HURD_ERRNO (72)/* RPC struct is bad */
- ERPCMISMATCH = _HURD_ERRNO (73),
-#define ERPCMISMATCH _HURD_ERRNO (73)/* RPC version wrong */
- EPROGUNAVAIL = _HURD_ERRNO (74),
-#define EPROGUNAVAIL _HURD_ERRNO (74)/* RPC program not available */
- EPROGMISMATCH = _HURD_ERRNO (75),
-#define EPROGMISMATCH _HURD_ERRNO (75)/* RPC program version wrong */
- EPROCUNAVAIL = _HURD_ERRNO (76),
-#define EPROCUNAVAIL _HURD_ERRNO (76)/* RPC bad procedure for program */
- ENOLCK = _HURD_ERRNO (77),
-#define ENOLCK _HURD_ERRNO (77)/* No locks available */
- EFTYPE = _HURD_ERRNO (79),
-#define EFTYPE _HURD_ERRNO (79)/* Inappropriate file type or format */
- EAUTH = _HURD_ERRNO (80),
-#define EAUTH _HURD_ERRNO (80)/* Authentication error */
- ENEEDAUTH = _HURD_ERRNO (81),
-#define ENEEDAUTH _HURD_ERRNO (81)/* Need authenticator */
- ENOSYS = _HURD_ERRNO (78),
-#define ENOSYS _HURD_ERRNO (78)/* Function not implemented */
- ENOTSUP = _HURD_ERRNO (118),
-#define ENOTSUP _HURD_ERRNO (118)/* Not supported */
- EILSEQ = _HURD_ERRNO (106),
-#define EILSEQ _HURD_ERRNO (106)/* Invalid or incomplete multibyte or wide character */
- EBACKGROUND = _HURD_ERRNO (100),
-#define EBACKGROUND _HURD_ERRNO (100)/* Inappropriate operation for background process */
- EDIED = _HURD_ERRNO (101),
-#define EDIED _HURD_ERRNO (101)/* Translator died */
- ED = _HURD_ERRNO (102),
-#define ED _HURD_ERRNO (102)/* ? */
- EGREGIOUS = _HURD_ERRNO (103),
-#define EGREGIOUS _HURD_ERRNO (103)/* You really blew it this time */
- EIEIO = _HURD_ERRNO (104),
-#define EIEIO _HURD_ERRNO (104)/* Computer bought the farm */
- EGRATUITOUS = _HURD_ERRNO (105),
-#define EGRATUITOUS _HURD_ERRNO (105)/* Gratuitous error */
- EBADMSG = _HURD_ERRNO (107),
-#define EBADMSG _HURD_ERRNO (107)/* Bad message */
- EIDRM = _HURD_ERRNO (108),
-#define EIDRM _HURD_ERRNO (108)/* Identifier removed */
- EMULTIHOP = _HURD_ERRNO (109),
-#define EMULTIHOP _HURD_ERRNO (109)/* Multihop attempted */
- ENODATA = _HURD_ERRNO (110),
-#define ENODATA _HURD_ERRNO (110)/* No data available */
- ENOLINK = _HURD_ERRNO (111),
-#define ENOLINK _HURD_ERRNO (111)/* Link has been severed */
- ENOMSG = _HURD_ERRNO (112),
-#define ENOMSG _HURD_ERRNO (112)/* No message of desired type */
- ENOSR = _HURD_ERRNO (113),
-#define ENOSR _HURD_ERRNO (113)/* Out of streams resources */
- ENOSTR = _HURD_ERRNO (114),
-#define ENOSTR _HURD_ERRNO (114)/* Device not a stream */
- EOVERFLOW = _HURD_ERRNO (115),
-#define EOVERFLOW _HURD_ERRNO (115)/* Value too large for defined data type */
- EPROTO = _HURD_ERRNO (116),
-#define EPROTO _HURD_ERRNO (116)/* Protocol error */
- ETIME = _HURD_ERRNO (117),
-#define ETIME _HURD_ERRNO (117)/* Timer expired */
- ECANCELED = _HURD_ERRNO (119),
-#define ECANCELED _HURD_ERRNO (119)/* Operation canceled */
+ /* The Hurd uses Mach error system 0x10, subsystem 0. */
+ EPERM = 0x40000001, /* Operation not permitted */
+ ENOENT = 0x40000002, /* No such file or directory */
+ ESRCH = 0x40000003, /* No such process */
+ EINTR = 0x40000004, /* Interrupted system call */
+ EIO = 0x40000005, /* Input/output error */
+ ENXIO = 0x40000006, /* No such device or address */
+ E2BIG = 0x40000007, /* Argument list too long */
+ ENOEXEC = 0x40000008, /* Exec format error */
+ EBADF = 0x40000009, /* Bad file descriptor */
+ ECHILD = 0x4000000a, /* No child processes */
+ EDEADLK = 0x4000000b, /* Resource deadlock avoided */
+ ENOMEM = 0x4000000c, /* Cannot allocate memory */
+ EACCES = 0x4000000d, /* Permission denied */
+ EFAULT = 0x4000000e, /* Bad address */
+ ENOTBLK = 0x4000000f, /* Block device required */
+ EBUSY = 0x40000010, /* Device or resource busy */
+ EEXIST = 0x40000011, /* File exists */
+ EXDEV = 0x40000012, /* Invalid cross-device link */
+ ENODEV = 0x40000013, /* No such device */
+ ENOTDIR = 0x40000014, /* Not a directory */
+ EISDIR = 0x40000015, /* Is a directory */
+ EINVAL = 0x40000016, /* Invalid argument */
+ EMFILE = 0x40000018, /* Too many open files */
+ ENFILE = 0x40000017, /* Too many open files in system */
+ ENOTTY = 0x40000019, /* Inappropriate ioctl for device */
+ ETXTBSY = 0x4000001a, /* Text file busy */
+ EFBIG = 0x4000001b, /* File too large */
+ ENOSPC = 0x4000001c, /* No space left on device */
+ ESPIPE = 0x4000001d, /* Illegal seek */
+ EROFS = 0x4000001e, /* Read-only file system */
+ EMLINK = 0x4000001f, /* Too many links */
+ EPIPE = 0x40000020, /* Broken pipe */
+ EDOM = 0x40000021, /* Numerical argument out of domain */
+ ERANGE = 0x40000022, /* Numerical result out of range */
+ EAGAIN = 0x40000023, /* Resource temporarily unavailable */
+ EINPROGRESS = 0x40000024, /* Operation now in progress */
+ EALREADY = 0x40000025, /* Operation already in progress */
+ ENOTSOCK = 0x40000026, /* Socket operation on non-socket */
+ EMSGSIZE = 0x40000028, /* Message too long */
+ EPROTOTYPE = 0x40000029, /* Protocol wrong type for socket */
+ ENOPROTOOPT = 0x4000002a, /* Protocol not available */
+ EPROTONOSUPPORT = 0x4000002b, /* Protocol not supported */
+ ESOCKTNOSUPPORT = 0x4000002c, /* Socket type not supported */
+ EOPNOTSUPP = 0x4000002d, /* Operation not supported */
+ EPFNOSUPPORT = 0x4000002e, /* Protocol family not supported */
+ EAFNOSUPPORT = 0x4000002f, /* Address family not supported by protocol */
+ EADDRINUSE = 0x40000030, /* Address already in use */
+ EADDRNOTAVAIL = 0x40000031, /* Cannot assign requested address */
+ ENETDOWN = 0x40000032, /* Network is down */
+ ENETUNREACH = 0x40000033, /* Network is unreachable */
+ ENETRESET = 0x40000034, /* Network dropped connection on reset */
+ ECONNABORTED = 0x40000035, /* Software caused connection abort */
+ ECONNRESET = 0x40000036, /* Connection reset by peer */
+ ENOBUFS = 0x40000037, /* No buffer space available */
+ EISCONN = 0x40000038, /* Transport endpoint is already connected */
+ ENOTCONN = 0x40000039, /* Transport endpoint is not connected */
+ EDESTADDRREQ = 0x40000027, /* Destination address required */
+ ESHUTDOWN = 0x4000003a, /* Cannot send after transport endpoint shutdown */
+ ETOOMANYREFS = 0x4000003b, /* Too many references: cannot splice */
+ ETIMEDOUT = 0x4000003c, /* Connection timed out */
+ ECONNREFUSED = 0x4000003d, /* Connection refused */
+ ELOOP = 0x4000003e, /* Too many levels of symbolic links */
+ ENAMETOOLONG = 0x4000003f, /* File name too long */
+ EHOSTDOWN = 0x40000040, /* Host is down */
+ EHOSTUNREACH = 0x40000041, /* No route to host */
+ ENOTEMPTY = 0x40000042, /* Directory not empty */
+ EPROCLIM = 0x40000043, /* Too many processes */
+ EUSERS = 0x40000044, /* Too many users */
+ EDQUOT = 0x40000045, /* Disk quota exceeded */
+ ESTALE = 0x40000046, /* Stale file handle */
+ EREMOTE = 0x40000047, /* Object is remote */
+ EBADRPC = 0x40000048, /* RPC struct is bad */
+ ERPCMISMATCH = 0x40000049, /* RPC version wrong */
+ EPROGUNAVAIL = 0x4000004a, /* RPC program not available */
+ EPROGMISMATCH = 0x4000004b, /* RPC program version wrong */
+ EPROCUNAVAIL = 0x4000004c, /* RPC bad procedure for program */
+ ENOLCK = 0x4000004d, /* No locks available */
+ EFTYPE = 0x4000004f, /* Inappropriate file type or format */
+ EAUTH = 0x40000050, /* Authentication error */
+ ENEEDAUTH = 0x40000051, /* Need authenticator */
+ ENOSYS = 0x4000004e, /* Function not implemented */
+ ENOTSUP = 0x40000076, /* Not supported */
+ EILSEQ = 0x4000006a, /* Invalid or incomplete multibyte or wide character */
+ EBACKGROUND = 0x40000064, /* Inappropriate operation for background process */
+ EDIED = 0x40000065, /* Translator died */
+ ED = 0x40000066, /* ? */
+ EGREGIOUS = 0x40000067, /* You really blew it this time */
+ EIEIO = 0x40000068, /* Computer bought the farm */
+ EGRATUITOUS = 0x40000069, /* Gratuitous error */
+ EBADMSG = 0x4000006b, /* Bad message */
+ EIDRM = 0x4000006c, /* Identifier removed */
+ EMULTIHOP = 0x4000006d, /* Multihop attempted */
+ ENODATA = 0x4000006e, /* No data available */
+ ENOLINK = 0x4000006f, /* Link has been severed */
+ ENOMSG = 0x40000070, /* No message of desired type */
+ ENOSR = 0x40000071, /* Out of streams resources */
+ ENOSTR = 0x40000072, /* Device not a stream */
+ EOVERFLOW = 0x40000073, /* Value too large for defined data type */
+ EPROTO = 0x40000074, /* Protocol error */
+ ETIME = 0x40000075, /* Timer expired */
+ ECANCELED = 0x40000077, /* Operation canceled */
+ EOWNERDEAD = 0x40000078, /* Owner died */
+ ENOTRECOVERABLE = 0x40000079, /* State not recoverable */
- /* Errors from <mach/message.h>. */
- EMACH_SEND_IN_PROGRESS = 0x10000001,
- EMACH_SEND_INVALID_DATA = 0x10000002,
- EMACH_SEND_INVALID_DEST = 0x10000003,
- EMACH_SEND_TIMED_OUT = 0x10000004,
- EMACH_SEND_WILL_NOTIFY = 0x10000005,
- EMACH_SEND_NOTIFY_IN_PROGRESS = 0x10000006,
- EMACH_SEND_INTERRUPTED = 0x10000007,
- EMACH_SEND_MSG_TOO_SMALL = 0x10000008,
- EMACH_SEND_INVALID_REPLY = 0x10000009,
- EMACH_SEND_INVALID_RIGHT = 0x1000000a,
- EMACH_SEND_INVALID_NOTIFY = 0x1000000b,
- EMACH_SEND_INVALID_MEMORY = 0x1000000c,
- EMACH_SEND_NO_BUFFER = 0x1000000d,
- EMACH_SEND_NO_NOTIFY = 0x1000000e,
- EMACH_SEND_INVALID_TYPE = 0x1000000f,
- EMACH_SEND_INVALID_HEADER = 0x10000010,
- EMACH_RCV_IN_PROGRESS = 0x10004001,
- EMACH_RCV_INVALID_NAME = 0x10004002,
- EMACH_RCV_TIMED_OUT = 0x10004003,
- EMACH_RCV_TOO_LARGE = 0x10004004,
- EMACH_RCV_INTERRUPTED = 0x10004005,
- EMACH_RCV_PORT_CHANGED = 0x10004006,
- EMACH_RCV_INVALID_NOTIFY = 0x10004007,
- EMACH_RCV_INVALID_DATA = 0x10004008,
- EMACH_RCV_PORT_DIED = 0x10004009,
- EMACH_RCV_IN_SET = 0x1000400a,
- EMACH_RCV_HEADER_ERROR = 0x1000400b,
- EMACH_RCV_BODY_ERROR = 0x1000400c,
+/* Errors from <mach/message.h>. */
+ EMACH_SEND_IN_PROGRESS = 0x10000001,
+ EMACH_SEND_INVALID_DATA = 0x10000002,
+ EMACH_SEND_INVALID_DEST = 0x10000003,
+ EMACH_SEND_TIMED_OUT = 0x10000004,
+ EMACH_SEND_WILL_NOTIFY = 0x10000005,
+ EMACH_SEND_NOTIFY_IN_PROGRESS = 0x10000006,
+ EMACH_SEND_INTERRUPTED = 0x10000007,
+ EMACH_SEND_MSG_TOO_SMALL = 0x10000008,
+ EMACH_SEND_INVALID_REPLY = 0x10000009,
+ EMACH_SEND_INVALID_RIGHT = 0x1000000a,
+ EMACH_SEND_INVALID_NOTIFY = 0x1000000b,
+ EMACH_SEND_INVALID_MEMORY = 0x1000000c,
+ EMACH_SEND_NO_BUFFER = 0x1000000d,
+ EMACH_SEND_NO_NOTIFY = 0x1000000e,
+ EMACH_SEND_INVALID_TYPE = 0x1000000f,
+ EMACH_SEND_INVALID_HEADER = 0x10000010,
+ EMACH_RCV_IN_PROGRESS = 0x10004001,
+ EMACH_RCV_INVALID_NAME = 0x10004002,
+ EMACH_RCV_TIMED_OUT = 0x10004003,
+ EMACH_RCV_TOO_LARGE = 0x10004004,
+ EMACH_RCV_INTERRUPTED = 0x10004005,
+ EMACH_RCV_PORT_CHANGED = 0x10004006,
+ EMACH_RCV_INVALID_NOTIFY = 0x10004007,
+ EMACH_RCV_INVALID_DATA = 0x10004008,
+ EMACH_RCV_PORT_DIED = 0x10004009,
+ EMACH_RCV_IN_SET = 0x1000400a,
+ EMACH_RCV_HEADER_ERROR = 0x1000400b,
+ EMACH_RCV_BODY_ERROR = 0x1000400c,
- /* Errors from <mach/kern_return.h>. */
- EKERN_INVALID_ADDRESS = 1,
- EKERN_PROTECTION_FAILURE = 2,
- EKERN_NO_SPACE = 3,
- EKERN_INVALID_ARGUMENT = 4,
- EKERN_FAILURE = 5,
- EKERN_RESOURCE_SHORTAGE = 6,
- EKERN_NOT_RECEIVER = 7,
- EKERN_NO_ACCESS = 8,
- EKERN_MEMORY_FAILURE = 9,
- EKERN_MEMORY_ERROR = 10,
- EKERN_NOT_IN_SET = 12,
- EKERN_NAME_EXISTS = 13,
- EKERN_ABORTED = 14,
- EKERN_INVALID_NAME = 15,
- EKERN_INVALID_TASK = 16,
- EKERN_INVALID_RIGHT = 17,
- EKERN_INVALID_VALUE = 18,
- EKERN_UREFS_OVERFLOW = 19,
- EKERN_INVALID_CAPABILITY = 20,
- EKERN_RIGHT_EXISTS = 21,
- EKERN_INVALID_HOST = 22,
- EKERN_MEMORY_PRESENT = 23,
- EKERN_WRITE_PROTECTION_FAILURE = 24,
- EKERN_TERMINATED = 26,
+/* Errors from <mach/kern_return.h>. */
+ EKERN_INVALID_ADDRESS = 1,
+ EKERN_PROTECTION_FAILURE = 2,
+ EKERN_NO_SPACE = 3,
+ EKERN_INVALID_ARGUMENT = 4,
+ EKERN_FAILURE = 5,
+ EKERN_RESOURCE_SHORTAGE = 6,
+ EKERN_NOT_RECEIVER = 7,
+ EKERN_NO_ACCESS = 8,
+ EKERN_MEMORY_FAILURE = 9,
+ EKERN_MEMORY_ERROR = 10,
+ EKERN_NOT_IN_SET = 12,
+ EKERN_NAME_EXISTS = 13,
+ EKERN_ABORTED = 14,
+ EKERN_INVALID_NAME = 15,
+ EKERN_INVALID_TASK = 16,
+ EKERN_INVALID_RIGHT = 17,
+ EKERN_INVALID_VALUE = 18,
+ EKERN_UREFS_OVERFLOW = 19,
+ EKERN_INVALID_CAPABILITY = 20,
+ EKERN_RIGHT_EXISTS = 21,
+ EKERN_INVALID_HOST = 22,
+ EKERN_MEMORY_PRESENT = 23,
+ EKERN_WRITE_PROTECTION_FAILURE = 24,
+ EKERN_TERMINATED = 26,
+ EKERN_TIMEDOUT = 27,
+ EKERN_INTERRUPTED = 28,
- /* Errors from <mach/mig_errors.h>. */
- EMIG_TYPE_ERROR = -300 /* client type check failure */,
- EMIG_REPLY_MISMATCH = -301 /* wrong reply message ID */,
- EMIG_REMOTE_ERROR = -302 /* server detected error */,
- EMIG_BAD_ID = -303 /* bad request message ID */,
- EMIG_BAD_ARGUMENTS = -304 /* server type check failure */,
- EMIG_NO_REPLY = -305 /* no reply should be sent */,
- EMIG_EXCEPTION = -306 /* server raised exception */,
- EMIG_ARRAY_TOO_LARGE = -307 /* array not large enough */,
- EMIG_SERVER_DIED = -308 /* server died */,
- EMIG_DESTROY_REQUEST = -309 /* destroy request with no reply */,
+/* Errors from <mach/mig_errors.h>. */
+ EMIG_TYPE_ERROR = -300, /* client type check failure */
+ EMIG_REPLY_MISMATCH = -301, /* wrong reply message ID */
+ EMIG_REMOTE_ERROR = -302, /* server detected error */
+ EMIG_BAD_ID = -303, /* bad request message ID */
+ EMIG_BAD_ARGUMENTS = -304, /* server type check failure */
+ EMIG_NO_REPLY = -305, /* no reply should be sent */
+ EMIG_EXCEPTION = -306, /* server raised exception */
+ EMIG_ARRAY_TOO_LARGE = -307, /* array not large enough */
+ EMIG_SERVER_DIED = -308, /* server died */
+ EMIG_DESTROY_REQUEST = -309, /* destroy request with no reply */
- /* Errors from <device/device_types.h>. */
- ED_IO_ERROR = 2500 /* hardware IO error */,
- ED_WOULD_BLOCK = 2501 /* would block, but D_NOWAIT set */,
- ED_NO_SUCH_DEVICE = 2502 /* no such device */,
- ED_ALREADY_OPEN = 2503 /* exclusive-use device already open */,
- ED_DEVICE_DOWN = 2504 /* device has been shut down */,
- ED_INVALID_OPERATION = 2505 /* bad operation for device */,
- ED_INVALID_RECNUM = 2506 /* invalid record (block) number */,
- ED_INVALID_SIZE = 2507 /* invalid IO size */,
- ED_NO_MEMORY = 2508 /* memory allocation failure */,
- ED_READ_ONLY = 2509 /* device cannot be written to */
+/* Errors from <device/device_types.h>. */
+ ED_IO_ERROR = 2500, /* hardware IO error */
+ ED_WOULD_BLOCK = 2501, /* would block, but D_NOWAIT set */
+ ED_NO_SUCH_DEVICE = 2502, /* no such device */
+ ED_ALREADY_OPEN = 2503, /* exclusive-use device already open */
+ ED_DEVICE_DOWN = 2504, /* device has been shut down */
+ ED_INVALID_OPERATION = 2505, /* bad operation for device */
+ ED_INVALID_RECNUM = 2506, /* invalid record (block) number */
+ ED_INVALID_SIZE = 2507, /* invalid IO size */
+ ED_NO_MEMORY = 2508, /* memory allocation failure */
+ ED_READ_ONLY = 2509, /* device cannot be written to */
+ /* Because the C standard requires that errno have type 'int',
+ this enumeration must be a signed type. */
+ __FORCE_ERROR_T_CODES_SIGNED = -1
};
-#define _HURD_ERRNOS 120
+#endif /* not __ASSEMBLER__ */
-/* User-visible type of error codes. It is ok to use `int' or
- `kern_return_t' for these, but with `error_t' the debugger prints
- symbolic values. */
-#ifdef __USE_GNU
-typedef enum __error_t_codes error_t;
-#define __error_t_defined 1
-#endif
+/* The C standard requires that all of the E-constants be
+ defined as macros. */
+
+#define EPERM 0x40000001
+#define ENOENT 0x40000002
+#define ESRCH 0x40000003
+#define EINTR 0x40000004
+#define EIO 0x40000005
+#define ENXIO 0x40000006
+#define E2BIG 0x40000007
+#define ENOEXEC 0x40000008
+#define EBADF 0x40000009
+#define ECHILD 0x4000000a
+#define EDEADLK 0x4000000b
+#define ENOMEM 0x4000000c
+#define EACCES 0x4000000d
+#define EFAULT 0x4000000e
+#define ENOTBLK 0x4000000f
+#define EBUSY 0x40000010
+#define EEXIST 0x40000011
+#define EXDEV 0x40000012
+#define ENODEV 0x40000013
+#define ENOTDIR 0x40000014
+#define EISDIR 0x40000015
+#define EINVAL 0x40000016
+#define EMFILE 0x40000018
+#define ENFILE 0x40000017
+#define ENOTTY 0x40000019
+#define ETXTBSY 0x4000001a
+#define EFBIG 0x4000001b
+#define ENOSPC 0x4000001c
+#define ESPIPE 0x4000001d
+#define EROFS 0x4000001e
+#define EMLINK 0x4000001f
+#define EPIPE 0x40000020
+#define EDOM 0x40000021
+#define ERANGE 0x40000022
+#define EAGAIN 0x40000023
+#define EWOULDBLOCK EAGAIN
+#define EINPROGRESS 0x40000024
+#define EALREADY 0x40000025
+#define ENOTSOCK 0x40000026
+#define EMSGSIZE 0x40000028
+#define EPROTOTYPE 0x40000029
+#define ENOPROTOOPT 0x4000002a
+#define EPROTONOSUPPORT 0x4000002b
+#define ESOCKTNOSUPPORT 0x4000002c
+#define EOPNOTSUPP 0x4000002d
+#define EPFNOSUPPORT 0x4000002e
+#define EAFNOSUPPORT 0x4000002f
+#define EADDRINUSE 0x40000030
+#define EADDRNOTAVAIL 0x40000031
+#define ENETDOWN 0x40000032
+#define ENETUNREACH 0x40000033
+#define ENETRESET 0x40000034
+#define ECONNABORTED 0x40000035
+#define ECONNRESET 0x40000036
+#define ENOBUFS 0x40000037
+#define EISCONN 0x40000038
+#define ENOTCONN 0x40000039
+#define EDESTADDRREQ 0x40000027
+#define ESHUTDOWN 0x4000003a
+#define ETOOMANYREFS 0x4000003b
+#define ETIMEDOUT 0x4000003c
+#define ECONNREFUSED 0x4000003d
+#define ELOOP 0x4000003e
+#define ENAMETOOLONG 0x4000003f
+#define EHOSTDOWN 0x40000040
+#define EHOSTUNREACH 0x40000041
+#define ENOTEMPTY 0x40000042
+#define EPROCLIM 0x40000043
+#define EUSERS 0x40000044
+#define EDQUOT 0x40000045
+#define ESTALE 0x40000046
+#define EREMOTE 0x40000047
+#define EBADRPC 0x40000048
+#define ERPCMISMATCH 0x40000049
+#define EPROGUNAVAIL 0x4000004a
+#define EPROGMISMATCH 0x4000004b
+#define EPROCUNAVAIL 0x4000004c
+#define ENOLCK 0x4000004d
+#define EFTYPE 0x4000004f
+#define EAUTH 0x40000050
+#define ENEEDAUTH 0x40000051
+#define ENOSYS 0x4000004e
+#define ENOTSUP 0x40000076
+#define EILSEQ 0x4000006a
+#define EBACKGROUND 0x40000064
+#define EDIED 0x40000065
+#define ED 0x40000066
+#define EGREGIOUS 0x40000067
+#define EIEIO 0x40000068
+#define EGRATUITOUS 0x40000069
+#define EBADMSG 0x4000006b
+#define EIDRM 0x4000006c
+#define EMULTIHOP 0x4000006d
+#define ENODATA 0x4000006e
+#define ENOLINK 0x4000006f
+#define ENOMSG 0x40000070
+#define ENOSR 0x40000071
+#define ENOSTR 0x40000072
+#define EOVERFLOW 0x40000073
+#define EPROTO 0x40000074
+#define ETIME 0x40000075
+#define ECANCELED 0x40000077
+#define EOWNERDEAD 0x40000078
+#define ENOTRECOVERABLE 0x40000079
+
+/* Errors from <mach/message.h>. */
+#define EMACH_SEND_IN_PROGRESS 0x10000001
+#define EMACH_SEND_INVALID_DATA 0x10000002
+#define EMACH_SEND_INVALID_DEST 0x10000003
+#define EMACH_SEND_TIMED_OUT 0x10000004
+#define EMACH_SEND_WILL_NOTIFY 0x10000005
+#define EMACH_SEND_NOTIFY_IN_PROGRESS 0x10000006
+#define EMACH_SEND_INTERRUPTED 0x10000007
+#define EMACH_SEND_MSG_TOO_SMALL 0x10000008
+#define EMACH_SEND_INVALID_REPLY 0x10000009
+#define EMACH_SEND_INVALID_RIGHT 0x1000000a
+#define EMACH_SEND_INVALID_NOTIFY 0x1000000b
+#define EMACH_SEND_INVALID_MEMORY 0x1000000c
+#define EMACH_SEND_NO_BUFFER 0x1000000d
+#define EMACH_SEND_NO_NOTIFY 0x1000000e
+#define EMACH_SEND_INVALID_TYPE 0x1000000f
+#define EMACH_SEND_INVALID_HEADER 0x10000010
+#define EMACH_RCV_IN_PROGRESS 0x10004001
+#define EMACH_RCV_INVALID_NAME 0x10004002
+#define EMACH_RCV_TIMED_OUT 0x10004003
+#define EMACH_RCV_TOO_LARGE 0x10004004
+#define EMACH_RCV_INTERRUPTED 0x10004005
+#define EMACH_RCV_PORT_CHANGED 0x10004006
+#define EMACH_RCV_INVALID_NOTIFY 0x10004007
+#define EMACH_RCV_INVALID_DATA 0x10004008
+#define EMACH_RCV_PORT_DIED 0x10004009
+#define EMACH_RCV_IN_SET 0x1000400a
+#define EMACH_RCV_HEADER_ERROR 0x1000400b
+#define EMACH_RCV_BODY_ERROR 0x1000400c
+
+/* Errors from <mach/kern_return.h>. */
+#define EKERN_INVALID_ADDRESS 1
+#define EKERN_PROTECTION_FAILURE 2
+#define EKERN_NO_SPACE 3
+#define EKERN_INVALID_ARGUMENT 4
+#define EKERN_FAILURE 5
+#define EKERN_RESOURCE_SHORTAGE 6
+#define EKERN_NOT_RECEIVER 7
+#define EKERN_NO_ACCESS 8
+#define EKERN_MEMORY_FAILURE 9
+#define EKERN_MEMORY_ERROR 10
+#define EKERN_NOT_IN_SET 12
+#define EKERN_NAME_EXISTS 13
+#define EKERN_ABORTED 14
+#define EKERN_INVALID_NAME 15
+#define EKERN_INVALID_TASK 16
+#define EKERN_INVALID_RIGHT 17
+#define EKERN_INVALID_VALUE 18
+#define EKERN_UREFS_OVERFLOW 19
+#define EKERN_INVALID_CAPABILITY 20
+#define EKERN_RIGHT_EXISTS 21
+#define EKERN_INVALID_HOST 22
+#define EKERN_MEMORY_PRESENT 23
+#define EKERN_WRITE_PROTECTION_FAILURE 24
+#define EKERN_TERMINATED 26
+#define EKERN_TIMEDOUT 27
+#define EKERN_INTERRUPTED 28
-/* Return the current thread's location for `errno'.
- The syntax of this function allows redeclarations like `int errno'. */
-extern int *__errno_location (void) __THROW __attribute__ ((__const__));
+/* Errors from <mach/mig_errors.h>. */
+#define EMIG_TYPE_ERROR -300
+#define EMIG_REPLY_MISMATCH -301
+#define EMIG_REMOTE_ERROR -302
+#define EMIG_BAD_ID -303
+#define EMIG_BAD_ARGUMENTS -304
+#define EMIG_NO_REPLY -305
+#define EMIG_EXCEPTION -306
+#define EMIG_ARRAY_TOO_LARGE -307
+#define EMIG_SERVER_DIED -308
+#define EMIG_DESTROY_REQUEST -309
-#define errno (*__errno_location ())
+/* Errors from <device/device_types.h>. */
+#define ED_IO_ERROR 2500
+#define ED_WOULD_BLOCK 2501
+#define ED_NO_SUCH_DEVICE 2502
+#define ED_ALREADY_OPEN 2503
+#define ED_DEVICE_DOWN 2504
+#define ED_INVALID_OPERATION 2505
+#define ED_INVALID_RECNUM 2506
+#define ED_INVALID_SIZE 2507
+#define ED_NO_MEMORY 2508
+#define ED_READ_ONLY 2509
-#endif /* <errno.h> included. */
+#define _HURD_ERRNOS 122
-#if !defined (_ERRNO_H) && defined (__need_Emath)
-#define EDOM _HURD_ERRNO (33)/* Numerical argument out of domain */
-#define ERANGE _HURD_ERRNO (34)/* Numerical result out of range */
-#endif /* <errno.h> not included and need math error codes. */
+#endif /* bits/errno.h. */
diff --git a/sysdeps/mach/hurd/bits/fcntl.h b/sysdeps/mach/hurd/bits/fcntl.h
index fbd0b0abae..2cfaa872a5 100644
--- a/sysdeps/mach/hurd/bits/fcntl.h
+++ b/sysdeps/mach/hurd/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for GNU.
- Copyright (C) 1993-2016 Free Software Foundation, Inc.
+ Copyright (C) 1993-2018 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,7 +135,7 @@
#ifdef __USE_MISC
-/* Bits in the file status flags returned by F_GETFL. */
+/* Flags for TIOCFLUSH. */
# define FREAD O_RDONLY
# define FWRITE O_WRONLY
diff --git a/sysdeps/mach/hurd/bits/ioctls.h b/sysdeps/mach/hurd/bits/ioctls.h
index 7a5a28d52c..91a15b5083 100644
--- a/sysdeps/mach/hurd/bits/ioctls.h
+++ b/sysdeps/mach/hurd/bits/ioctls.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
diff --git a/sysdeps/mach/hurd/bits/local_lim.h b/sysdeps/mach/hurd/bits/local_lim.h
index a7760eeb1d..97f87ad5d2 100644
--- a/sysdeps/mach/hurd/bits/local_lim.h
+++ b/sysdeps/mach/hurd/bits/local_lim.h
@@ -1,5 +1,5 @@
/* Minimum guaranteed maximum values for system limits. Hurd version.
- Copyright (C) 1993-2016 Free Software Foundation, Inc.
+ Copyright (C) 1993-2018 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
@@ -32,3 +32,12 @@
suitable, and `sysconf' will return a number at least as large. */
#define NGROUPS_MAX 256
+
+/* The number of data keys per process. */
+#define _POSIX_THREAD_KEYS_MAX 128
+
+/* Controlling the iterations of destructors for thread-specific data. */
+#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
+
+/* The number of threads per process. */
+#define _POSIX_THREAD_THREADS_MAX 64
diff --git a/sysdeps/mach/hurd/bits/param.h b/sysdeps/mach/hurd/bits/param.h
index 84cbf5acca..5d4faf793f 100644
--- a/sysdeps/mach/hurd/bits/param.h
+++ b/sysdeps/mach/hurd/bits/param.h
@@ -1,5 +1,5 @@
/* Old-style Unix parameters and limits. Hurd version.
- Copyright (C) 1993-2016 Free Software Foundation, Inc.
+ Copyright (C) 1993-2018 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
@@ -20,6 +20,8 @@
# error "Never use <bits/param.h> directly; include <sys/param.h> instead."
#endif
+#include <bits/mach/param.h>
+
/* This file is deprecated and is provided only for compatibility with
Unix systems. It is unwise to include this file on programs which
are intended only for GNU systems.
diff --git a/sysdeps/mach/hurd/bits/posix_opt.h b/sysdeps/mach/hurd/bits/posix_opt.h
index 3c9c8ac731..7fedc26788 100644
--- a/sysdeps/mach/hurd/bits/posix_opt.h
+++ b/sysdeps/mach/hurd/bits/posix_opt.h
@@ -1,5 +1,5 @@
/* Define POSIX options for GNU/Hurd.
- Copyright (C) 1998-2016 Free Software Foundation, Inc.
+ Copyright (C) 1998-2018 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
@@ -42,8 +42,8 @@
/* Mapping of files to memory is supported. */
#define _POSIX_MAPPED_FILES 200809L
-/* Locking of all memory could be supported in future. */
-#define _POSIX_MEMLOCK 0
+/* Locking of all memory is supported. */
+#define _POSIX_MEMLOCK 200809L
/* Locking of ranges of memory is supported. */
#define _POSIX_MEMLOCK_RANGE 200809L
@@ -53,13 +53,13 @@
/* Elements of the `c_cc' member of `struct termios' structure
can be disabled by using the value _POSIX_VDISABLE. */
-#define _POSIX_VDISABLE ((unsigned char) -1)
+#define _POSIX_VDISABLE '\0'
/* Different Hurd filesystems might do these differently.
You must query the particular file with `pathconf' or `fpathconf'. */
-#undef _POSIX_CHOWN_RESTRICTED /* Only root can change owner of file? */
-#undef _POSIX_NO_TRUNC /* Overlong file names get error? */
+#define _POSIX_CHOWN_RESTRICTED 0 /* Only root can change owner of file? */
+#define _POSIX_NO_TRUNC 0 /* Overlong file names get error? */
#undef _POSIX_SYNC_IO /* File supports O_SYNC et al? */
/* X/Open realtime support is not supported. */
@@ -71,24 +71,38 @@
/* XPG4.2 shared memory is supported. */
#define _XOPEN_SHM 1
-/* We do not have the POSIX threads interface. */
-#define _POSIX_THREADS -1
+/* Tell we have POSIX threads. */
+#define _POSIX_THREADS 200809L
/* We have the reentrant functions described in POSIX. */
#define _POSIX_REENTRANT_FUNCTIONS 1
#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L
-/* These are all things that won't be supported when _POSIX_THREADS is not. */
+/* We do not provide priority scheduling for threads. */
#define _POSIX_THREAD_PRIORITY_SCHEDULING -1
-#define _POSIX_THREAD_ATTR_STACKSIZE -1
-#define _POSIX_THREAD_ATTR_STACKADDR -1
+
+/* We support user-defined stack sizes. */
+#define _POSIX_THREAD_ATTR_STACKSIZE 200809L
+
+/* We support user-defined stacks. */
+#define _POSIX_THREAD_ATTR_STACKADDR 200809L
+
+/* We do not support priority inheritence. */
#define _POSIX_THREAD_PRIO_INHERIT -1
+
+/* We do not support priority protection. */
#define _POSIX_THREAD_PRIO_PROTECT -1
+
#ifdef __USE_XOPEN2K8
+/* We do not support priority inheritence for robust mutexes. */
# define _POSIX_THREAD_ROBUST_PRIO_INHERIT -1
+
+/* We do not support priority protection for robust mutexes. */
# define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1
#endif
-#define _POSIX_SEMAPHORES -1
+
+/* We support POSIX.1b semaphores. */
+#define _POSIX_SEMAPHORES 200809L
/* Real-time signals are not yet supported. */
#define _POSIX_REALTIME_SIGNALS -1
@@ -121,17 +135,17 @@
/* GNU libc provides regular expression handling. */
#define _POSIX_REGEXP 1
-/* Reader/Writer locks are not available. */
-#define _POSIX_READER_WRITER_LOCKS -1
+/* Reader/Writer locks are available. */
+#define _POSIX_READER_WRITER_LOCKS 200809L
/* We have a POSIX shell. */
#define _POSIX_SHELL 1
-/* We cannot support the Timeouts option without _POSIX_THREADS. */
-#define _POSIX_TIMEOUTS -1
+/* We support the Timeouts option. */
+#define _POSIX_TIMEOUTS 200809L
-/* We do not support spinlocks. */
-#define _POSIX_SPIN_LOCKS -1
+/* We support spinlocks. */
+#define _POSIX_SPIN_LOCKS 200809L
/* The `spawn' function family is supported. */
#define _POSIX_SPAWN 200809L
@@ -139,8 +153,8 @@
/* We do not have POSIX timers, but could in future without ABI change. */
#define _POSIX_TIMERS 0
-/* The barrier functions are not available. */
-#define _POSIX_BARRIERS -1
+/* The barrier functions are available. */
+#define _POSIX_BARRIERS 200809L
/* POSIX message queues could be available in future. */
#define _POSIX_MESSAGE_PASSING 0
diff --git a/sysdeps/mach/hurd/bits/socket.h b/sysdeps/mach/hurd/bits/socket.h
index 02c5dac032..18959139dc 100644
--- a/sysdeps/mach/hurd/bits/socket.h
+++ b/sysdeps/mach/hurd/bits/socket.h
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. Hurd version.
- Copyright (C) 1991-2016 Free Software Foundation, Inc.
+ Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -25,11 +25,10 @@
#endif
#define __need_size_t
-#define __need_NULL
#include <stddef.h>
-#include <limits.h> /* XXX Is this allowed? */
-#include <bits/types.h>
+#include <bits/wordsize.h>
+#include <sys/types.h>
/* Type for length arguments in socket calls. */
#ifndef __socklen_t_defined
@@ -131,13 +130,19 @@ enum __socket_type
#define AF_APPLETALK PF_APPLETALK
#define AF_ROUTE PF_ROUTE
#define AF_LINK PF_LINK
-#define pseudo_AF_XTP PF_XTP
+#ifdef __USE_MISC
+# define pseudo_AF_XTP PF_XTP
+#endif
#define AF_COIP PF_COIP
#define AF_CNT PF_CNT
-#define pseudo_AF_RTIP PF_RTIP
+#ifdef __USE_MISC
+# define pseudo_AF_RTIP PF_RTIP
+#endif
#define AF_IPX PF_IPX
#define AF_SIP PF_SIP
-#define pseudo_AF_PIP PF_PIP
+#ifdef __USE_MISC
+# define pseudo_AF_PIP PF_PIP
+#endif
#define AF_INET6 PF_INET6
#define AF_MAX PF_MAX
@@ -156,20 +161,20 @@ struct sockaddr
/* Structure large enough to hold any socket address (with the historical
- exception of AF_UNIX). We reserve 128 bytes. */
-#if ULONG_MAX > 0xffffffff
+ exception of AF_UNIX). */
+#if __WORDSIZE == 64
# define __ss_aligntype __uint64_t
#else
# define __ss_aligntype __uint32_t
#endif
-#define _SS_SIZE 128
-#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype)))
+#define _SS_PADSIZE \
+ (_SS_SIZE - __SOCKADDR_COMMON_SIZE - sizeof (__ss_aligntype))
struct sockaddr_storage
{
__SOCKADDR_COMMON (ss_); /* Address family, etc. */
- __ss_aligntype __ss_align; /* Force desired alignment. */
char __ss_padding[_SS_PADSIZE];
+ __ss_aligntype __ss_align; /* Force desired alignment. */
};
@@ -220,13 +225,13 @@ struct cmsghdr
of cmsghdr structure. */
int cmsg_level; /* Originating protocol. */
int cmsg_type; /* Protocol specific type. */
-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
+#if __glibc_c99_flexarr_available
__extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
#endif
};
/* Ancillary data object manipulation macros. */
-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
+#if __glibc_c99_flexarr_available
# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
#else
# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
@@ -236,7 +241,7 @@ struct cmsghdr
#define CMSG_FIRSTHDR(mhdr) \
((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
- ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
+ ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
& (size_t) ~(sizeof (size_t) - 1))
@@ -255,7 +260,7 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
{
if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
/* The kernel header does this so there may be a reason. */
- return NULL;
+ return (struct cmsghdr *) 0;
__cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ CMSG_ALIGN (__cmsg->cmsg_len));
@@ -264,7 +269,7 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
|| ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
> ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
/* No more entries. */
- return NULL;
+ return (struct cmsghdr *) 0;
return __cmsg;
}
#endif /* Use `extern inline'. */
@@ -280,6 +285,7 @@ enum
#define SCM_CREDS SCM_CREDS
};
+#ifdef __USE_MISC
/* Unfortunately, BSD practice dictates this structure be of fixed size.
If there are more than CMGROUP_MAX groups, the list is truncated.
(On GNU systems, the `cmcred_euid' field is just the first in the
@@ -300,6 +306,7 @@ struct cmsgcred
int cmcred_ngroups;
__gid_t cmcred_groups[CMGROUP_MAX];
};
+#endif
/* Protocol number used to manipulate socket-level options
with `getsockopt' and `setsockopt'. */
diff --git a/sysdeps/mach/hurd/bits/stat.h b/sysdeps/mach/hurd/bits/stat.h
index 3e4a7d247b..cb8680e000 100644
--- a/sysdeps/mach/hurd/bits/stat.h
+++ b/sysdeps/mach/hurd/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
@@ -255,4 +255,9 @@ extern int fchflags (int __fd, unsigned long int __flags) __THROW;
__END_DECLS
#endif
+#ifdef __USE_ATFILE
+# define UTIME_NOW -1 /* corresponds to the current time */
+# define UTIME_OMIT -2 /* target time is omitted */
+#endif
+
#endif /* bits/stat.h */
diff --git a/sysdeps/mach/hurd/bits/statfs.h b/sysdeps/mach/hurd/bits/statfs.h
index ab37e5a51f..82e570b222 100644
--- a/sysdeps/mach/hurd/bits/statfs.h
+++ b/sysdeps/mach/hurd/bits/statfs.h
@@ -1,5 +1,5 @@
/* Definition of `struct statfs', information about a filesystem.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 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
@@ -37,7 +37,7 @@
struct statfs
{
unsigned int f_type;
- unsigned int f_bsize;
+ unsigned long int f_bsize;
#ifndef __USE_FILE_OFFSET64
__fsblkcnt_t f_blocks;
__fsblkcnt_t f_bfree;
@@ -52,14 +52,14 @@ struct statfs
__fsblkcnt64_t f_ffree;
#endif
__fsid_t f_fsid;
- unsigned int f_namelen;
+ unsigned long int f_namelen;
#ifndef __USE_FILE_OFFSET64
__fsfilcnt_t f_favail;
#else
__fsfilcnt64_t f_favail;
#endif
- unsigned int f_frsize;
- unsigned int f_flag;
+ unsigned long int f_frsize;
+ unsigned long int f_flag;
unsigned int f_spare[3];
};
@@ -67,17 +67,17 @@ struct statfs
struct statfs64
{
unsigned int f_type;
- unsigned int f_bsize;
+ unsigned long int f_bsize;
__fsblkcnt64_t f_blocks;
__fsblkcnt64_t f_bfree;
__fsblkcnt64_t f_bavail;
__fsblkcnt64_t f_files;
__fsblkcnt64_t f_ffree;
__fsid_t f_fsid;
- unsigned int f_namelen;
+ unsigned long int f_namelen;
__fsfilcnt64_t f_favail;
- unsigned int f_frsize;
- unsigned int f_flag;
+ unsigned long int f_frsize;
+ unsigned long int f_flag;
unsigned int f_spare[3];
};
#endif
diff --git a/sysdeps/mach/hurd/bits/statvfs.h b/sysdeps/mach/hurd/bits/statvfs.h
index 98d622b366..9880b2c9c7 100644
--- a/sysdeps/mach/hurd/bits/statvfs.h
+++ b/sysdeps/mach/hurd/bits/statvfs.h
@@ -1,5 +1,5 @@
/* Definition of `struct statvfs', information about a filesystem.
- Copyright (C) 1998-2016 Free Software Foundation, Inc.
+ Copyright (C) 1998-2018 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
@@ -30,7 +30,7 @@
struct statvfs
{
unsigned int __f_type;
- unsigned int f_bsize;
+ unsigned long int f_bsize;
#ifndef __USE_FILE_OFFSET64
__fsblkcnt_t f_blocks;
__fsblkcnt_t f_bfree;
@@ -45,14 +45,14 @@ struct statvfs
__fsfilcnt64_t f_ffree;
#endif
__fsid_t f_fsid;
- unsigned int f_namemax; /* NOTE: f_namelen in `struct statfs'. */
+ unsigned long int f_namemax; /* NOTE: f_namelen in `struct statfs'. */
#ifndef __USE_FILE_OFFSET64
__fsfilcnt_t f_favail;
#else
__fsfilcnt64_t f_favail;
#endif
- unsigned int f_frsize;
- unsigned int f_flag;
+ unsigned long int f_frsize;
+ unsigned long int f_flag;
unsigned int f_spare[3];
};
@@ -60,17 +60,17 @@ struct statvfs
struct statvfs64
{
unsigned int __f_type;
- unsigned int f_bsize;
+ unsigned long int f_bsize;
__fsblkcnt64_t f_blocks;
__fsblkcnt64_t f_bfree;
__fsblkcnt64_t f_bavail;
__fsfilcnt64_t f_files;
__fsfilcnt64_t f_ffree;
__fsid_t f_fsid;
- unsigned int f_namemax;
+ unsigned long int f_namemax;
__fsfilcnt64_t f_favail;
- unsigned int f_frsize;
- unsigned int f_flag;
+ unsigned long int f_frsize;
+ unsigned long int f_flag;
unsigned int f_spare[3];
};
#endif
diff --git a/sysdeps/mach/hurd/bits/sysmacros.h b/sysdeps/mach/hurd/bits/sysmacros.h
new file mode 100644
index 0000000000..b75a329d04
--- /dev/null
+++ b/sysdeps/mach/hurd/bits/sysmacros.h
@@ -0,0 +1,60 @@
+/* Definitions of macros to access `dev_t' values. Hurd version.
+ Copyright (C) 1996-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_SYSMACROS_H
+#define _BITS_SYSMACROS_H 1
+
+#ifndef _SYS_SYSMACROS_H
+# error "Never include <bits/sysmacros.h> directly; use <sys/sysmacros.h> instead."
+#endif
+
+/* The Hurd version of dev_t in glibc is a 32-bit quantity, with 8-bit
+ major and 24-bit minor numbers. The encoding is mmmmMMmm, where M is a
+ hex digit of the major number and m is a hex digit of the minor number. */
+
+#define __SYSMACROS_DECLARE_MAJOR(DECL_TEMPL) \
+ DECL_TEMPL(unsigned int, major, (__dev_t __dev))
+
+#define __SYSMACROS_DEFINE_MAJOR(DECL_TEMPL) \
+ __SYSMACROS_DECLARE_MAJOR (DECL_TEMPL) \
+ { \
+ return ((__dev & (__dev_t) 0x0000ff00u) >> 8); \
+ }
+
+#define __SYSMACROS_DECLARE_MINOR(DECL_TEMPL) \
+ DECL_TEMPL(unsigned int, minor, (__dev_t __dev))
+
+#define __SYSMACROS_DEFINE_MINOR(DECL_TEMPL) \
+ __SYSMACROS_DECLARE_MINOR (DECL_TEMPL) \
+ { \
+ return (__dev & (__dev_t) 0xffff00ff); \
+ }
+
+#define __SYSMACROS_DECLARE_MAKEDEV(DECL_TEMPL) \
+ DECL_TEMPL(__dev_t, makedev, (unsigned int __major, unsigned int __minor))
+
+#define __SYSMACROS_DEFINE_MAKEDEV(DECL_TEMPL) \
+ __SYSMACROS_DECLARE_MAKEDEV (DECL_TEMPL) \
+ { \
+ __dev_t __dev; \
+ __dev = (((__dev_t) (__major & 0x000000ffu)) << 8); \
+ __dev |= (((__dev_t) (__minor & 0xffff00ffu)) << 0); \
+ return __dev; \
+ }
+
+#endif /* bits/sysmacros.h */
diff --git a/sysdeps/mach/hurd/bits/types/error_t.h b/sysdeps/mach/hurd/bits/types/error_t.h
new file mode 100644
index 0000000000..286e5fdc6a
--- /dev/null
+++ b/sysdeps/mach/hurd/bits/types/error_t.h
@@ -0,0 +1,29 @@
+/* Define error_t.
+ Copyright (C) 1991-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <bits/errno.h>
+
+/* User-visible type of error codes. It is ok to use 'int' or
+ 'kern_return_t' for these, but with 'error_t' the debugger prints
+ symbolic values. */
+#ifndef __error_t_defined
+# define __error_t_defined 1
+
+typedef enum __error_t_codes error_t;
+
+#endif
diff --git a/sysdeps/mach/hurd/bits/typesizes.h b/sysdeps/mach/hurd/bits/typesizes.h
index a33fb7fe8b..d3026ba66e 100644
--- a/sysdeps/mach/hurd/bits/typesizes.h
+++ b/sysdeps/mach/hurd/bits/typesizes.h
@@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. Hurd version.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 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
diff --git a/sysdeps/mach/hurd/brk.c b/sysdeps/mach/hurd/brk.c
index 972d6a9791..f8272e5f22 100644
--- a/sysdeps/mach/hurd/brk.c
+++ b/sysdeps/mach/hurd/brk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/chdir.c b/sysdeps/mach/hurd/chdir.c
index 86cf576cc7..b1cec6266c 100644
--- a/sysdeps/mach/hurd/chdir.c
+++ b/sysdeps/mach/hurd/chdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/check_fds.c b/sysdeps/mach/hurd/check_fds.c
index 2858868845..c21432a80e 100644
--- a/sysdeps/mach/hurd/check_fds.c
+++ b/sysdeps/mach/hurd/check_fds.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2018 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
diff --git a/sysdeps/mach/hurd/check_native.c b/sysdeps/mach/hurd/check_native.c
new file mode 100644
index 0000000000..d16ff883a9
--- /dev/null
+++ b/sysdeps/mach/hurd/check_native.c
@@ -0,0 +1 @@
+#include <inet/check_native.c>
diff --git a/sysdeps/mach/hurd/check_pf.c b/sysdeps/mach/hurd/check_pf.c
new file mode 100644
index 0000000000..edd99a7278
--- /dev/null
+++ b/sysdeps/mach/hurd/check_pf.c
@@ -0,0 +1 @@
+#include <inet/check_pf.c>
diff --git a/sysdeps/mach/hurd/chflags.c b/sysdeps/mach/hurd/chflags.c
index 02b247a6bc..4673043d74 100644
--- a/sysdeps/mach/hurd/chflags.c
+++ b/sysdeps/mach/hurd/chflags.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/chmod.c b/sysdeps/mach/hurd/chmod.c
index 47c93fea3b..bed20efb7a 100644
--- a/sysdeps/mach/hurd/chmod.c
+++ b/sysdeps/mach/hurd/chmod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -35,4 +35,5 @@ __chmod (const char *file, mode_t mode)
return 0;
}
+libc_hidden_def (__chmod)
weak_alias (__chmod, chmod)
diff --git a/sysdeps/mach/hurd/chown.c b/sysdeps/mach/hurd/chown.c
index 28db3c9bf5..6a50f82646 100644
--- a/sysdeps/mach/hurd/chown.c
+++ b/sysdeps/mach/hurd/chown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/chroot.c b/sysdeps/mach/hurd/chroot.c
index 93dc9790d3..bd08556824 100644
--- a/sysdeps/mach/hurd/chroot.c
+++ b/sysdeps/mach/hurd/chroot.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/clock.c b/sysdeps/mach/hurd/clock.c
index 9f4f26a17c..296ca89d21 100644
--- a/sysdeps/mach/hurd/clock.c
+++ b/sysdeps/mach/hurd/clock.c
@@ -1,5 +1,5 @@
/* Return the CPU time used by the program so far. Hurd version.
- Copyright (C) 2001-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2018 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
diff --git a/sysdeps/mach/hurd/close.c b/sysdeps/mach/hurd/close.c
index fab44a47ee..d064448b44 100644
--- a/sysdeps/mach/hurd/close.c
+++ b/sysdeps/mach/hurd/close.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/closedir.c b/sysdeps/mach/hurd/closedir.c
index 3e1eae44d3..783cd580ab 100644
--- a/sysdeps/mach/hurd/closedir.c
+++ b/sysdeps/mach/hurd/closedir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/configure b/sysdeps/mach/hurd/configure
index 3d155a450e..66cc0ce3a5 100644
--- a/sysdeps/mach/hurd/configure
+++ b/sysdeps/mach/hurd/configure
@@ -1,6 +1,6 @@
# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
-$as_echo "#define NO_HIDDEN 1" >>confdefs.h
+$as_echo "#define NO_RTLD_HIDDEN 1" >>confdefs.h
if test -n "$sysheaders"; then
@@ -45,3 +45,5 @@ fi
if test -n "$sysheaders"; then
CPPFLAGS=$OLD_CPPFLAGS
fi
+
+libc_cv_ld_gnu_indirect_function=no
diff --git a/sysdeps/mach/hurd/configure.ac b/sysdeps/mach/hurd/configure.ac
index af9a9ea052..774ffc80a9 100644
--- a/sysdeps/mach/hurd/configure.ac
+++ b/sysdeps/mach/hurd/configure.ac
@@ -1,7 +1,9 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
dnl We need this setting because of the need for PLT calls in ld.so.
-AC_DEFINE([NO_HIDDEN])
+dnl See Roland's comment in
+dnl https://sourceware.org/bugzilla/show_bug.cgi?id=15605
+AC_DEFINE([NO_RTLD_HIDDEN])
if test -n "$sysheaders"; then
OLD_CPPFLAGS=$CPPFLAGS
@@ -24,3 +26,7 @@ fi
if test -n "$sysheaders"; then
CPPFLAGS=$OLD_CPPFLAGS
fi
+
+dnl ifunc does not work yet for static binaries
+dnl http://www.gnu.org/software/hurd/open_issues/ifunc.html
+libc_cv_ld_gnu_indirect_function=no
diff --git a/sysdeps/mach/hurd/connect.c b/sysdeps/mach/hurd/connect.c
index 80fcf0be0f..537d686778 100644
--- a/sysdeps/mach/hurd/connect.c
+++ b/sysdeps/mach/hurd/connect.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
diff --git a/sysdeps/mach/hurd/cthreads.c b/sysdeps/mach/hurd/cthreads.c
index f223e00b12..05c48e4e4c 100644
--- a/sysdeps/mach/hurd/cthreads.c
+++ b/sysdeps/mach/hurd/cthreads.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2018 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
@@ -18,13 +18,16 @@
#include <libc-lock.h>
#include <errno.h>
#include <stdlib.h>
+#include <cthreads.h>
+/* This serves as stub "self" pointer for libc locks when TLS is not initialized
+ yet. */
char __libc_lock_self0[0];
/* Placeholder for key creation routine from Hurd cthreads library. */
int
weak_function
-cthread_keycreate (cthread_key_t *key)
+__cthread_keycreate (cthread_key_t *key)
{
__set_errno (ENOSYS);
*key = -1;
@@ -34,7 +37,7 @@ cthread_keycreate (cthread_key_t *key)
/* Placeholder for key retrieval routine from Hurd cthreads library. */
int
weak_function
-cthread_getspecific (cthread_key_t key, void **pval)
+__cthread_getspecific (cthread_key_t key, void **pval)
{
*pval = NULL;
__set_errno (ENOSYS);
@@ -44,18 +47,8 @@ cthread_getspecific (cthread_key_t key, void **pval)
/* Placeholder for key setting routine from Hurd cthreads library. */
int
weak_function
-cthread_setspecific (cthread_key_t key, void *val)
+__cthread_setspecific (cthread_key_t key, void *val)
{
__set_errno (ENOSYS);
return -1;
}
-
-/* Call cthread_getspecific which gets a pointer to the return value instead
- of just returning it. */
-void *
-__libc_getspecific (cthread_key_t key)
-{
- void *val;
- cthread_getspecific (key, &val);
- return val;
-}
diff --git a/sysdeps/mach/hurd/device-nrs.h b/sysdeps/mach/hurd/device-nrs.h
index 6a56af14ee..a006028e29 100644
--- a/sysdeps/mach/hurd/device-nrs.h
+++ b/sysdeps/mach/hurd/device-nrs.h
@@ -1,5 +1,5 @@
/* Device numbers of devices used in the implementation. Hurd version.
- Copyright (C) 2001-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2018 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
diff --git a/sysdeps/mach/hurd/dirfd.c b/sysdeps/mach/hurd/dirfd.c
index 06a9238b93..f70ee8d3e3 100644
--- a/sysdeps/mach/hurd/dirfd.c
+++ b/sysdeps/mach/hurd/dirfd.c
@@ -1,5 +1,5 @@
/* dirfd -- Return the file descriptor used by a DIR stream. Hurd version.
- Copyright (C) 1995-2016 Free Software Foundation, Inc.
+ Copyright (C) 1995-2018 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
@@ -22,7 +22,7 @@
#include <errno.h>
int
-dirfd (DIR *dirp)
+__dirfd (DIR *dirp)
{
int fd;
@@ -41,3 +41,6 @@ dirfd (DIR *dirp)
return fd;
}
+
+weak_alias (__dirfd, dirfd)
+libc_hidden_def (dirfd)
diff --git a/sysdeps/mach/hurd/dirstream.h b/sysdeps/mach/hurd/dirstream.h
index 6134ac5688..45d2e8e571 100644
--- a/sysdeps/mach/hurd/dirstream.h
+++ b/sysdeps/mach/hurd/dirstream.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/dl-execstack.c b/sysdeps/mach/hurd/dl-execstack.c
index fb0b8b41a2..b658c9667e 100644
--- a/sysdeps/mach/hurd/dl-execstack.c
+++ b/sysdeps/mach/hurd/dl-execstack.c
@@ -1,5 +1,5 @@
/* Stack executability handling for GNU dynamic linker. Hurd version.
- Copyright (C) 2004-2016 Free Software Foundation, Inc.
+ Copyright (C) 2004-2018 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
@@ -26,7 +26,6 @@ extern struct hurd_startup_data *_dl_hurd_data attribute_hidden;
so as to mprotect it. */
int
-internal_function
_dl_make_stack_executable (void **stack_endp)
{
/* Challenge the caller. */
diff --git a/sysdeps/mach/hurd/dl-fcntl.h b/sysdeps/mach/hurd/dl-fcntl.h
new file mode 100644
index 0000000000..3de29dced9
--- /dev/null
+++ b/sysdeps/mach/hurd/dl-fcntl.h
@@ -0,0 +1,22 @@
+/* Functions with hidden attribute internal to ld.so, which are declared
+ in include/fcntl.h. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* __open can't be hidden in ld.so on Hurd since it will be preempted by the
+ one in libc.so after bootstrap. */
+extern __typeof (__fcntl) __fcntl attribute_hidden;
diff --git a/sysdeps/mach/hurd/dl-mman.h b/sysdeps/mach/hurd/dl-mman.h
index 157462b201..3502c03187 100644
--- a/sysdeps/mach/hurd/dl-mman.h
+++ b/sysdeps/mach/hurd/dl-mman.h
@@ -1,6 +1,6 @@
/* Functions with hidden attribute internal to ld.so, which are declared
in include/sys/mman.h. Hurd version.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 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
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index bb964d31c5..b72913d3ba 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -1,5 +1,5 @@
/* Operating system support for run-time dynamic linker. Hurd version.
- Copyright (C) 1995-2016 Free Software Foundation, Inc.
+ Copyright (C) 1995-2018 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
@@ -31,6 +31,7 @@
#include <assert.h>
#include <sysdep.h>
#include <mach/mig_support.h>
+#include <mach/machine/vm_param.h>
#include "hurdstartup.h"
#include <hurd/lookup.h>
#include <hurd/auth.h>
@@ -44,6 +45,9 @@
#include <dl-machine.h>
#include <dl-procinfo.h>
+#include <dl-tunables.h>
+#include <not-errno.h>
+
extern void __mach_init (void);
extern int _dl_argc;
@@ -62,6 +66,8 @@ rtld_hidden_data_def(__libc_stack_end)
hp_timing_t _dl_cpuclock_offset;
#endif
+/* TODO: Initialize. */
+void *_dl_random attribute_relro = NULL;
struct hurd_startup_data *_dl_hurd_data;
@@ -124,6 +130,8 @@ _dl_sysdep_start (void **start_argptr,
__libc_enable_secure = _dl_hurd_data->flags & EXEC_SECURE;
+ __tunables_init (_environ);
+
if (_dl_hurd_data->flags & EXEC_STACK_ARGS &&
_dl_hurd_data->user_entry == 0)
_dl_hurd_data->user_entry = (vm_address_t) ENTRY_POINT;
@@ -181,7 +189,7 @@ unfmh(); /* XXX */
up and leave us to transfer control to USER_ENTRY. */
(*dl_main) ((const ElfW(Phdr) *) _dl_hurd_data->phdr,
_dl_hurd_data->phdrsz / sizeof (ElfW(Phdr)),
- &_dl_hurd_data->user_entry, NULL);
+ (ElfW(Addr) *) &_dl_hurd_data->user_entry, NULL);
/* The call above might screw a few things up.
@@ -254,7 +262,6 @@ fmh(); /* XXX */
}
void
-internal_function
_dl_sysdep_start_cleanup (void)
{
/* Deallocate the reply port and task port rights acquired by
@@ -268,7 +275,16 @@ _dl_sysdep_start_cleanup (void)
/* Minimal open/close/mmap implementation sufficient for initial loading of
shared libraries. These are weak definitions so that when the
dynamic linker re-relocates itself to be user-visible (for -ldl),
- it will get the user's definition (i.e. usually libc's). */
+ it will get the user's definition (i.e. usually libc's).
+
+ They also need to be set in the ld section of sysdeps/mach/hurd/Versions, to
+ be overridable, and in libc.abilist and ld.abilist to be checked. */
+
+/* This macro checks that the function does not get renamed to be hidden: we do
+ need these to be overridable by libc's. */
+#define check_no_hidden(name) \
+ static __typeof (name) __check_##name##_no_hidden \
+ __attribute__ ((alias (#name)));
/* Open FILE_NAME and return a Hurd I/O for it in *PORT, or return an
error. If STAT is non-zero, stat the file into that stat buffer. */
@@ -325,6 +341,8 @@ open_file (const char *file_name, int flags,
return err;
}
+check_no_hidden(__open);
+check_no_hidden (__open64);
int weak_function
__open (const char *file_name, int mode, ...)
{
@@ -335,7 +353,9 @@ __open (const char *file_name, int mode, ...)
else
return (int)port;
}
+weak_alias (__open, __open64)
+check_no_hidden(__close);
int weak_function
__close (int fd)
{
@@ -344,8 +364,9 @@ __close (int fd)
return 0;
}
+check_no_hidden(__read);
__ssize_t weak_function
-__libc_read (int fd, void *buf, size_t nbytes)
+__read (int fd, void *buf, size_t nbytes)
{
error_t err;
char *data;
@@ -365,10 +386,11 @@ __libc_read (int fd, void *buf, size_t nbytes)
return nread;
}
-libc_hidden_weak (__libc_read)
+libc_hidden_weak (__read)
+check_no_hidden(__write);
__ssize_t weak_function
-__libc_write (int fd, const void *buf, size_t nbytes)
+__write (int fd, const void *buf, size_t nbytes)
{
error_t err;
mach_msg_type_number_t nwrote;
@@ -381,9 +403,10 @@ __libc_write (int fd, const void *buf, size_t nbytes)
return nwrote;
}
-libc_hidden_weak (__libc_write)
+libc_hidden_weak (__write)
/* This is only used for printing messages (see dl-misc.c). */
+check_no_hidden(__writev);
__ssize_t weak_function
__writev (int fd, const struct iovec *iov, int niov)
{
@@ -417,7 +440,7 @@ __writev (int fd, const struct iovec *iov, int niov)
return 0;
}
-
+check_no_hidden(__libc_lseek64);
off64_t weak_function
__libc_lseek64 (int fd, off64_t offset, int whence)
{
@@ -430,8 +453,9 @@ __libc_lseek64 (int fd, off64_t offset, int whence)
return offset;
}
-__ptr_t weak_function
-__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
+check_no_hidden(__mmap);
+void *weak_function
+__mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
{
error_t err;
vm_prot_t vmprot;
@@ -454,7 +478,8 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
err = __io_map ((mach_port_t) fd, &memobj_rd, &memobj_wr);
if (err)
return __hurd_fail (err), MAP_FAILED;
- __mach_port_deallocate (__mach_task_self (), memobj_wr);
+ if (memobj_wr != MACH_PORT_NULL)
+ __mach_port_deallocate (__mach_task_self (), memobj_wr);
}
mapaddr = (vm_address_t) addr;
@@ -488,9 +513,10 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
if (err)
return __hurd_fail (err), MAP_FAILED;
- return (__ptr_t) mapaddr;
+ return (void *) mapaddr;
}
+check_no_hidden(__fxstat64);
int weak_function
__fxstat64 (int vers, int fd, struct stat64 *buf)
{
@@ -506,6 +532,7 @@ __fxstat64 (int vers, int fd, struct stat64 *buf)
}
libc_hidden_def (__fxstat64)
+check_no_hidden(__xstat64);
int weak_function
__xstat64 (int vers, const char *file, struct stat64 *buf)
{
@@ -528,13 +555,21 @@ libc_hidden_def (__xstat64)
whether debugging malloc is allowed even for SUID binaries. This
stub will always fail, which means that malloc-debugging is always
disabled for SUID binaries. */
+check_no_hidden(__access);
int weak_function
__access (const char *file, int type)
{
errno = ENOSYS;
return -1;
}
+check_no_hidden(__access_noerrno);
+int weak_function
+__access_noerrno (const char *file, int type)
+{
+ return -1;
+}
+check_no_hidden(__getpid);
pid_t weak_function
__getpid (void)
{
@@ -548,20 +583,50 @@ __getpid (void)
return pid;
}
+/* We need this alias to satisfy references from libc_pic.a objects
+ that were affected by the libc_hidden_proto declaration for __getpid. */
+strong_alias (__getpid, __GI___getpid)
+
/* This is called only in some strange cases trying to guess a value
for $ORIGIN for the executable. The dynamic linker copes with
getcwd failing (dl-object.c), and it's too much hassle to include
the functionality here. (We could, it just requires duplicating or
reusing getcwd.c's code but using our special lookup function as in
`open', above.) */
-char *
-weak_function
+check_no_hidden(__getcwd);
+char *weak_function
__getcwd (char *buf, size_t size)
{
errno = ENOSYS;
return NULL;
}
+/* This is used by dl-tunables.c to strdup strings. We can just make this a
+ mere allocation. */
+check_no_hidden(__sbrk);
+void *weak_function
+__sbrk (intptr_t increment)
+{
+ vm_address_t addr;
+ __vm_allocate (__mach_task_self (), &addr, increment, 1);
+ return (void *) addr;
+}
+
+check_no_hidden(__strtoul_internal);
+unsigned long int weak_function
+__strtoul_internal (const char *nptr, char **endptr, int base, int group)
+{
+ assert (base == 0 || base == 10);
+ assert (group == 0);
+ return _dl_strtoul (nptr, endptr);
+}
+
+/* We need this alias to satisfy references from libc_pic.a objects
+ that were affected by the libc_hidden_proto declaration for __strtoul_internal. */
+strong_alias (__strtoul_internal, __GI___strtoul_internal)
+strong_alias (__strtoul_internal, __GI_____strtoul_internal)
+
+check_no_hidden(_exit);
void weak_function attribute_hidden
_exit (int status)
{
@@ -569,6 +634,9 @@ _exit (int status)
W_EXITCODE (status, 0), 0);
while (__task_terminate (__mach_task_self ()))
__mach_task_self_ = (__mach_task_self) ();
+
+ LOSE;
+ abort ();
}
/* We need this alias to satisfy references from libc_pic.a objects
that were affected by the libc_hidden_proto declaration for _exit. */
@@ -582,6 +650,7 @@ strong_alias (_exit, __GI__exit)
# define ABORT_INSTRUCTION
#endif
+check_no_hidden(abort);
void weak_function
abort (void)
{
@@ -600,6 +669,10 @@ abort (void)
/* We need this alias to satisfy references from libc_pic.a objects
that were affected by the libc_hidden_proto declaration for abort. */
strong_alias (abort, __GI_abort)
+strong_alias (abort, __GI___chk_fail)
+strong_alias (abort, __GI___fortify_fail)
+strong_alias (abort, __GI___assert_fail)
+strong_alias (abort, __GI___assert_perror_fail)
/* This function is called by interruptible RPC stubs. For initial
dynamic linking, just use the normal mach_msg. Since this defn is
@@ -621,7 +694,6 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
void
-internal_function
_dl_show_auxv (void)
{
/* There is nothing to print. Hurd has no auxiliary vector. */
diff --git a/sysdeps/mach/hurd/dl-sysdep.h b/sysdeps/mach/hurd/dl-sysdep.h
index fc4005a75f..9a1f353a8d 100644
--- a/sysdeps/mach/hurd/dl-sysdep.h
+++ b/sysdeps/mach/hurd/dl-sysdep.h
@@ -1,5 +1,5 @@
/* System-specific settings for dynamic linker code. Hurd version.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 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
diff --git a/sysdeps/mach/hurd/dl-unistd.h b/sysdeps/mach/hurd/dl-unistd.h
index b3cfb611a2..da7f0ed18d 100644
--- a/sysdeps/mach/hurd/dl-unistd.h
+++ b/sysdeps/mach/hurd/dl-unistd.h
@@ -1,6 +1,6 @@
/* Functions with hidden attribute internal to ld.so, which are declared
in include/unistd.h. Hurd version.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 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
@@ -17,12 +17,6 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-/* __close, __getcwd, __getpid, __libc_read and __libc_write can't be
- hidden in ld.so on Hurd since they will be preempted by the ones in
- libc.so after bootstrap. */
-extern __typeof (__access) __access attribute_hidden;
-extern __typeof (__brk) __brk attribute_hidden;
-extern __typeof (__lseek) __lseek attribute_hidden;
+/* Most stubs mustn't be hidden in ld.so on Hurd since they need to be preempted
+ by functions from libc.so after bootstrap. */
extern __typeof (__profil) __profil attribute_hidden;
-extern __typeof (__read) __read attribute_hidden;
-extern __typeof (__sbrk) __sbrk attribute_hidden;
diff --git a/sysdeps/mach/hurd/dup2.c b/sysdeps/mach/hurd/dup2.c
index fcdc52de84..3615461cb5 100644
--- a/sysdeps/mach/hurd/dup2.c
+++ b/sysdeps/mach/hurd/dup2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/sysdeps/mach/hurd/dup3.c b/sysdeps/mach/hurd/dup3.c
index 4cf840b0f7..09ea24a00b 100644
--- a/sysdeps/mach/hurd/dup3.c
+++ b/sysdeps/mach/hurd/dup3.c
@@ -1,5 +1,5 @@
/* Duplicate a file descriptor to a given number, with flags. Hurd version.
- Copyright (C) 1991-2016 Free Software Foundation, Inc.
+ Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/sysdeps/mach/hurd/eloop-threshold.h b/sysdeps/mach/hurd/eloop-threshold.h
index 15f6f7e686..2eaf4e2c5d 100644
--- a/sysdeps/mach/hurd/eloop-threshold.h
+++ b/sysdeps/mach/hurd/eloop-threshold.h
@@ -1,5 +1,5 @@
/* Threshold at which to diagnose ELOOP. Hurd version.
- Copyright (C) 2012-2016 Free Software Foundation, Inc.
+ Copyright (C) 2012-2018 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
diff --git a/sysdeps/mach/hurd/enbl-secure.c b/sysdeps/mach/hurd/enbl-secure.c
index ddcdc7755f..772bdb6bf8 100644
--- a/sysdeps/mach/hurd/enbl-secure.c
+++ b/sysdeps/mach/hurd/enbl-secure.c
@@ -1,5 +1,5 @@
/* Define and initialize the `__libc_enable_secure' flag. Hurd version.
- Copyright (C) 1998-2016 Free Software Foundation, Inc.
+ Copyright (C) 1998-2018 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
@@ -21,3 +21,10 @@
In the shared library, the `__libc_enable_secure' variable is defined
by the dynamic linker in dl-sysdep.c and set there.
In the static library, it is defined in init-first.c and set there. */
+
+#include <libc-internal.h>
+
+void
+__libc_init_secure (void)
+{
+}
diff --git a/sysdeps/mach/hurd/errlist.c b/sysdeps/mach/hurd/errlist.c
index eaa53a0a57..77cbabf23c 100644
--- a/sysdeps/mach/hurd/errlist.c
+++ b/sysdeps/mach/hurd/errlist.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2018 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
diff --git a/sysdeps/mach/hurd/errno-loc.c b/sysdeps/mach/hurd/errno-loc.c
index 7709cc98ca..05e7673743 100644
--- a/sysdeps/mach/hurd/errno-loc.c
+++ b/sysdeps/mach/hurd/errno-loc.c
@@ -1,5 +1,5 @@
/* __errno_location -- helper function for locating per-thread errno value
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 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
@@ -17,13 +17,11 @@
<http://www.gnu.org/licenses/>. */
#if IS_IN (rtld)
-/*
- * rtld can not access TLS too early, thus rtld_errno.
- *
- * Instead of making __open/__close pass errno from TLS to rtld_errno, simply
- * use a weak __errno_location using rtld_errno, which will be overriden by the
- * libc definition.
- */
+/* rtld can not access TLS too early, thus rtld_errno.
+
+ Instead of making __open/__close pass errno from TLS to rtld_errno, simply
+ use a weak __errno_location using rtld_errno, which will be overriden by the
+ libc definition. */
static int rtld_errno;
int * weak_function
__errno_location (void)
@@ -32,5 +30,5 @@ __errno_location (void)
}
libc_hidden_weak (__errno_location)
#else
-#include <../../../csu/errno-loc.c>
+#include "../../../csu/errno-loc.c"
#endif
diff --git a/sysdeps/mach/hurd/errnos.awk b/sysdeps/mach/hurd/errnos.awk
index 1d15131e81..dc19350eb0 100644
--- a/sysdeps/mach/hurd/errnos.awk
+++ b/sysdeps/mach/hurd/errnos.awk
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2016 Free Software Foundation, Inc.
+# Copyright (C) 1991-2018 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
@@ -16,84 +16,77 @@
# <http://www.gnu.org/licenses/>.
# errno.texinfo contains lines like:
-# @comment errno.h
-# @comment POSIX.1: Function not implemented
-# @deftypevr Macro int ENOSYS
-# @comment errno 123
+# @errno{ENOSYS, 123, Function not implemented}
BEGIN {
- print "/* This file generated by errnos.awk. */";
- print "";
- print "/* The Hurd uses Mach error system 0x10, currently only subsystem 0. */";
- print "#ifndef _HURD_ERRNO";
- print "#define _HURD_ERRNO(n)\t((0x10 << 26) | ((n) & 0x3fff))";
- print "#endif";
+ print "/* This file generated by errnos.awk from";
+ for (i = 1; i < ARGC; i++)
+ {
+ arg = ARGV[i];
+ sub(/.*(manual|include)\//, "", arg)
+ print " " arg;
+ }
+ print " Do not edit this file; edit errnos.awk and regenerate it. */";
print "";
- print "#ifdef _ERRNO_H\n";
- print "enum __error_t_codes\n{";
- print "\t/* The value zero always means success and it is perfectly fine for";
- print "\t code to use 0 explicitly (or implicitly, e.g. via Boolean coercion).";
- print "\t Having an enum entry for zero both makes the debugger print the name";
- print "\t for error_t-typed zero values, and prevents the compiler from";
- print "\t issuing warnings about 'case 0:' in a switch on an error_t-typed";
- print "\t value. */";
- print "\tESUCCESS = 0,"
+ print "#ifndef _BITS_ERRNO_H";
+ print "#define _BITS_ERRNO_H 1";
print "";
- errnoh = 0;
+ print "#if !defined _ERRNO_H";
+ print "# error \"Never include <bits/errno.h> directly; use <errno.h> instead.\"";
+ print "#endif";
+
maxerrno = 0;
+ maxerrlen = 0;
in_mach_errors = "";
- in_math = 0;
- edom = erange = "";
- print "#undef EDOM\n#undef ERANGE";
- lno = 0;
+ seq = 0;
}
-$1 == "@comment" && $2 == "errno.h" { errnoh=1; next }
-$1 == "@comment" && errnoh == 1 \
+/^@errno\{/ \
{
- ++errnoh;
- etext = "";
- for (i = 3; i <= NF; ++i)
- etext = etext " " $i;
- next;
- }
-
-errnoh == 2 && $1 == "@deftypevr" && $2 == "Macro" && $3 == "int" \
- { ++errnoh; e = $4; next; }
-
-errnoh == 3 && $1 == "@comment" && $2 == "errno" {
+ e = substr($1, 8, length($1)-8)
+ if (length(e) > maxerrlen)
+ maxerrlen = length(e);
if (e == "EWOULDBLOCK")
{
- lines[lno++]="#define EWOULDBLOCK EAGAIN /* Operation would block */";
+ econsts[seq] = e;
+ errnos[seq] = "EAGAIN";
+ seq++;
next;
}
- errno = $3 + 0;
+
+ errno = substr($2, 1, length($2)-1) + 0;
if (errno == 0)
next;
- if (errno > maxerrno) maxerrno = errno;
- x = sprintf ("%-40s/*%s */", sprintf ("%-24s%s", "#define\t" e,
- "_HURD_ERRNO (" errno ")"),
- etext);
- if (e == "EDOM")
- edom = x;
- else if (e == "ERANGE")
- erange = x;
- comma[lno] = 1;
- lines[lno++] = sprintf("\t%-16s= _HURD_ERRNO (%d)", e, errno);
- lines[lno++] = x;
+ if (errno > 0x3ffff)
+ {
+ printf("%s:%d: errno value %d too large for the Hurd\n",
+ FILENAME, NR, errno) >> "/dev/stderr";
+ exit 1;
+ }
+ if (errno > maxerrno)
+ maxerrno = errno;
+
+ etext = "";
+ for (i = 3; i <= NF; ++i)
+ etext = etext " " $i;
+ etext = substr(etext, 2, length(etext)-2);
+
+ econsts[seq] = e;
+ errnos[seq] = sprintf("0x%08x", 0x40000000 + errno);
+ etexts[seq] = etext;
+ seq++;
next;
}
-{ errnoh=0 }
NF == 3 && $1 == "#define" && $2 == "MACH_SEND_IN_PROGRESS" \
{
in_mach_errors = FILENAME;
- lines[lno++] = "\n\t/* Errors from <mach/message.h>. */";
+ annot[seq++] = "\n/* Errors from <mach/message.h>. */";
}
NF == 3 && $1 == "#define" && $2 == "KERN_SUCCESS" \
{
in_mach_errors = FILENAME;
- lines[lno++] = "\n\t/* Errors from <mach/kern_return.h>. */";
+ annot[seq++] = "\n/* Errors from <mach/kern_return.h>. */";
next;
}
@@ -102,16 +95,24 @@ in_mach_errors != "" && $2 == "MACH_IPC_COMPAT" \
in_mach_errors = "";
}
+# FIXME: mach/message.h and mach/kern_return.h do include error
+# descriptions which we could slurp, but some of them are very long,
+# we would need to word-wrap them.
in_mach_errors == FILENAME && NF == 3 && $1 == "#define" \
{
- comma[lno] = 1;
- lines[lno++] = sprintf("\t%-32s= %s", "E" $2, $3);
+ e = "E" $2;
+ if (length(e) > maxerrlen)
+ maxerrlen = length(e);
+ econsts[seq] = e;
+ errnos[seq] = $3;
+ etexts[seq] = "";
+ seq++;
}
$1 == "#define" && $2 == "_MACH_MIG_ERRORS_H_" \
{
in_mig_errors = 1;
- lines[lno++] = "\n\t/* Errors from <mach/mig_errors.h>. */";
+ annot[seq++] = "\n/* Errors from <mach/mig_errors.h>. */";
next;
}
in_mig_errors && $1 == "#endif" && $3 == "_MACH_MIG_ERRORS_H_" \
@@ -122,17 +123,23 @@ in_mig_errors && $1 == "#endif" && $3 == "_MACH_MIG_ERRORS_H_" \
(in_mig_errors && $1 == "#define" && $3 <= -300) || \
(in_device_errors && $1 == "#define" && /D_/ && NF > 3) \
{
- comment = "";
- for (i = 4; i <= NF; ++i)
- comment = comment " " $i;
- comma[lno] = 1;
- lines[lno++] = sprintf("%-32s", sprintf ("\t%-24s= %s", "E" $2, $3)) comment;
+ etext = "";
+ for (i = 5; i < NF; ++i)
+ etext = etext " " $i;
+
+ e = "E" $2;
+ if (length(e) > maxerrlen)
+ maxerrlen = length(e);
+ econsts[seq] = e;
+ errnos[seq] = $3;
+ etexts[seq] = substr(etext, 2, length(etext)-1);
+ seq++;
}
$1 == "#define" && $2 == "D_SUCCESS" \
{
in_device_errors = 1;
- lines[lno++] = "\n\t/* Errors from <device/device_types.h>. */";
+ annot[seq++] = "\n/* Errors from <device/device_types.h>. */";
next;
}
in_device_errors && $1 == "#endif" \
@@ -140,36 +147,65 @@ in_device_errors && $1 == "#endif" \
in_device_errors = 0;
}
+function print_errno_enum(maxseq)
+{
+ print "";
+ print "#ifndef __ASSEMBLER__";
+ print "";
+ print "enum __error_t_codes";
+ print "{";
+ print " /* The value zero always means success and it is perfectly fine";
+ print " for code to use 0 explicitly (or implicitly, e.g. via Boolean";
+ print " coercion.) Having an enum entry for zero both makes the";
+ print " debugger print the name for error_t-typed zero values, and";
+ print " prevents the compiler from issuing warnings about 'case 0:'";
+ print " in a switch on an error_t-typed value. */";
+ printf(" %-*s = 0,\n", maxerrlen, "ESUCCESS");
+
+ print "";
+ print " /* The Hurd uses Mach error system 0x10, subsystem 0. */";
+ for (i = 0; i < maxseq; i++)
+ {
+ if (i in annot)
+ print annot[i];
+ else if (i in etexts && etexts[i] != "")
+ printf(" %-*s = %s,\t/* %s */\n",
+ maxerrlen, econsts[i], errnos[i], etexts[i]);
+ else if (errnos[i] != "EAGAIN")
+ printf(" %-*s = %s,\n", maxerrlen, econsts[i], errnos[i]);
+ }
+
+ print "";
+ print " /* Because the C standard requires that errno have type 'int',"
+ print " this enumeration must be a signed type. */";
+ print " __FORCE_ERROR_T_CODES_SIGNED = -1";
+ print "};";
+ print "";
+ print "#endif /* not __ASSEMBLER__ */";
+}
+
+function print_errno_defines(maxseq)
+{
+ print "";
+ print "/* The C standard requires that all of the E-constants be"
+ print " defined as macros. */"
+ print "";
+ for (i = 0; i < maxseq; i++)
+ {
+ if (i in annot)
+ print annot[i];
+ else
+ printf("#define %-*s %s\n", maxerrlen, econsts[i], errnos[i]);
+ }
+ print "";
+ printf("#define _HURD_ERRNOS %d\n", maxerrno+1);
+}
END \
{
- for (i = 0; i < lno - 1; ++i)
- printf "%s%s\n", lines[i], (comma[i] ? "," : "");
- print lines[i];
- print "";
- print "};";
- print "";
- printf "#define\t_HURD_ERRNOS\t%d\n", maxerrno+1;
- print "";
- print "\
-/* User-visible type of error codes. It is ok to use `int' or\n\
- `kern_return_t' for these, but with `error_t' the debugger prints\n\
- symbolic values. */";
- print "#ifdef __USE_GNU";
- print "typedef enum __error_t_codes error_t;"
- print "#define __error_t_defined\t1"
- print "#endif";
- print "";
- print "\
-/* Return the current thread's location for `errno'.\n\
- The syntax of this function allows redeclarations like `int errno'. */\n\
-extern int *__errno_location (void) __THROW __attribute__ ((__const__));\n\
-\n\
-#define errno (*__errno_location ())\n\
-";
- print "#endif /* <errno.h> included. */";
+ print_errno_enum(seq);
+ print_errno_defines(seq);
+
print "";
- print "#if !defined (_ERRNO_H) && defined (__need_Emath)";
- print edom; print erange;
- print "#endif /* <errno.h> not included and need math error codes. */";
+ print "#endif /* bits/errno.h. */";
}
diff --git a/sysdeps/mach/hurd/euidaccess.c b/sysdeps/mach/hurd/euidaccess.c
index 4949aa9365..2c7ce1f2b6 100644
--- a/sysdeps/mach/hurd/euidaccess.c
+++ b/sysdeps/mach/hurd/euidaccess.c
@@ -1,5 +1,5 @@
/* Test for access to FILE using effective UID and GID. Hurd version.
- Copyright (C) 1991-2016 Free Software Foundation, Inc.
+ Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/execve.c b/sysdeps/mach/hurd/execve.c
index 6904fc6452..1c5b681d89 100644
--- a/sysdeps/mach/hurd/execve.c
+++ b/sysdeps/mach/hurd/execve.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -18,6 +18,8 @@
#include <unistd.h>
#include <hurd.h>
#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
/* Replace the current process, executing FILE_NAME with arguments ARGV and
environment ENVP. ARGV and ENVP are terminated by NULL pointers. */
@@ -25,16 +27,46 @@ int
__execve (const char *file_name, char *const argv[], char *const envp[])
{
error_t err;
- file_t file = __file_name_lookup (file_name, O_EXEC, 0);
+ char *concat_name = NULL;
+ const char *abs_path;
+ file_t file = __file_name_lookup (file_name, O_EXEC, 0);
if (file == MACH_PORT_NULL)
return -1;
+ if (file_name[0] == '/')
+ {
+ /* Already an absolute path */
+ abs_path = file_name;
+ }
+ else
+ {
+ /* Relative path */
+ char *cwd = __getcwd (NULL, 0);
+ if (cwd == NULL)
+ {
+ __mach_port_deallocate (__mach_task_self (), file);
+ return -1;
+ }
+
+ int res = __asprintf (&concat_name, "%s/%s", cwd, file_name);
+ free (cwd);
+ if (res == -1)
+ {
+ __mach_port_deallocate (__mach_task_self (), file);
+ return -1;
+ }
+
+ abs_path = concat_name;
+ }
+
/* Hopefully this will not return. */
- err = _hurd_exec (__mach_task_self (), file, argv, envp);
+ err = _hurd_exec_paths (__mach_task_self (), file,
+ file_name, abs_path, argv, envp);
/* Oh well. Might as well be tidy. */
__mach_port_deallocate (__mach_task_self (), file);
+ free (concat_name);
return __hurd_fail (err);
}
diff --git a/sysdeps/mach/hurd/faccessat.c b/sysdeps/mach/hurd/faccessat.c
index d88fa4ae57..d9bceaada7 100644
--- a/sysdeps/mach/hurd/faccessat.c
+++ b/sysdeps/mach/hurd/faccessat.c
@@ -1,5 +1,5 @@
/* Test for access to file, relative to open directory. Hurd version.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
@@ -27,8 +27,21 @@
#include <hurd/id.h>
#include <hurd/lookup.h>
-int
-__faccessat (int fd, const char *file, int type, int at_flags)
+static int
+hurd_fail_seterrno (error_t err)
+{
+ return __hurd_fail (err);
+}
+
+static int
+hurd_fail_noerrno (error_t err)
+{
+ return -1;
+}
+
+static int
+__faccessat_common (int fd, const char *file, int type, int at_flags,
+ int (*errfunc) (error_t))
{
error_t err;
file_t rcrdir, rcwdir, io;
@@ -163,14 +176,14 @@ __faccessat (int fd, const char *file, int type, int at_flags)
if (rcwdir != MACH_PORT_NULL)
__mach_port_deallocate (__mach_task_self (), rcwdir);
if (err)
- return __hurd_fail (err);
+ return errfunc (err);
}
/* Find out what types of access we are allowed to this file. */
err = __file_check_access (io, &allowed);
__mach_port_deallocate (__mach_task_self (), io);
if (err)
- return __hurd_fail (err);
+ return errfunc (err);
flags = 0;
if (type & R_OK)
@@ -182,8 +195,20 @@ __faccessat (int fd, const char *file, int type, int at_flags)
if (flags & ~allowed)
/* We are not allowed all the requested types of access. */
- return __hurd_fail (EACCES);
+ return errfunc (EACCES);
return 0;
}
+
+int
+__faccessat_noerrno (int fd, const char *file, int type, int at_flags)
+{
+ return __faccessat_common (fd, file, type, at_flags, hurd_fail_noerrno);
+}
+
+int
+__faccessat (int fd, const char *file, int type, int at_flags)
+{
+ return __faccessat_common (fd, file, type, at_flags, hurd_fail_seterrno);
+}
weak_alias (__faccessat, faccessat)
diff --git a/sysdeps/mach/hurd/fchdir.c b/sysdeps/mach/hurd/fchdir.c
index 360ba72be0..94ceda8a03 100644
--- a/sysdeps/mach/hurd/fchdir.c
+++ b/sysdeps/mach/hurd/fchdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/fchflags.c b/sysdeps/mach/hurd/fchflags.c
index ac7da61736..443c8d9406 100644
--- a/sysdeps/mach/hurd/fchflags.c
+++ b/sysdeps/mach/hurd/fchflags.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/fchmod.c b/sysdeps/mach/hurd/fchmod.c
index b20e4b7b62..5dd5dd99d9 100644
--- a/sysdeps/mach/hurd/fchmod.c
+++ b/sysdeps/mach/hurd/fchmod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/fchmodat.c b/sysdeps/mach/hurd/fchmodat.c
index 24b2a8285a..4b4dabad31 100644
--- a/sysdeps/mach/hurd/fchmodat.c
+++ b/sysdeps/mach/hurd/fchmodat.c
@@ -1,5 +1,5 @@
/* Change the protections of file relative to open directory. Hurd version.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
diff --git a/sysdeps/mach/hurd/fchown.c b/sysdeps/mach/hurd/fchown.c
index 742e1e7d0f..2c4c666c6f 100644
--- a/sysdeps/mach/hurd/fchown.c
+++ b/sysdeps/mach/hurd/fchown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/fchownat.c b/sysdeps/mach/hurd/fchownat.c
index 26a6851fb8..906ec05ba3 100644
--- a/sysdeps/mach/hurd/fchownat.c
+++ b/sysdeps/mach/hurd/fchownat.c
@@ -1,5 +1,5 @@
/* Change owner and group of a file relative to open directory. Hurd version.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
diff --git a/sysdeps/mach/hurd/fcntl.c b/sysdeps/mach/hurd/fcntl.c
index 2898ebbb14..598317d811 100644
--- a/sysdeps/mach/hurd/fcntl.c
+++ b/sysdeps/mach/hurd/fcntl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
@@ -210,3 +210,8 @@ libc_hidden_def (__libc_fcntl)
weak_alias (__libc_fcntl, __fcntl)
libc_hidden_weak (__fcntl)
weak_alias (__libc_fcntl, fcntl)
+
+strong_alias (__libc_fcntl, __libc_fcntl64)
+libc_hidden_def (__libc_fcntl64)
+weak_alias (__libc_fcntl64, __fcntl64)
+libc_hidden_weak (__fcntl64)
diff --git a/sysdeps/mach/hurd/fdatasync.c b/sysdeps/mach/hurd/fdatasync.c
index 5c28ba69f9..eda679f4c6 100644
--- a/sysdeps/mach/hurd/fdatasync.c
+++ b/sysdeps/mach/hurd/fdatasync.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/fdopendir.c b/sysdeps/mach/hurd/fdopendir.c
index 33af683a5a..ec3a7486fd 100644
--- a/sysdeps/mach/hurd/fdopendir.c
+++ b/sysdeps/mach/hurd/fdopendir.c
@@ -1,5 +1,5 @@
/* Open a directory stream from a file descriptor. Hurd version.
- Copyright (C) 2005-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005-2018 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
diff --git a/sysdeps/mach/hurd/fexecve.c b/sysdeps/mach/hurd/fexecve.c
index e7b451543a..c5679f197e 100644
--- a/sysdeps/mach/hurd/fexecve.c
+++ b/sysdeps/mach/hurd/fexecve.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
@@ -25,8 +25,9 @@
int
fexecve (int fd, char *const argv[], char *const envp[])
{
- error_t err = HURD_DPORT_USE (fd, _hurd_exec (__mach_task_self (), port,
- argv, envp));
+ error_t err = HURD_DPORT_USE (fd, _hurd_exec_paths (__mach_task_self (),
+ port, NULL, NULL,
+ argv, envp));
if (! err)
err = EGRATUITOUS;
return __hurd_fail (err);
diff --git a/sysdeps/mach/hurd/fgetxattr.c b/sysdeps/mach/hurd/fgetxattr.c
index 16ddb3bfca..fc0b1feb12 100644
--- a/sysdeps/mach/hurd/fgetxattr.c
+++ b/sysdeps/mach/hurd/fgetxattr.c
@@ -1,5 +1,5 @@
/* Access to extended attributes on files. Hurd version.
- Copyright (C) 2004-2016 Free Software Foundation, Inc.
+ Copyright (C) 2004-2018 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
diff --git a/sysdeps/mach/hurd/flistxattr.c b/sysdeps/mach/hurd/flistxattr.c
index 2ae3fab456..4564f50948 100644
--- a/sysdeps/mach/hurd/flistxattr.c
+++ b/sysdeps/mach/hurd/flistxattr.c
@@ -1,5 +1,5 @@
/* Access to extended attributes on files. Hurd version.
- Copyright (C) 2005-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005-2018 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
diff --git a/sysdeps/mach/hurd/flock.c b/sysdeps/mach/hurd/flock.c
index f552b855bd..6d6f748df3 100644
--- a/sysdeps/mach/hurd/flock.c
+++ b/sysdeps/mach/hurd/flock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
diff --git a/sysdeps/mach/hurd/fork.c b/sysdeps/mach/hurd/fork.c
index 3e7501f9a1..2d1e64c8d1 100644
--- a/sysdeps/mach/hurd/fork.c
+++ b/sysdeps/mach/hurd/fork.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 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
@@ -27,6 +27,7 @@
#include <assert.h>
#include "hurdmalloc.h" /* XXX */
#include <tls.h>
+#include <malloc/malloc-internal.h>
#undef __fork
@@ -118,6 +119,13 @@ __fork (void)
}
__mutex_lock (&_hurd_siglock);
+ /* Acquire malloc locks. This needs to come last because fork
+ handlers may use malloc, and the libio list lock has an
+ indirect malloc dependency as well (via the getdelim
+ function). */
+ call_function_static_weak (__malloc_fork_lock_parent);
+ _hurd_malloc_fork_prepare ();
+
newtask = MACH_PORT_NULL;
thread = sigthread = MACH_PORT_NULL;
newproc = MACH_PORT_NULL;
@@ -206,38 +214,9 @@ __fork (void)
{
/* This is a receive right. We want to give the child task
its own new receive right under the same name. */
- err = __mach_port_allocate_name (newtask,
- MACH_PORT_RIGHT_RECEIVE,
- 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,
- &notify_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)
+ if (err = __mach_port_allocate_name (newtask,
+ MACH_PORT_RIGHT_RECEIVE,
+ portnames[i]))
LOSE;
if (porttypes[i] & MACH_PORT_TYPE_SEND)
{
@@ -528,7 +507,7 @@ __fork (void)
MACHINE_THREAD_STATE_SET_PC (&state,
(unsigned long int) _hurd_msgport_receive);
- /* Do special thread setup for TLS if needed. */
+ /* Do special signal thread setup for TLS if needed. */
if (err = _hurd_tls_fork (sigthread, _hurd_msgport_thread, &state))
LOSE;
@@ -608,6 +587,10 @@ __fork (void)
nthreads * sizeof (*threads));
}
+ /* Release malloc locks. */
+ _hurd_malloc_fork_parent ();
+ call_function_static_weak (__malloc_fork_unlock_parent);
+
/* Run things that want to run in the parent to restore it to
normality. Usually prepare hooks and parent hooks are
symmetrical: the prepare hook arrests state in some way for the
@@ -659,6 +642,10 @@ __fork (void)
/* Forking clears the trace flag. */
__sigemptyset (&_hurdsig_traced);
+ /* Release malloc locks. */
+ _hurd_malloc_fork_child ();
+ call_function_static_weak (__malloc_fork_unlock_child);
+
/* Run things that want to run in the child task to set up. */
RUN_HOOK (_hurd_fork_child_hook, ());
diff --git a/sysdeps/mach/hurd/fpathconf.c b/sysdeps/mach/hurd/fpathconf.c
index e1cc122fb6..4332aa70ac 100644
--- a/sysdeps/mach/hurd/fpathconf.c
+++ b/sysdeps/mach/hurd/fpathconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/fremovexattr.c b/sysdeps/mach/hurd/fremovexattr.c
index a857c944df..662ae38f89 100644
--- a/sysdeps/mach/hurd/fremovexattr.c
+++ b/sysdeps/mach/hurd/fremovexattr.c
@@ -1,5 +1,5 @@
/* Access to extended attributes on files. Hurd version.
- Copyright (C) 2005-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005-2018 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
diff --git a/sysdeps/mach/hurd/fsetxattr.c b/sysdeps/mach/hurd/fsetxattr.c
index a0b65d2675..cd9653765c 100644
--- a/sysdeps/mach/hurd/fsetxattr.c
+++ b/sysdeps/mach/hurd/fsetxattr.c
@@ -1,5 +1,5 @@
/* Access to extended attributes on files. Hurd version.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
diff --git a/sysdeps/mach/hurd/fstatfs.c b/sysdeps/mach/hurd/fstatfs.c
index a04efe1ede..e8b03d24e7 100644
--- a/sysdeps/mach/hurd/fstatfs.c
+++ b/sysdeps/mach/hurd/fstatfs.c
@@ -1,5 +1,5 @@
/* fstatfs -- Return information about the filesystem on which FD resides.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 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
diff --git a/sysdeps/mach/hurd/fstatfs64.c b/sysdeps/mach/hurd/fstatfs64.c
index 1b9f1b3092..364b96e14d 100644
--- a/sysdeps/mach/hurd/fstatfs64.c
+++ b/sysdeps/mach/hurd/fstatfs64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2018 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
diff --git a/sysdeps/mach/hurd/fstatvfs.c b/sysdeps/mach/hurd/fstatvfs.c
index b3ef4b7d0c..4fbf6e5bed 100644
--- a/sysdeps/mach/hurd/fstatvfs.c
+++ b/sysdeps/mach/hurd/fstatvfs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2018 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
diff --git a/sysdeps/mach/hurd/fstatvfs64.c b/sysdeps/mach/hurd/fstatvfs64.c
index d08b825e7b..f5e03316f4 100644
--- a/sysdeps/mach/hurd/fstatvfs64.c
+++ b/sysdeps/mach/hurd/fstatvfs64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2018 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
diff --git a/sysdeps/mach/hurd/fsync.c b/sysdeps/mach/hurd/fsync.c
index 13dc2baa46..d8ae6e0358 100644
--- a/sysdeps/mach/hurd/fsync.c
+++ b/sysdeps/mach/hurd/fsync.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/ftruncate.c b/sysdeps/mach/hurd/ftruncate.c
index e4eebcc797..94e17803ac 100644
--- a/sysdeps/mach/hurd/ftruncate.c
+++ b/sysdeps/mach/hurd/ftruncate.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/ftruncate64.c b/sysdeps/mach/hurd/ftruncate64.c
new file mode 100644
index 0000000000..7a33dd1823
--- /dev/null
+++ b/sysdeps/mach/hurd/ftruncate64.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1991-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <hurd.h>
+#include <hurd/fd.h>
+
+/* Truncate the file referenced by FD to LENGTH bytes. */
+int
+__ftruncate64 (int fd, off64_t length)
+{
+ error_t err;
+ if (err = HURD_DPORT_USE (fd, __file_set_size (port, length)))
+ return __hurd_dfail (fd, err);
+ return 0;
+}
+
+weak_alias (__ftruncate64, ftruncate64)
diff --git a/sysdeps/mach/hurd/futimens.c b/sysdeps/mach/hurd/futimens.c
new file mode 100644
index 0000000000..4a3943e673
--- /dev/null
+++ b/sysdeps/mach/hurd/futimens.c
@@ -0,0 +1,50 @@
+/* futimens -- change access and modification times of open file. Hurd version.
+ Copyright (C) 2002-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sys/time.h>
+#include <errno.h>
+#include <stddef.h>
+#include <hurd.h>
+#include <hurd/fd.h>
+
+#include "utime-helper.c"
+
+/* Change the access time of FD to TSP[0] and
+ the modification time of FD to TSP[1]. */
+int
+__futimens (int fd, const struct timespec tsp[2])
+{
+ struct timespec atime, mtime;
+ error_t err;
+
+ utime_ts_from_tspec (tsp, &atime, &mtime);
+
+ err = HURD_DPORT_USE (fd, __file_utimens (port, atime, mtime));
+
+ if (err == MIG_BAD_ID || err == EOPNOTSUPP)
+ {
+ time_value_t atim, mtim;
+
+ utime_tvalue_from_tspec (tsp, &atim, &mtim);
+
+ err = HURD_DPORT_USE (fd, __file_utimes (port, atim, mtim));
+ }
+
+ return err ? __hurd_dfail (fd, err) : 0;
+}
+weak_alias (__futimens, futimens)
diff --git a/sysdeps/mach/hurd/futimes.c b/sysdeps/mach/hurd/futimes.c
index a4df741a2d..1b521e3e51 100644
--- a/sysdeps/mach/hurd/futimes.c
+++ b/sysdeps/mach/hurd/futimes.c
@@ -1,5 +1,5 @@
/* futimes -- change access and modification times of open file. Hurd version.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 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
@@ -22,29 +22,29 @@
#include <hurd.h>
#include <hurd/fd.h>
+#include "utime-helper.c"
+
/* Change the access time of FD to TVP[0] and
the modification time of FD to TVP[1]. */
int
__futimes (int fd, const struct timeval tvp[2])
{
- union tv
- {
- struct timeval tv;
- time_value_t tvt;
- };
- const union tv *u = (const union tv *) tvp;
- union tv nulltv[2];
+ struct timespec atime, mtime;
error_t err;
- if (tvp == NULL)
+ utime_ts_from_tval (tvp, &atime, &mtime);
+
+ err = HURD_DPORT_USE (fd, __file_utimens (port, atime, mtime));
+
+ if (err == EMIG_BAD_ID || err == EOPNOTSUPP)
{
- /* Setting the number of microseconds to `-1' tells the
- underlying filesystems to use the current time. */
- nulltv[0].tvt.microseconds = nulltv[1].tvt.microseconds = -1;
- u = nulltv;
+ time_value_t atim, mtim;
+
+ utime_tvalue_from_tval (tvp, &atim, &mtim);
+
+ err = HURD_DPORT_USE (fd, __file_utimes (port, atim, mtim));
}
- err = HURD_DPORT_USE (fd, __file_utimes (port, u[0].tvt, u[1].tvt));
return err ? __hurd_dfail (fd, err) : 0;
}
weak_alias (__futimes, futimes)
diff --git a/sysdeps/mach/hurd/futimesat.c b/sysdeps/mach/hurd/futimesat.c
new file mode 100644
index 0000000000..b4939bf644
--- /dev/null
+++ b/sysdeps/mach/hurd/futimesat.c
@@ -0,0 +1,45 @@
+/* futimesat -- change access and modification times of file. Hurd version.
+ Copyright (C) 1991-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sys/time.h>
+#include <errno.h>
+#include <stddef.h>
+#include <hurd.h>
+#include <hurd/fd.h>
+
+#include "utime-helper.c"
+
+/* Change the access time of FILE relative to FD to TVP[0] and
+ the modification time of FILE to TVP[1]. */
+int
+futimesat (int fd, const char *file, const struct timeval tvp[2])
+{
+ error_t err;
+ file_t port;
+
+ port = __file_name_lookup_at (fd, 0, file, 0, 0);
+ if (port == MACH_PORT_NULL)
+ return -1;
+
+ err = hurd_futimes (port, tvp);
+
+ __mach_port_deallocate (__mach_task_self (), port);
+ if (err)
+ return __hurd_fail (err);
+ return 0;
+}
diff --git a/sysdeps/mach/hurd/fxstat.c b/sysdeps/mach/hurd/fxstat.c
index 1ab83651b0..f6570af630 100644
--- a/sysdeps/mach/hurd/fxstat.c
+++ b/sysdeps/mach/hurd/fxstat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
diff --git a/sysdeps/mach/hurd/fxstat64.c b/sysdeps/mach/hurd/fxstat64.c
index 0c2d0a75a9..fcdbb3671e 100644
--- a/sysdeps/mach/hurd/fxstat64.c
+++ b/sysdeps/mach/hurd/fxstat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2018 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
diff --git a/sysdeps/mach/hurd/fxstatat.c b/sysdeps/mach/hurd/fxstatat.c
index 35fec83ab4..06100d2226 100644
--- a/sysdeps/mach/hurd/fxstatat.c
+++ b/sysdeps/mach/hurd/fxstatat.c
@@ -1,5 +1,5 @@
/* Get information about file named relative to open directory. Hurd version.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
diff --git a/sysdeps/mach/hurd/fxstatat64.c b/sysdeps/mach/hurd/fxstatat64.c
index 45f18fd146..909f6f2481 100644
--- a/sysdeps/mach/hurd/fxstatat64.c
+++ b/sysdeps/mach/hurd/fxstatat64.c
@@ -1,5 +1,5 @@
/* Get information about file named relative to open directory. Hurd version.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
diff --git a/sysdeps/mach/hurd/gai_misc.h b/sysdeps/mach/hurd/gai_misc.h
new file mode 100644
index 0000000000..7804139baa
--- /dev/null
+++ b/sysdeps/mach/hurd/gai_misc.h
@@ -0,0 +1,67 @@
+/* Copyright (C) 2006-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <assert.h>
+#include <signal.h>
+#include <pthread.h>
+
+#define gai_start_notify_thread __gai_start_notify_thread
+#define gai_create_helper_thread __gai_create_helper_thread
+
+extern inline void
+__gai_start_notify_thread (void)
+{
+ sigset_t ss;
+ sigemptyset (&ss);
+ int sigerr __attribute__ ((unused));
+ sigerr = pthread_sigmask (SIG_SETMASK, &ss, NULL);
+ assert_perror (sigerr);
+}
+
+extern inline int
+__gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *),
+ void *arg)
+{
+ pthread_attr_t attr;
+
+ /* Make sure the thread is created detached. */
+ pthread_attr_init (&attr);
+ pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
+
+ /* The helper thread needs only very little resources. */
+ (void) pthread_attr_setstacksize (&attr, 0x10000);
+
+ /* Block all signals in the helper thread. To do this thoroughly we
+ temporarily have to block all signals here. */
+ sigset_t ss;
+ sigset_t oss;
+ sigfillset (&ss);
+ int sigerr __attribute__ ((unused));
+ sigerr = pthread_sigmask (SIG_SETMASK, &ss, &oss);
+ assert_perror (sigerr);
+
+ int ret = pthread_create (threadp, &attr, tf, arg);
+
+ /* Restore the signal mask. */
+ sigerr = pthread_sigmask (SIG_SETMASK, &oss, NULL);
+ assert_perror (sigerr);
+
+ (void) pthread_attr_destroy (&attr);
+ return ret;
+}
+
+#include_next <gai_misc.h>
diff --git a/sysdeps/mach/hurd/getclktck.c b/sysdeps/mach/hurd/getclktck.c
index 9ed99422cc..35458361f4 100644
--- a/sysdeps/mach/hurd/getclktck.c
+++ b/sysdeps/mach/hurd/getclktck.c
@@ -1,5 +1,5 @@
/* Return run-time value of CLK_TCK for Hurd.
- Copyright (C) 1999-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 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
diff --git a/sysdeps/mach/hurd/getcwd.c b/sysdeps/mach/hurd/getcwd.c
index a757dab965..c30b7c507b 100644
--- a/sysdeps/mach/hurd/getcwd.c
+++ b/sysdeps/mach/hurd/getcwd.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -37,7 +37,7 @@
a slash to indicate that it is relative to some unknown root directory. */
char *
-_hurd_canonicalize_directory_name_internal (file_t thisdir,
+__hurd_canonicalize_directory_name_internal (file_t thisdir,
char *buf,
size_t size)
{
@@ -282,6 +282,7 @@ _hurd_canonicalize_directory_name_internal (file_t thisdir,
cleanup ();
return NULL;
}
+strong_alias (__hurd_canonicalize_directory_name_internal, _hurd_canonicalize_directory_name_internal)
char *
__canonicalize_directory_name_internal (const char *thisdir, char *buf,
@@ -291,7 +292,7 @@ __canonicalize_directory_name_internal (const char *thisdir, char *buf,
file_t port = __file_name_lookup (thisdir, 0, 0);
if (port == MACH_PORT_NULL)
return NULL;
- result = _hurd_canonicalize_directory_name_internal (port, buf, size);
+ result = __hurd_canonicalize_directory_name_internal (port, buf, size);
__mach_port_deallocate (__mach_task_self (), port);
return result;
}
@@ -306,8 +307,8 @@ __getcwd (char *buf, size_t size)
{
char *cwd =
__USEPORT (CWDIR,
- _hurd_canonicalize_directory_name_internal (port,
- buf, size));
+ __hurd_canonicalize_directory_name_internal (port,
+ buf, size));
if (cwd && cwd[0] != '/')
{
/* `cwd' is an unknown root directory. */
diff --git a/sysdeps/mach/hurd/getdomain.c b/sysdeps/mach/hurd/getdomain.c
index dfe8d49e2b..dc32228849 100644
--- a/sysdeps/mach/hurd/getdomain.c
+++ b/sysdeps/mach/hurd/getdomain.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2018 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
diff --git a/sysdeps/mach/hurd/getdtsz.c b/sysdeps/mach/hurd/getdtsz.c
index 0c55745211..3fb8231d99 100644
--- a/sysdeps/mach/hurd/getdtsz.c
+++ b/sysdeps/mach/hurd/getdtsz.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/getegid.c b/sysdeps/mach/hurd/getegid.c
index cd280973fa..d232482740 100644
--- a/sysdeps/mach/hurd/getegid.c
+++ b/sysdeps/mach/hurd/getegid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/geteuid.c b/sysdeps/mach/hurd/geteuid.c
index 9051b57105..a8c87ccb69 100644
--- a/sysdeps/mach/hurd/geteuid.c
+++ b/sysdeps/mach/hurd/geteuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/getgid.c b/sysdeps/mach/hurd/getgid.c
index e9617b71e6..1e35f9c906 100644
--- a/sysdeps/mach/hurd/getgid.c
+++ b/sysdeps/mach/hurd/getgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/getgroups.c b/sysdeps/mach/hurd/getgroups.c
index 45deda4155..ad6babe56d 100644
--- a/sysdeps/mach/hurd/getgroups.c
+++ b/sysdeps/mach/hurd/getgroups.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/gethostid.c b/sysdeps/mach/hurd/gethostid.c
index aadcdc5970..0cfbb8ae7f 100644
--- a/sysdeps/mach/hurd/gethostid.c
+++ b/sysdeps/mach/hurd/gethostid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/gethostname.c b/sysdeps/mach/hurd/gethostname.c
index 5b30c20df8..41fe0ecc1f 100644
--- a/sysdeps/mach/hurd/gethostname.c
+++ b/sysdeps/mach/hurd/gethostname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/getitimer.c b/sysdeps/mach/hurd/getitimer.c
index a2d910b064..65ffe9386e 100644
--- a/sysdeps/mach/hurd/getitimer.c
+++ b/sysdeps/mach/hurd/getitimer.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 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
diff --git a/sysdeps/mach/hurd/getlogin.c b/sysdeps/mach/hurd/getlogin.c
index d9becf6d87..0ee5a28bc9 100644
--- a/sysdeps/mach/hurd/getlogin.c
+++ b/sysdeps/mach/hurd/getlogin.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/getlogin_r.c b/sysdeps/mach/hurd/getlogin_r.c
index 73d2f071a0..79b8271a74 100644
--- a/sysdeps/mach/hurd/getlogin_r.c
+++ b/sysdeps/mach/hurd/getlogin_r.c
@@ -1,5 +1,5 @@
/* Reentrant function to return the current login name. Hurd version.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 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
diff --git a/sysdeps/mach/hurd/getpeername.c b/sysdeps/mach/hurd/getpeername.c
index 79862ec3aa..dc78538b75 100644
--- a/sysdeps/mach/hurd/getpeername.c
+++ b/sysdeps/mach/hurd/getpeername.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
diff --git a/sysdeps/mach/hurd/getpgid.c b/sysdeps/mach/hurd/getpgid.c
index 61ae5fb8a4..83d14eaa27 100644
--- a/sysdeps/mach/hurd/getpgid.c
+++ b/sysdeps/mach/hurd/getpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/getpid.c b/sysdeps/mach/hurd/getpid.c
index 2fc9f63ccc..a7943def59 100644
--- a/sysdeps/mach/hurd/getpid.c
+++ b/sysdeps/mach/hurd/getpid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/getppid.c b/sysdeps/mach/hurd/getppid.c
index 523bb9527b..212c9607c2 100644
--- a/sysdeps/mach/hurd/getppid.c
+++ b/sysdeps/mach/hurd/getppid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/getpriority.c b/sysdeps/mach/hurd/getpriority.c
index 444a2dd049..c581ddd10f 100644
--- a/sysdeps/mach/hurd/getpriority.c
+++ b/sysdeps/mach/hurd/getpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 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
diff --git a/sysdeps/mach/hurd/getresgid.c b/sysdeps/mach/hurd/getresgid.c
index fd42571baa..e5eeba8ac5 100644
--- a/sysdeps/mach/hurd/getresgid.c
+++ b/sysdeps/mach/hurd/getresgid.c
@@ -1,5 +1,5 @@
/* getresgid -- fetch real group ID, effective group ID, and saved-set group ID
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 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
@@ -27,7 +27,6 @@ int
__getresgid (gid_t *rgid, gid_t *egid, gid_t *sgid)
{
error_t err;
- gid_t real, eff, saved;
HURD_CRITICAL_BEGIN;
__mutex_lock (&_hurd_id.lock);
@@ -40,22 +39,18 @@ __getresgid (gid_t *rgid, gid_t *egid, gid_t *sgid)
err = EGRATUITOUS;
else
{
- real = _hurd_id.aux.gids[0];
- eff = _hurd_id.gen.ngids < 1 ? real : _hurd_id.gen.gids[0];
- saved = _hurd_id.aux.ngids < 2 ? real : _hurd_id.aux.gids[1];
+ gid_t real = _hurd_id.aux.gids[0];
+
+ *rgid = real;
+ *egid = _hurd_id.gen.ngids < 1 ? real : _hurd_id.gen.gids[0];
+ *sgid = _hurd_id.aux.ngids < 2 ? real : _hurd_id.aux.gids[1];
}
}
__mutex_unlock (&_hurd_id.lock);
HURD_CRITICAL_END;
- if (err)
- return __hurd_fail (err);
-
- *rgid = real;
- *egid = eff;
- *sgid = saved;
- return 0;
+ return __hurd_fail (err);
}
libc_hidden_def (__getresgid)
weak_alias (__getresgid, getresgid)
diff --git a/sysdeps/mach/hurd/getresuid.c b/sysdeps/mach/hurd/getresuid.c
index fba1c786ee..4af4786fc5 100644
--- a/sysdeps/mach/hurd/getresuid.c
+++ b/sysdeps/mach/hurd/getresuid.c
@@ -1,5 +1,5 @@
/* getresuid -- fetch real user ID, effective user ID, and saved-set user ID
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 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
@@ -27,7 +27,6 @@ int
__getresuid (uid_t *ruid, uid_t *euid, uid_t *suid)
{
error_t err;
- uid_t real, eff, saved;
HURD_CRITICAL_BEGIN;
__mutex_lock (&_hurd_id.lock);
@@ -40,22 +39,18 @@ __getresuid (uid_t *ruid, uid_t *euid, uid_t *suid)
err = EGRATUITOUS;
else
{
- real = _hurd_id.aux.uids[0];
- eff = _hurd_id.gen.nuids < 1 ? real : _hurd_id.gen.uids[0];
- saved = _hurd_id.aux.nuids < 2 ? real : _hurd_id.aux.uids[1];
+ uid_t real = _hurd_id.aux.uids[0];
+
+ *ruid = real;
+ *euid = _hurd_id.gen.nuids < 1 ? real : _hurd_id.gen.uids[0];
+ *suid = _hurd_id.aux.nuids < 2 ? real : _hurd_id.aux.uids[1];
}
}
__mutex_unlock (&_hurd_id.lock);
HURD_CRITICAL_END;
- if (err)
- return __hurd_fail (err);
-
- *ruid = real;
- *euid = eff;
- *suid = saved;
- return 0;
+ return __hurd_fail (err);
}
libc_hidden_def (__getresuid)
weak_alias (__getresuid, getresuid)
diff --git a/sysdeps/mach/hurd/getrlimit.c b/sysdeps/mach/hurd/getrlimit.c
index eda3fec666..5b994c59a7 100644
--- a/sysdeps/mach/hurd/getrlimit.c
+++ b/sysdeps/mach/hurd/getrlimit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/getrusage.c b/sysdeps/mach/hurd/getrusage.c
index 0388bae835..dfda2b7e1b 100644
--- a/sysdeps/mach/hurd/getrusage.c
+++ b/sysdeps/mach/hurd/getrusage.c
@@ -1,5 +1,5 @@
/* getrusage -- Get resource usage information about processes. Hurd version.
- Copyright (C) 1999-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 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
diff --git a/sysdeps/mach/hurd/getsid.c b/sysdeps/mach/hurd/getsid.c
index 56e8954c88..ae0e0a96bd 100644
--- a/sysdeps/mach/hurd/getsid.c
+++ b/sysdeps/mach/hurd/getsid.c
@@ -1,5 +1,5 @@
/* getsid -- Return session ID of a process. Hurd version.
- Copyright (C) 1995-2016 Free Software Foundation, Inc.
+ Copyright (C) 1995-2018 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
diff --git a/sysdeps/mach/hurd/getsockname.c b/sysdeps/mach/hurd/getsockname.c
index 60cad8e617..2e56564824 100644
--- a/sysdeps/mach/hurd/getsockname.c
+++ b/sysdeps/mach/hurd/getsockname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
diff --git a/sysdeps/mach/hurd/getsockopt.c b/sysdeps/mach/hurd/getsockopt.c
index fc00214820..364a622188 100644
--- a/sysdeps/mach/hurd/getsockopt.c
+++ b/sysdeps/mach/hurd/getsockopt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
diff --git a/sysdeps/mach/hurd/getuid.c b/sysdeps/mach/hurd/getuid.c
index 9844eefc9c..80acbd4987 100644
--- a/sysdeps/mach/hurd/getuid.c
+++ b/sysdeps/mach/hurd/getuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/getxattr.c b/sysdeps/mach/hurd/getxattr.c
index 2653e5767e..3463bdfcb2 100644
--- a/sysdeps/mach/hurd/getxattr.c
+++ b/sysdeps/mach/hurd/getxattr.c
@@ -1,5 +1,5 @@
/* Access to extended attributes on files. Hurd version.
- Copyright (C) 2004-2016 Free Software Foundation, Inc.
+ Copyright (C) 2004-2018 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
diff --git a/sysdeps/mach/hurd/group_member.c b/sysdeps/mach/hurd/group_member.c
index f11d0c689a..5b4be63218 100644
--- a/sysdeps/mach/hurd/group_member.c
+++ b/sysdeps/mach/hurd/group_member.c
@@ -1,5 +1,5 @@
/* `group_member' -- test if process is in a given group. Hurd version.
- Copyright (C) 1993-2016 Free Software Foundation, Inc.
+ Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/hp-timing.h b/sysdeps/mach/hurd/hp-timing.h
new file mode 100644
index 0000000000..7bff90cb93
--- /dev/null
+++ b/sysdeps/mach/hurd/hp-timing.h
@@ -0,0 +1,21 @@
+/* High precision, low overhead timing functions. Generic version.
+ Copyright (C) 1998-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* We don't have support for high precision timing for now. */
+#include <sysdeps/generic/hp-timing.h>
diff --git a/sysdeps/mach/hurd/htl/Implies b/sysdeps/mach/hurd/htl/Implies
new file mode 100644
index 0000000000..64daad184a
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/Implies
@@ -0,0 +1,2 @@
+hurd/htl
+mach/htl
diff --git a/sysdeps/mach/hurd/htl/bits/pthread-np.h b/sysdeps/mach/hurd/htl/bits/pthread-np.h
new file mode 100644
index 0000000000..e42fb3a038
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/bits/pthread-np.h
@@ -0,0 +1,37 @@
+/* Non-portable functions. Hurd on Mach version.
+ Copyright (C) 2008-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/*
+ * Never include this file directly; use <pthread.h> or <cthreads.h> instead.
+ */
+
+#ifndef _BITS_PTHREAD_NP_H
+#define _BITS_PTHREAD_NP_H 1
+
+/* Same as pthread_cond_wait, but for Hurd-specific cancellation.
+ See hurd_thread_cancel. */
+extern int pthread_hurd_cond_wait_np (pthread_cond_t *__restrict __cond,
+ pthread_mutex_t *__restrict __mutex);
+
+/* Same as pthread_cond_timedwait, but for Hurd-specific cancellation.
+ See hurd_thread_cancel. */
+extern int pthread_hurd_cond_timedwait_np (pthread_cond_t *__restrict __cond,
+ pthread_mutex_t *__restrict __mutex,
+ const struct timespec *__abstime);
+
+#endif /* bits/pthread-np.h */
diff --git a/sysdeps/mach/hurd/htl/bits/types/struct___pthread_mutex.h b/sysdeps/mach/hurd/htl/bits/types/struct___pthread_mutex.h
new file mode 100644
index 0000000000..8417ee9531
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/bits/types/struct___pthread_mutex.h
@@ -0,0 +1,49 @@
+/* Mutex type. Generic version.
+ Copyright (C) 2000-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_TYPES_STRUCT___PTHREAD_MUTEX_H
+#define _BITS_TYPES_STRUCT___PTHREAD_MUTEX_H 1
+
+#include <bits/types/struct___pthread_mutexattr.h>
+
+/* User visible part of a mutex. */
+struct __pthread_mutex
+{
+ unsigned int __lock;
+ unsigned int __owner_id;
+ unsigned int __cnt;
+ int __shpid;
+ int __type;
+ int __flags;
+ unsigned int __reserved1;
+ unsigned int __reserved2;
+};
+
+/* Static mutex initializers. */
+#define __PTHREAD_MUTEX_INITIALIZER \
+ { 0, 0, 0, 0, __PTHREAD_MUTEX_TIMED, 0, 0, 0 }
+
+/* The +1 is to mantain binary compatibility with the old
+ * libpthread implementation. */
+#define __PTHREAD_ERRORCHECK_MUTEX_INITIALIZER \
+ { 0, 0, 0, 0, __PTHREAD_MUTEX_ERRORCHECK + 1, 0, 0, 0 }
+
+#define __PTHREAD_RECURSIVE_MUTEX_INITIALIZER \
+ { 0, 0, 0, 0, __PTHREAD_MUTEX_RECURSIVE + 1, 0, 0, 0 }
+
+#endif /* bits/types/struct___pthread_mutex.h */
diff --git a/sysdeps/mach/hurd/htl/pt-attr-setstackaddr.c b/sysdeps/mach/hurd/htl/pt-attr-setstackaddr.c
new file mode 100644
index 0000000000..ff6bee83d0
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-attr-setstackaddr.c
@@ -0,0 +1,28 @@
+/* pthread_attr_setstackaddr. Hurd on Mach version.
+ Copyright (C) 2002-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <pt-internal.h>
+
+int
+__pthread_attr_setstackaddr (pthread_attr_t *attr, void *stackaddr)
+{
+ attr->__stackaddr = stackaddr;
+ return 0;
+}
+strong_alias (__pthread_attr_setstackaddr, pthread_attr_setstackaddr)
diff --git a/sysdeps/mach/hurd/htl/pt-attr-setstacksize.c b/sysdeps/mach/hurd/htl/pt-attr-setstacksize.c
new file mode 100644
index 0000000000..e5c59d14b4
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-attr-setstacksize.c
@@ -0,0 +1,28 @@
+/* pthread_attr_setstacksize. Hurd on Mach version.
+ Copyright (C) 2002-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <pt-internal.h>
+
+int
+__pthread_attr_setstacksize (pthread_attr_t *attr, size_t stacksize)
+{
+ attr->__stacksize = stacksize;
+ return 0;
+}
+strong_alias (__pthread_attr_setstacksize, pthread_attr_setstacksize)
diff --git a/sysdeps/mach/hurd/htl/pt-docancel.c b/sysdeps/mach/hurd/htl/pt-docancel.c
new file mode 100644
index 0000000000..6e9428ce57
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-docancel.c
@@ -0,0 +1,66 @@
+/* Cancel a thread.
+ Copyright (C) 2002-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+
+#include <pt-internal.h>
+#include <pthreadP.h>
+
+static void
+call_exit (void)
+{
+ __pthread_exit (0);
+}
+
+int
+__pthread_do_cancel (struct __pthread *p)
+{
+ mach_port_t ktid;
+ int me;
+
+ assert (p->cancel_pending == 1);
+ assert (p->cancel_state == PTHREAD_CANCEL_ENABLE);
+
+ __pthread_mutex_unlock (&p->cancel_lock);
+
+ ktid = __mach_thread_self ();
+ me = p->kernel_thread == ktid;
+ __mach_port_deallocate (__mach_task_self (), ktid);
+
+ if (me)
+ call_exit ();
+ else
+ {
+ error_t err;
+
+ err = __thread_suspend (p->kernel_thread);
+ assert_perror (err);
+
+ err = __thread_abort (p->kernel_thread);
+ assert_perror (err);
+
+ err = __thread_set_pcsptp (p->kernel_thread,
+ 1, (void *) call_exit, 0, 0, 0, 0);
+ assert_perror (err);
+
+ err = __thread_resume (p->kernel_thread);
+ assert_perror (err);
+ }
+
+ return 0;
+}
diff --git a/sysdeps/mach/hurd/htl/pt-hurd-cond-timedwait.c b/sysdeps/mach/hurd/htl/pt-hurd-cond-timedwait.c
new file mode 100644
index 0000000000..263d3bfd27
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-hurd-cond-timedwait.c
@@ -0,0 +1,169 @@
+/* pthread_hurd_cond_timedwait_np. Hurd-specific wait on a condition.
+ Copyright (C) 2012-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <assert.h>
+#include <hurd/signal.h>
+
+#include <pt-internal.h>
+
+extern int __pthread_hurd_cond_timedwait_internal (pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec
+ *abstime);
+
+int
+__pthread_hurd_cond_timedwait_np (pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime)
+{
+ return __pthread_hurd_cond_timedwait_internal (cond, mutex, abstime);
+}
+
+strong_alias (__pthread_hurd_cond_timedwait_np, pthread_hurd_cond_timedwait_np);
+
+int
+__pthread_hurd_cond_timedwait_internal (pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime)
+{
+ struct hurd_sigstate *ss = _hurd_self_sigstate ();
+ struct __pthread *self = _pthread_self ();
+ error_t err = 0;
+ int cancel, drain;
+ clockid_t clock_id = __pthread_default_condattr.__clock;
+
+ /* This function will be called by hurd_thread_cancel while we are blocked
+ We wake up our thread if it's still blocking or about to block, so it will
+ progress and notice the cancellation flag. */
+ void cancel_me (void)
+ {
+ int unblock;
+
+ __pthread_spin_lock (&cond->__lock);
+ /* The thread only needs to be awaken if it's blocking or about to block.
+ If it was already unblocked, it's not queued any more. */
+ unblock = self->prevp != NULL;
+ if (unblock)
+ __pthread_dequeue (self);
+ __pthread_spin_unlock (&cond->__lock);
+
+ if (unblock)
+ __pthread_wakeup (self);
+ }
+
+ assert (ss->intr_port == MACH_PORT_NULL); /* Sanity check for signal bugs. */
+
+ if (abstime != NULL && (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000))
+ return EINVAL;
+
+ /* Atomically enqueue our thread on the condition variable's queue of
+ waiters, and mark our sigstate to indicate that `cancel_me' must be
+ called to wake us up. We must hold the sigstate lock while acquiring
+ the condition variable's lock and tweaking it, so that
+ hurd_thread_cancel can never suspend us and then deadlock waiting for
+ the condition variable's lock. */
+
+ __spin_lock (&ss->lock);
+ __pthread_spin_lock (&cond->__lock);
+ cancel = ss->cancel;
+ if (cancel)
+ /* We were cancelled before doing anything. Don't block at all. */
+ ss->cancel = 0;
+ else
+ {
+ /* Put us on the queue so that pthread_cond_broadcast will know to wake
+ us up. */
+ __pthread_enqueue (&cond->__queue, self);
+ if (cond->__attr)
+ clock_id = cond->__attr->__clock;
+ /* Tell hurd_thread_cancel how to unblock us. */
+ ss->cancel_hook = &cancel_me;
+ }
+ __pthread_spin_unlock (&cond->__lock);
+ __spin_unlock (&ss->lock);
+
+ if (cancel)
+ {
+ /* Cancelled on entry. Just leave the mutex locked. */
+ mutex = NULL;
+
+ __spin_lock (&ss->lock);
+ }
+ else
+ {
+ /* Release MUTEX before blocking. */
+ __pthread_mutex_unlock (mutex);
+
+ /* Block the thread. */
+ if (abstime != NULL)
+ err = __pthread_timedblock (self, abstime, clock_id);
+ else
+ {
+ err = 0;
+ __pthread_block (self);
+ }
+
+ /* As it was done when enqueueing, prevent hurd_thread_cancel from
+ suspending us while the condition lock is held. */
+ __spin_lock (&ss->lock);
+ __pthread_spin_lock (&cond->__lock);
+ if (self->prevp == NULL)
+ /* Another thread removed us from the list of waiters, which means
+ a wakeup message has been sent. It was either consumed while
+ we were blocking, or queued after we timed out and before we
+ acquired the condition lock, in which case the message queue
+ must be drained. */
+ drain = err ? 1 : 0;
+ else
+ {
+ /* We're still in the list of waiters. Noone attempted to wake us
+ up, i.e. we timed out. */
+ __pthread_dequeue (self);
+ drain = 0;
+ }
+ __pthread_spin_unlock (&cond->__lock);
+
+ if (drain)
+ __pthread_block (self);
+ }
+
+ /* Clear the hook, now that we are done blocking. */
+ ss->cancel_hook = NULL;
+ /* Check the cancellation flag; we might have unblocked due to
+ cancellation rather than a normal pthread_cond_signal or
+ pthread_cond_broadcast (or we might have just happened to get cancelled
+ right after waking up). */
+ cancel |= ss->cancel;
+ ss->cancel = 0;
+ __spin_unlock (&ss->lock);
+
+ if (mutex != NULL)
+ /* Reacquire the mutex and return. */
+ __pthread_mutex_lock (mutex);
+
+ if (cancel)
+ return EINTR;
+ else if (err)
+ {
+ assert (err == ETIMEDOUT);
+ return err;
+ }
+
+ return 0;
+}
diff --git a/sysdeps/mach/hurd/htl/pt-hurd-cond-wait.c b/sysdeps/mach/hurd/htl/pt-hurd-cond-wait.c
new file mode 100644
index 0000000000..067bd667e7
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-hurd-cond-wait.c
@@ -0,0 +1,40 @@
+/* pthread_hurd_cond_wait. Hurd-specific wait on a condition.
+ Copyright (C) 2012-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <assert.h>
+#include <hurd/signal.h>
+
+#include <pt-internal.h>
+
+/* Implemented in pt-hurd-cond-timedwait.c. */
+extern int __pthread_hurd_cond_timedwait_internal (pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec
+ *abstime);
+
+int
+__pthread_hurd_cond_wait_np (pthread_cond_t *cond, pthread_mutex_t *mutex)
+{
+ error_t err;
+
+ err = __pthread_hurd_cond_timedwait_internal (cond, mutex, NULL);
+ return err == EINTR;
+}
+
+strong_alias (__pthread_hurd_cond_wait_np, pthread_hurd_cond_wait_np);
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-consistent.c b/sysdeps/mach/hurd/htl/pt-mutex-consistent.c
new file mode 100644
index 0000000000..e02f959a57
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutex-consistent.c
@@ -0,0 +1,47 @@
+/* pthread_mutex_consistent. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+pthread_mutex_consistent (pthread_mutex_t *mtxp)
+{
+ int ret = EINVAL;
+ unsigned int val = mtxp->__lock;
+
+ if ((mtxp->__flags & PTHREAD_MUTEX_ROBUST) != 0 &&
+ (val & LLL_DEAD_OWNER) != 0 &&
+ atomic_compare_and_exchange_bool_acq (&mtxp->__lock,
+ __getpid () | LLL_WAITERS,
+ val) == 0)
+ {
+ /* The mutex is now ours, and it's consistent. */
+ mtxp->__owner_id = _pthread_self ()->thread;
+ mtxp->__cnt = 1;
+ ret = 0;
+ }
+
+ return ret;
+}
+
+weak_alias (pthread_mutex_consistent, pthread_mutex_consistent_np)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-destroy.c b/sysdeps/mach/hurd/htl/pt-mutex-destroy.c
new file mode 100644
index 0000000000..7e7c4bd7a7
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutex-destroy.c
@@ -0,0 +1,37 @@
+/* pthread_mutex_destroy. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+_pthread_mutex_destroy (pthread_mutex_t *mtxp)
+{
+ atomic_read_barrier ();
+ if (*(volatile unsigned int *) &mtxp->__lock != 0)
+ return EBUSY;
+
+ mtxp->__type = -1;
+ return 0;
+}
+
+strong_alias (_pthread_mutex_destroy, pthread_mutex_destroy)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-getprioceiling.c b/sysdeps/mach/hurd/htl/pt-mutex-getprioceiling.c
new file mode 100644
index 0000000000..e52da9cad2
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutex-getprioceiling.c
@@ -0,0 +1,34 @@
+/* pthread_mutex_getprioceiling. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+pthread_mutex_getprioceiling (const pthread_mutex_t *mtxp, int *clp)
+{
+ (void) mtxp;
+ (void) clp;
+ return ENOSYS;
+}
+
+stub_warning (pthread_mutex_getprioceiling)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-init.c b/sysdeps/mach/hurd/htl/pt-mutex-init.c
new file mode 100644
index 0000000000..687a4c0e67
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutex-init.c
@@ -0,0 +1,57 @@
+/* pthread_mutex_init. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include <pthreadP.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+static const pthread_mutexattr_t dfl_attr = {
+ .__prioceiling = 0,
+ .__protocol = PTHREAD_PRIO_NONE,
+ .__pshared = PTHREAD_PROCESS_PRIVATE,
+ .__mutex_type = __PTHREAD_MUTEX_TIMED
+};
+
+int
+_pthread_mutex_init (pthread_mutex_t *mtxp, const pthread_mutexattr_t *attrp)
+{
+ if (attrp == NULL)
+ attrp = &dfl_attr;
+
+ mtxp->__flags = (attrp->__pshared == PTHREAD_PROCESS_SHARED ?
+ GSYNC_SHARED : 0) | ((attrp->
+ __prioceiling & PTHREAD_MUTEX_ROBUST) ?
+ PTHREAD_MUTEX_ROBUST : 0);
+
+ mtxp->__type = attrp->__mutex_type +
+ (attrp->__mutex_type != __PTHREAD_MUTEX_TIMED);
+
+ mtxp->__owner_id = 0;
+ mtxp->__shpid = 0;
+ mtxp->__cnt = 0;
+ mtxp->__lock = 0;
+
+ return 0;
+}
+
+strong_alias (_pthread_mutex_init, pthread_mutex_init)
+hidden_def (_pthread_mutex_init)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-lock.c b/sysdeps/mach/hurd/htl/pt-mutex-lock.c
new file mode 100644
index 0000000000..a7f1537756
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutex-lock.c
@@ -0,0 +1,80 @@
+/* pthread_mutex_lock. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+__pthread_mutex_lock (pthread_mutex_t *mtxp)
+{
+ struct __pthread *self;
+ int flags = mtxp->__flags & GSYNC_SHARED;
+ int ret = 0;
+
+ switch (MTX_TYPE (mtxp))
+ {
+ case PT_MTX_NORMAL:
+ lll_lock (&mtxp->__lock, flags);
+ break;
+
+ case PT_MTX_RECURSIVE:
+ self = _pthread_self ();
+ if (mtx_owned_p (mtxp, self, flags))
+ {
+ if (__glibc_unlikely (mtxp->__cnt + 1 == 0))
+ return EAGAIN;
+
+ ++mtxp->__cnt;
+ return ret;
+ }
+
+ lll_lock (&mtxp->__lock, flags);
+ mtx_set_owner (mtxp, self, flags);
+ mtxp->__cnt = 1;
+ break;
+
+ case PT_MTX_ERRORCHECK:
+ self = _pthread_self ();
+ if (mtx_owned_p (mtxp, self, flags))
+ return EDEADLK;
+
+ lll_lock (&mtxp->__lock, flags);
+ mtx_set_owner (mtxp, self, flags);
+ break;
+
+ case PT_MTX_NORMAL | PTHREAD_MUTEX_ROBUST:
+ case PT_MTX_RECURSIVE | PTHREAD_MUTEX_ROBUST:
+ case PT_MTX_ERRORCHECK | PTHREAD_MUTEX_ROBUST:
+ self = _pthread_self ();
+ ROBUST_LOCK (self, mtxp, __lll_robust_lock, flags);
+ break;
+
+ default:
+ ret = EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
+strong_alias (__pthread_mutex_lock, _pthread_mutex_lock)
+strong_alias (__pthread_mutex_lock, pthread_mutex_lock)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-setprioceiling.c b/sysdeps/mach/hurd/htl/pt-mutex-setprioceiling.c
new file mode 100644
index 0000000000..c06520a83d
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutex-setprioceiling.c
@@ -0,0 +1,35 @@
+/* pthread_mutex_setprioceiling. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+pthread_mutex_setprioceiling (pthread_mutex_t *mtxp, int cl, int *prp)
+{
+ (void) mtxp;
+ (void) cl;
+ (void) prp;
+ return ENOSYS;
+}
+
+stub_warning (pthread_mutex_setprioceiling)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c b/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c
new file mode 100644
index 0000000000..f804ac08ad
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c
@@ -0,0 +1,78 @@
+/* pthread_mutex_timedlock. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+pthread_mutex_timedlock (pthread_mutex_t *mtxp, const struct timespec *tsp)
+{
+ struct __pthread *self;
+ int ret, flags = mtxp->__flags & GSYNC_SHARED;
+
+ switch (MTX_TYPE (mtxp))
+ {
+ case PT_MTX_NORMAL:
+ ret = lll_abstimed_lock (&mtxp->__lock, tsp, flags);
+ break;
+
+ case PT_MTX_RECURSIVE:
+ self = _pthread_self ();
+ if (mtx_owned_p (mtxp, self, flags))
+ {
+ if (__glibc_unlikely (mtxp->__cnt + 1 == 0))
+ return EAGAIN;
+
+ ++mtxp->__cnt;
+ ret = 0;
+ }
+ else if ((ret = lll_abstimed_lock (&mtxp->__lock, tsp, flags)) == 0)
+ {
+ mtx_set_owner (mtxp, self, flags);
+ mtxp->__cnt = 1;
+ }
+
+ break;
+
+ case PT_MTX_ERRORCHECK:
+ self = _pthread_self ();
+ if (mtx_owned_p (mtxp, self, flags))
+ ret = EDEADLK;
+ else if ((ret = lll_abstimed_lock (&mtxp->__lock, tsp, flags)) == 0)
+ mtx_set_owner (mtxp, self, flags);
+
+ break;
+
+ case PT_MTX_NORMAL | PTHREAD_MUTEX_ROBUST:
+ case PT_MTX_RECURSIVE | PTHREAD_MUTEX_ROBUST:
+ case PT_MTX_ERRORCHECK | PTHREAD_MUTEX_ROBUST:
+ self = _pthread_self ();
+ ROBUST_LOCK (self, mtxp, lll_robust_abstimed_lock, tsp, flags);
+ break;
+
+ default:
+ ret = EINVAL;
+ break;
+ }
+
+ return ret;
+}
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c b/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c
new file mode 100644
index 0000000000..f6281292ab
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c
@@ -0,0 +1,76 @@
+/* pthread_mutex_transfer_np. Transfer mutex ownership to another thread.
+ Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+__pthread_mutex_transfer_np (pthread_mutex_t *mtxp, pthread_t th)
+{
+ struct __pthread *self = _pthread_self ();
+ struct __pthread *pt = __pthread_getid (th);
+
+ if (pt == NULL)
+ return ESRCH;
+ else if (pt == self)
+ return 0;
+
+ int ret = 0;
+ int flags = mtxp->__flags & GSYNC_SHARED;
+
+ switch (MTX_TYPE (mtxp))
+ {
+ case PT_MTX_NORMAL:
+ break;
+
+ case PT_MTX_RECURSIVE:
+ case PT_MTX_ERRORCHECK:
+ if (!mtx_owned_p (mtxp, self, flags))
+ ret = EPERM;
+ else
+ mtx_set_owner (mtxp, pt, flags);
+
+ break;
+
+ case PT_MTX_NORMAL | PTHREAD_MUTEX_ROBUST:
+ case PT_MTX_RECURSIVE | PTHREAD_MUTEX_ROBUST:
+ case PT_MTX_ERRORCHECK | PTHREAD_MUTEX_ROBUST:
+ /* Note that this can be used to transfer an inconsistent
+ * mutex as well. The new owner will still have the same
+ * flags as the original. */
+ if (mtxp->__owner_id != self->thread ||
+ (int) (mtxp->__lock & LLL_OWNER_MASK) != __getpid ())
+ ret = EPERM;
+ else
+ mtxp->__owner_id = pt->thread;
+
+ break;
+
+ default:
+ ret = EINVAL;
+ }
+
+ return ret;
+}
+
+weak_alias (__pthread_mutex_transfer_np, pthread_mutex_transfer_np)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-trylock.c b/sysdeps/mach/hurd/htl/pt-mutex-trylock.c
new file mode 100644
index 0000000000..9828d783c1
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutex-trylock.c
@@ -0,0 +1,84 @@
+/* pthread_mutex_trylock. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+__pthread_mutex_trylock (pthread_mutex_t *mtxp)
+{
+ struct __pthread *self;
+ int ret;
+
+ switch (MTX_TYPE (mtxp))
+ {
+ case PT_MTX_NORMAL:
+ ret = lll_trylock (&mtxp->__lock);
+ if (ret)
+ ret = EBUSY;
+ break;
+
+ case PT_MTX_RECURSIVE:
+ self = _pthread_self ();
+ if (mtx_owned_p (mtxp, self, mtxp->__flags))
+ {
+ if (__glibc_unlikely (mtxp->__cnt + 1 == 0))
+ return EAGAIN;
+
+ ++mtxp->__cnt;
+ ret = 0;
+ }
+ else if ((ret = lll_trylock (&mtxp->__lock)) == 0)
+ {
+ mtx_set_owner (mtxp, self, mtxp->__flags);
+ mtxp->__cnt = 1;
+ }
+ else
+ ret = EBUSY;
+
+ break;
+
+ case PT_MTX_ERRORCHECK:
+ self = _pthread_self ();
+ if ((ret = lll_trylock (&mtxp->__lock)) == 0)
+ mtx_set_owner (mtxp, self, mtxp->__flags);
+ else
+ ret = EBUSY;
+ break;
+
+ case PT_MTX_NORMAL | PTHREAD_MUTEX_ROBUST:
+ case PT_MTX_RECURSIVE | PTHREAD_MUTEX_ROBUST:
+ case PT_MTX_ERRORCHECK | PTHREAD_MUTEX_ROBUST:
+ self = _pthread_self ();
+ ROBUST_LOCK (self, mtxp, __lll_robust_trylock);
+ break;
+
+ default:
+ ret = EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
+strong_alias (__pthread_mutex_trylock, _pthread_mutex_trylock)
+strong_alias (__pthread_mutex_trylock, pthread_mutex_trylock)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-unlock.c b/sysdeps/mach/hurd/htl/pt-mutex-unlock.c
new file mode 100644
index 0000000000..1699234420
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutex-unlock.c
@@ -0,0 +1,91 @@
+/* pthread_mutex_unlock. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+__pthread_mutex_unlock (pthread_mutex_t *mtxp)
+{
+ struct __pthread *self;
+ int ret = 0, flags = mtxp->__flags & GSYNC_SHARED;
+
+ switch (MTX_TYPE (mtxp))
+ {
+ case PT_MTX_NORMAL:
+ lll_unlock (&mtxp->__lock, flags);
+ break;
+
+ case PT_MTX_RECURSIVE:
+ self = _pthread_self ();
+ if (!mtx_owned_p (mtxp, self, flags))
+ ret = EPERM;
+ else if (--mtxp->__cnt == 0)
+ {
+ mtxp->__owner_id = mtxp->__shpid = 0;
+ lll_unlock (&mtxp->__lock, flags);
+ }
+
+ break;
+
+ case PT_MTX_ERRORCHECK:
+ self = _pthread_self ();
+ if (!mtx_owned_p (mtxp, self, flags))
+ ret = EPERM;
+ else
+ {
+ mtxp->__owner_id = mtxp->__shpid = 0;
+ lll_unlock (&mtxp->__lock, flags);
+ }
+
+ break;
+
+ case PT_MTX_NORMAL | PTHREAD_MUTEX_ROBUST:
+ case PT_MTX_RECURSIVE | PTHREAD_MUTEX_ROBUST:
+ case PT_MTX_ERRORCHECK | PTHREAD_MUTEX_ROBUST:
+ self = _pthread_self ();
+ if (mtxp->__owner_id == NOTRECOVERABLE_ID)
+ ; /* Nothing to do. */
+ else if (mtxp->__owner_id != self->thread ||
+ (int) (mtxp->__lock & LLL_OWNER_MASK) != __getpid ())
+ ret = EPERM;
+ else if (--mtxp->__cnt == 0)
+ {
+ /* Release the lock. If it's in an inconsistent
+ * state, mark it as irrecoverable. */
+ mtxp->__owner_id = (mtxp->__lock & LLL_DEAD_OWNER) ?
+ NOTRECOVERABLE_ID : 0;
+ __lll_robust_unlock (&mtxp->__lock, flags);
+ }
+
+ break;
+
+ default:
+ ret = EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
+strong_alias (__pthread_mutex_unlock, _pthread_mutex_unlock)
+strong_alias (__pthread_mutex_unlock, pthread_mutex_unlock)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex.h b/sysdeps/mach/hurd/htl/pt-mutex.h
new file mode 100644
index 0000000000..4fc7259513
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutex.h
@@ -0,0 +1,90 @@
+/* Internal definitions for pthreads library.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _PT_MUTEX_H
+#define _PT_MUTEX_H 1
+
+/* Special ID used to signal an unrecoverable robust mutex. */
+#define NOTRECOVERABLE_ID (1U << 31)
+
+/* Common path for robust mutexes. Assumes the variable 'ret'
+ * is bound in the function this is called from. */
+#define ROBUST_LOCK(self, mtxp, cb, ...) \
+ if (mtxp->__owner_id == NOTRECOVERABLE_ID) \
+ return ENOTRECOVERABLE; \
+ else if (mtxp->__owner_id == self->thread && \
+ __getpid () == (int)(mtxp->__lock & LLL_OWNER_MASK)) \
+ { \
+ if (mtxp->__type == PT_MTX_RECURSIVE) \
+ { \
+ if (__glibc_unlikely (mtxp->__cnt + 1 == 0)) \
+ return EAGAIN; \
+ \
+ ++mtxp->__cnt; \
+ return 0; \
+ } \
+ else if (mtxp->__type == PT_MTX_ERRORCHECK) \
+ return EDEADLK; \
+ } \
+ \
+ ret = cb (&mtxp->__lock, ##__VA_ARGS__); \
+ if (ret == 0 || ret == EOWNERDEAD) \
+ { \
+ if (mtxp->__owner_id == ENOTRECOVERABLE) \
+ ret = ENOTRECOVERABLE; \
+ else \
+ { \
+ mtxp->__owner_id = self->thread; \
+ mtxp->__cnt = 1; \
+ if (ret == EOWNERDEAD) \
+ { \
+ mtxp->__lock = mtxp->__lock | LLL_DEAD_OWNER; \
+ atomic_write_barrier (); \
+ } \
+ } \
+ } \
+ (void)0
+
+/* Check that a thread owns the mutex. For non-robust, task-shared
+ * objects, we have to check the thread *and* process-id. */
+#define mtx_owned_p(mtx, pt, flags) \
+ ((mtx)->__owner_id == (pt)->thread && \
+ (((flags) & GSYNC_SHARED) == 0 || \
+ (mtx)->__shpid == __getpid ()))
+
+/* Record a thread as the owner of the mutex. */
+#define mtx_set_owner(mtx, pt, flags) \
+ (void) \
+ ({ \
+ (mtx)->__owner_id = (pt)->thread; \
+ if ((flags) & GSYNC_SHARED) \
+ (mtx)->__shpid = __getpid (); \
+ })
+
+/* Redefined mutex types. The +1 is for binary compatibility. */
+#define PT_MTX_NORMAL __PTHREAD_MUTEX_TIMED
+#define PT_MTX_RECURSIVE (__PTHREAD_MUTEX_RECURSIVE + 1)
+#define PT_MTX_ERRORCHECK (__PTHREAD_MUTEX_ERRORCHECK + 1)
+
+/* Mutex type, including robustness. */
+#define MTX_TYPE(mtxp) \
+ ((mtxp)->__type | ((mtxp)->__flags & PTHREAD_MUTEX_ROBUST))
+
+extern int __getpid (void) __attribute__ ((const));
+
+#endif /* pt-mutex.h */
diff --git a/sysdeps/mach/hurd/htl/pt-mutexattr-destroy.c b/sysdeps/mach/hurd/htl/pt-mutexattr-destroy.c
new file mode 100644
index 0000000000..de8de0f2a5
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutexattr-destroy.c
@@ -0,0 +1,33 @@
+/* pthread_mutexattr_destroy. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+__pthread_mutexattr_destroy (pthread_mutexattr_t *attrp)
+{
+ (void) attrp;
+ return 0;
+}
+
+weak_alias (__pthread_mutexattr_destroy, pthread_mutexattr_destroy)
diff --git a/sysdeps/mach/hurd/htl/pt-mutexattr-getprioceiling.c b/sysdeps/mach/hurd/htl/pt-mutexattr-getprioceiling.c
new file mode 100644
index 0000000000..8c6c748a40
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutexattr-getprioceiling.c
@@ -0,0 +1,34 @@
+/* pthread_mutexattr_getprioceiling. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *ap, int *clp)
+{
+ (void) ap;
+ (void) clp;
+ return ENOSYS;
+}
+
+stub_warning (pthread_mutexattr_getprioceiling)
diff --git a/sysdeps/mach/hurd/htl/pt-mutexattr-getprotocol.c b/sysdeps/mach/hurd/htl/pt-mutexattr-getprotocol.c
new file mode 100644
index 0000000000..f0f9edcf47
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutexattr-getprotocol.c
@@ -0,0 +1,31 @@
+/* pthread_mutexattr_getprotocol. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+pthread_mutexattr_getprotocol (const pthread_mutexattr_t *attrp, int *ptp)
+{
+ *ptp = attrp->__protocol;
+ return 0;
+}
diff --git a/sysdeps/mach/hurd/htl/pt-mutexattr-getpshared.c b/sysdeps/mach/hurd/htl/pt-mutexattr-getpshared.c
new file mode 100644
index 0000000000..eb162beee8
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutexattr-getpshared.c
@@ -0,0 +1,31 @@
+/* pthread_mutexattr_getpshared. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+pthread_mutexattr_getpshared (const pthread_mutexattr_t *attrp, int *outp)
+{
+ *outp = attrp->__pshared;
+ return 0;
+}
diff --git a/sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c b/sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c
new file mode 100644
index 0000000000..5325e070fe
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c
@@ -0,0 +1,34 @@
+/* pthread_mutexattr_getrobust. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+pthread_mutexattr_getrobust (const pthread_mutexattr_t *attrp, int *outp)
+{
+ *outp = (attrp->__prioceiling & PTHREAD_MUTEX_ROBUST) ?
+ PTHREAD_MUTEX_ROBUST : PTHREAD_MUTEX_STALLED;
+ return 0;
+}
+
+weak_alias (pthread_mutexattr_getrobust, pthread_mutexattr_getrobust_np)
diff --git a/sysdeps/mach/hurd/htl/pt-mutexattr-gettype.c b/sysdeps/mach/hurd/htl/pt-mutexattr-gettype.c
new file mode 100644
index 0000000000..78b7462895
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutexattr-gettype.c
@@ -0,0 +1,31 @@
+/* pthread_mutexattr_gettype. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+pthread_mutexattr_gettype (const pthread_mutexattr_t *attrp, int *outp)
+{
+ *outp = attrp->__mutex_type;
+ return 0;
+}
diff --git a/sysdeps/mach/hurd/htl/pt-mutexattr-init.c b/sysdeps/mach/hurd/htl/pt-mutexattr-init.c
new file mode 100644
index 0000000000..c96afdc26d
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutexattr-init.c
@@ -0,0 +1,39 @@
+/* pthread_mutexattr_init. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+static const pthread_mutexattr_t dfl_attr = {
+ .__prioceiling = 0,
+ .__protocol = PTHREAD_PRIO_NONE,
+ .__pshared = PTHREAD_PROCESS_PRIVATE,
+ .__mutex_type = __PTHREAD_MUTEX_TIMED
+};
+
+int
+__pthread_mutexattr_init (pthread_mutexattr_t *attrp)
+{
+ *attrp = dfl_attr;
+ return 0;
+}
+weak_alias (__pthread_mutexattr_init, pthread_mutexattr_init)
diff --git a/sysdeps/mach/hurd/htl/pt-mutexattr-setprioceiling.c b/sysdeps/mach/hurd/htl/pt-mutexattr-setprioceiling.c
new file mode 100644
index 0000000000..f93cdef38d
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutexattr-setprioceiling.c
@@ -0,0 +1,34 @@
+/* pthread_mutexattr_setprioceiling. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+pthread_mutexattr_setprioceiling (pthread_mutexattr_t *attrp, int cl)
+{
+ (void) attrp;
+ (void) cl;
+ return ENOSYS;
+}
+
+stub_warning (pthread_mutexattr_setprioceiling)
diff --git a/sysdeps/mach/hurd/htl/pt-mutexattr-setprotocol.c b/sysdeps/mach/hurd/htl/pt-mutexattr-setprotocol.c
new file mode 100644
index 0000000000..f971b5bc5f
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutexattr-setprotocol.c
@@ -0,0 +1,33 @@
+/* pthread_mutexattr_setprotocol. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+pthread_mutexattr_setprotocol (pthread_mutexattr_t *attrp, int proto)
+{
+ (void) attrp;
+ return proto == PTHREAD_PRIO_NONE ? 0 :
+ proto != PTHREAD_PRIO_INHERIT &&
+ proto != PTHREAD_PRIO_PROTECT ? EINVAL : ENOTSUP;
+}
diff --git a/sysdeps/mach/hurd/htl/pt-mutexattr-setpshared.c b/sysdeps/mach/hurd/htl/pt-mutexattr-setpshared.c
new file mode 100644
index 0000000000..6bed94fbce
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutexattr-setpshared.c
@@ -0,0 +1,34 @@
+/* pthread_mutexattr_setpshared. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+pthread_mutexattr_setpshared (pthread_mutexattr_t *attrp, int pshared)
+{
+ if (pshared != PTHREAD_PROCESS_PRIVATE && pshared != PTHREAD_PROCESS_SHARED)
+ return EINVAL;
+
+ attrp->__pshared = pshared;
+ return 0;
+}
diff --git a/sysdeps/mach/hurd/htl/pt-mutexattr-setrobust.c b/sysdeps/mach/hurd/htl/pt-mutexattr-setrobust.c
new file mode 100644
index 0000000000..b1baf6cbf8
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutexattr-setrobust.c
@@ -0,0 +1,36 @@
+/* pthread_mutexattr_setrobust. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+pthread_mutexattr_setrobust (pthread_mutexattr_t *attrp, int robust)
+{
+ if (robust != PTHREAD_MUTEX_ROBUST && robust != PTHREAD_MUTEX_STALLED)
+ return EINVAL;
+
+ attrp->__prioceiling |= robust;
+ return 0;
+}
+
+weak_alias (pthread_mutexattr_setrobust, pthread_mutexattr_setrobust_np)
diff --git a/sysdeps/mach/hurd/htl/pt-mutexattr-settype.c b/sysdeps/mach/hurd/htl/pt-mutexattr-settype.c
new file mode 100644
index 0000000000..56b58887c1
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutexattr-settype.c
@@ -0,0 +1,35 @@
+/* pthread_mutexattr_settype. Hurd version.
+ Copyright (C) 2016-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <pt-internal.h>
+#include "pt-mutex.h"
+#include <hurdlock.h>
+
+int
+__pthread_mutexattr_settype (pthread_mutexattr_t *attrp, int type)
+{
+ if (type < 0 || type > __PTHREAD_MUTEX_RECURSIVE)
+ return EINVAL;
+
+ attrp->__mutex_type = type;
+ return 0;
+}
+weak_alias (__pthread_mutexattr_settype, pthread_mutexattr_settype)
diff --git a/sysdeps/mach/hurd/htl/pt-mutexattr.c b/sysdeps/mach/hurd/htl/pt-mutexattr.c
new file mode 100644
index 0000000000..40a8c178f1
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-mutexattr.c
@@ -0,0 +1 @@
+/* empty */
diff --git a/sysdeps/mach/hurd/htl/pt-sigstate-destroy.c b/sysdeps/mach/hurd/htl/pt-sigstate-destroy.c
new file mode 100644
index 0000000000..e7154a371d
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-sigstate-destroy.c
@@ -0,0 +1,26 @@
+/* Destroy the signal state. Hurd on Mach version.
+ Copyright (C) 2002-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+
+#include <pt-internal.h>
+
+void
+__pthread_sigstate_destroy (struct __pthread *thread)
+{
+}
diff --git a/sysdeps/mach/hurd/htl/pt-sigstate-init.c b/sysdeps/mach/hurd/htl/pt-sigstate-init.c
new file mode 100644
index 0000000000..70832f9576
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-sigstate-init.c
@@ -0,0 +1,44 @@
+/* Initialize the signal state. Hurd on Mach version.
+ Copyright (C) 2002-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <pt-internal.h>
+#include <hurd/signal.h>
+
+error_t
+__pthread_sigstate_init (struct __pthread *thread)
+{
+ static int do_init_global;
+
+ /* Mark the thread as a global signal receiver so as to conform with
+ the pthread semantics. However, we must be careful. The first
+ pthread created is the main thread, during libpthread initialization.
+ We must not mark it, otherwise the sigprocmask call in
+ __pthread_create would try to access _hurd_global_sigstate,
+ which is not initialized yet. When glibc runs _hurdsig_init later
+ on, the message thread is created, which must not be marked either. */
+ if (do_init_global)
+ {
+ struct hurd_sigstate *ss = _hurd_thread_sigstate (thread->kernel_thread);
+ (void) ss;
+ }
+ else if (__pthread_num_threads >= 2)
+ do_init_global = 1;
+
+ return 0;
+}
diff --git a/sysdeps/mach/hurd/htl/pt-sigstate.c b/sysdeps/mach/hurd/htl/pt-sigstate.c
new file mode 100644
index 0000000000..f7050ec0df
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-sigstate.c
@@ -0,0 +1,70 @@
+/* Set a thread's signal state. Hurd on Mach version.
+ Copyright (C) 2002-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <assert.h>
+#include <signal.h>
+#include <hurd/signal.h>
+
+#include <pt-internal.h>
+
+error_t
+__pthread_sigstate (struct __pthread *thread, int how,
+ const sigset_t *set, sigset_t *oset, int clear_pending)
+{
+ error_t err = 0;
+ struct hurd_sigstate *ss;
+
+ ss = _hurd_thread_sigstate (thread->kernel_thread);
+ assert (ss);
+
+ __spin_lock (&ss->lock);
+
+ if (oset != NULL)
+ *oset = ss->blocked;
+
+ if (set != NULL)
+ {
+ switch (how)
+ {
+ case SIG_BLOCK:
+ ss->blocked |= *set;
+ break;
+
+ case SIG_SETMASK:
+ ss->blocked = *set;
+ break;
+
+ case SIG_UNBLOCK:
+ ss->blocked &= ~*set;
+ break;
+
+ default:
+ err = EINVAL;
+ break;
+ }
+ ss->blocked &= ~_SIG_CANT_MASK;
+ }
+
+ if (!err && clear_pending)
+ __sigemptyset (&ss->pending);
+
+ __spin_unlock (&ss->lock);
+
+ return err;
+}
diff --git a/sysdeps/mach/hurd/htl/pt-sysdep.c b/sysdeps/mach/hurd/htl/pt-sysdep.c
new file mode 100644
index 0000000000..673f048c37
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-sysdep.c
@@ -0,0 +1,100 @@
+/* System dependent pthreads code. Hurd version.
+ Copyright (C) 2000-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+
+#include <mach.h>
+#include <mach/mig_support.h>
+
+#include <pt-internal.h>
+#include <pthreadP.h>
+
+__thread struct __pthread *___pthread_self;
+
+/* Forward. */
+static void *init_routine (void);
+
+/* OK, the name of this variable isn't really appropriate, but I don't
+ want to change it yet. */
+void *(*_cthread_init_routine) (void) = &init_routine;
+
+/* This function is called from the Hurd-specific startup code. It
+ should return a new stack pointer for the main thread. The caller
+ will switch to this new stack before doing anything serious. */
+static void *
+_init_routine (void *stack)
+{
+ struct __pthread *thread;
+ int err;
+ pthread_attr_t attr, *attrp = 0;
+
+ if (__pthread_threads != NULL)
+ /* Already initialized */
+ return 0;
+
+ /* Initialize the library. */
+ ___pthread_init ();
+
+ if (stack != NULL)
+ {
+ /* We are getting initialized due to dlopening a library using libpthread
+ while the main program was not linked against libpthread. */
+ /* Avoid allocating another stack */
+ attrp = &attr;
+ __pthread_attr_init (attrp);
+ __pthread_attr_setstack (attrp, stack, __vm_page_size);
+ }
+
+ /* Create the pthread structure for the main thread (i.e. us). */
+ err = __pthread_create_internal (&thread, attrp, 0, 0);
+ assert_perror (err);
+
+ /* XXX The caller copies the command line arguments and the environment
+ to the new stack. Pretend it wasn't allocated so that it remains
+ valid if the main thread terminates. */
+ thread->stack = 0;
+
+ ___pthread_self = thread;
+
+ /* Decrease the number of threads, to take into account that the
+ signal thread (which will be created by the glibc startup code
+ when we return from here) shouldn't be seen as a user thread. */
+ __pthread_total--;
+
+ /* Make MiG code thread aware. */
+ __mig_init (thread->stackaddr);
+
+ return thread->mcontext.sp;
+}
+
+static void *
+init_routine (void)
+{
+ return _init_routine (0);
+}
+
+#ifdef SHARED
+__attribute__ ((constructor))
+static void
+dynamic_init_routine (void)
+{
+ _init_routine (__libc_stack_end);
+}
+#endif
diff --git a/sysdeps/mach/hurd/htl/pt-sysdep.h b/sysdeps/mach/hurd/htl/pt-sysdep.h
new file mode 100644
index 0000000000..5b15223da8
--- /dev/null
+++ b/sysdeps/mach/hurd/htl/pt-sysdep.h
@@ -0,0 +1,65 @@
+/* Internal definitions for pthreads library.
+ Copyright (C) 2000-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _PT_SYSDEP_H
+#define _PT_SYSDEP_H 1
+
+#include <mach.h>
+
+/* XXX */
+#define _POSIX_THREAD_THREADS_MAX 64
+
+/* The default stack size. */
+#define PTHREAD_STACK_DEFAULT (8 * 1024 * 1024)
+
+#define PTHREAD_SYSDEP_MEMBERS \
+ thread_t kernel_thread; \
+ mach_msg_header_t wakeupmsg;
+
+extern __thread struct __pthread *___pthread_self;
+#define _pthread_self() \
+ ({ \
+ struct __pthread *thread; \
+ \
+ assert (__pthread_threads); \
+ thread = ___pthread_self; \
+ \
+ assert (thread); \
+ assert (({ mach_port_t ktid = __mach_thread_self (); \
+ int ok = thread->kernel_thread == ktid; \
+ __mach_port_deallocate (__mach_task_self (), ktid);\
+ ok; })); \
+ thread; \
+ })
+
+extern inline void
+__attribute__ ((__always_inline__))
+__pthread_stack_dealloc (void *stackaddr, size_t stacksize)
+{
+ __vm_deallocate (__mach_task_self (), (vm_offset_t) stackaddr, stacksize);
+}
+
+/* Change thread THREAD's program counter to PC if SET_PC is true,
+ its stack pointer to SP if SET_IP is true, and its thread pointer
+ to TP if SET_TP is true. */
+extern int __thread_set_pcsptp (thread_t thread,
+ int set_pc, void *pc,
+ int set_sp, void *sp, int set_tp, void *tp);
+
+
+#endif /* pt-sysdep.h */
diff --git a/sysdeps/mach/hurd/i386/Implies b/sysdeps/mach/hurd/i386/Implies
new file mode 100644
index 0000000000..eedc9eada9
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/Implies
@@ -0,0 +1,2 @@
+mach/hurd/x86
+mach/hurd/i386/htl
diff --git a/sysdeps/mach/hurd/i386/Makefile b/sysdeps/mach/hurd/i386/Makefile
index 9e1a978b6f..1a53065ae7 100644
--- a/sysdeps/mach/hurd/i386/Makefile
+++ b/sysdeps/mach/hurd/i386/Makefile
@@ -11,3 +11,99 @@ ifeq ($(subdir),stdlib)
gen-as-const-headers += ucontext_i.sym
sysdep_routines += makecontext-helper
endif
+
+ifeq ($(subdir),csu)
+ifeq (yes,$(build-shared))
+sysdep_routines += divdi3
+shared-only-routines += divdi3
+CPPFLAGS-divdi3.c = -Din_divdi3_c
+endif
+endif
+
+ifeq ($(subdir),conform)
+# For bugs 23081, 23082, 23083, 23084, 23085, 23086.
+conformtest-xfail-conds += i386-gnu
+
+# For bug 23088
+test-xfail-POSIX/fcntl.h/conform = yes
+test-xfail-POSIX/signal.h/conform = yes
+test-xfail-POSIX/semaphore.h/conform = yes
+test-xfail-POSIX/regex.h/conform = yes
+test-xfail-POSIX/aio.h/conform = yes
+test-xfail-POSIX/mqueue.h/conform = yes
+test-xfail-POSIX/sys/types.h/conform = yes
+test-xfail-UNIX98/fcntl.h/conform = yes
+test-xfail-UNIX98/netdb.h/conform = yes
+test-xfail-UNIX98/signal.h/conform = yes
+test-xfail-UNIX98/semaphore.h/conform = yes
+test-xfail-UNIX98/regex.h/conform = yes
+test-xfail-UNIX98/aio.h/conform = yes
+test-xfail-UNIX98/ftw.h/conform = yes
+test-xfail-UNIX98/mqueue.h/conform = yes
+test-xfail-UNIX98/netinet/in.h/conform = yes
+test-xfail-UNIX98/sys/wait.h/conform = yes
+test-xfail-UNIX98/sys/sem.h/conform = yes
+test-xfail-UNIX98/sys/uio.h/conform = yes
+test-xfail-UNIX98/sys/socket.h/conform = yes
+test-xfail-UNIX98/sys/types.h/conform = yes
+test-xfail-UNIX98/stdlib.h/conform = yes
+test-xfail-UNIX98/arpa/inet.h/conform = yes
+test-xfail-POSIX2008/fcntl.h/conform = yes
+test-xfail-POSIX2008/netdb.h/conform = yes
+test-xfail-POSIX2008/signal.h/conform = yes
+test-xfail-POSIX2008/semaphore.h/conform = yes
+test-xfail-POSIX2008/regex.h/conform = yes
+test-xfail-POSIX2008/aio.h/conform = yes
+test-xfail-POSIX2008/mqueue.h/conform = yes
+test-xfail-POSIX2008/netinet/in.h/conform = yes
+test-xfail-POSIX2008/sys/wait.h/conform = yes
+test-xfail-POSIX2008/sys/socket.h/conform = yes
+test-xfail-POSIX2008/sys/types.h/conform = yes
+test-xfail-POSIX2008/arpa/inet.h/conform = yes
+test-xfail-XOPEN2K/fcntl.h/conform = yes
+test-xfail-XOPEN2K/netdb.h/conform = yes
+test-xfail-XOPEN2K/signal.h/conform = yes
+test-xfail-XOPEN2K/semaphore.h/conform = yes
+test-xfail-XOPEN2K/regex.h/conform = yes
+test-xfail-XOPEN2K/aio.h/conform = yes
+test-xfail-XOPEN2K/ftw.h/conform = yes
+test-xfail-XOPEN2K/mqueue.h/conform = yes
+test-xfail-XOPEN2K/netinet/in.h/conform = yes
+test-xfail-XOPEN2K/sys/wait.h/conform = yes
+test-xfail-XOPEN2K/sys/sem.h/conform = yes
+test-xfail-XOPEN2K/sys/uio.h/conform = yes
+test-xfail-XOPEN2K/sys/socket.h/conform = yes
+test-xfail-XOPEN2K/sys/types.h/conform = yes
+test-xfail-XOPEN2K/stdlib.h/conform = yes
+test-xfail-XOPEN2K/arpa/inet.h/conform = yes
+test-xfail-XOPEN2K8/fcntl.h/conform = yes
+test-xfail-XOPEN2K8/netdb.h/conform = yes
+test-xfail-XOPEN2K8/signal.h/conform = yes
+test-xfail-XOPEN2K8/semaphore.h/conform = yes
+test-xfail-XOPEN2K8/regex.h/conform = yes
+test-xfail-XOPEN2K8/aio.h/conform = yes
+test-xfail-XOPEN2K8/ftw.h/conform = yes
+test-xfail-XOPEN2K8/mqueue.h/conform = yes
+test-xfail-XOPEN2K8/netinet/in.h/conform = yes
+test-xfail-XOPEN2K8/sys/wait.h/conform = yes
+test-xfail-XOPEN2K8/sys/sem.h/conform = yes
+test-xfail-XOPEN2K8/sys/uio.h/conform = yes
+test-xfail-XOPEN2K8/sys/socket.h/conform = yes
+test-xfail-XOPEN2K8/sys/types.h/conform = yes
+test-xfail-XOPEN2K8/stdlib.h/conform = yes
+test-xfail-XOPEN2K8/arpa/inet.h/conform = yes
+endif
+
+# For bug 23286
+ifeq ($(subdir),hurd)
+test-xfail-check-abi-libhurduser = yes
+endif
+ifeq ($(subdir),mach)
+test-xfail-check-abi-libmachuser = yes
+endif
+
+ifeq ($(subdir),elf)
+# We do use nested functions involving creation of trampolines, notably for
+# callbacks whose parameters don't permit to get the context parameters.
+check-execstack-xfail += ld.so libc.so libpthread.so
+endif
diff --git a/sysdeps/mach/hurd/i386/____longjmp_chk.S b/sysdeps/mach/hurd/i386/____longjmp_chk.S
index 4ddf6cd82e..7c3a73adba 100644
--- a/sysdeps/mach/hurd/i386/____longjmp_chk.S
+++ b/sysdeps/mach/hurd/i386/____longjmp_chk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2018 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
@@ -36,9 +36,11 @@ longjmp_msg:
cfi_register(%ebx,%ecx); \
LOAD_PIC_REG (bx); \
leal longjmp_msg@GOTOFF(%ebx), %eax; \
+ movl %eax, (%esp); \
call HIDDEN_JUMPTARGET(__fortify_fail)
#else
# define CALL_FAIL movl $longjmp_msg, %eax; \
+ movl %eax, (%esp); \
call HIDDEN_JUMPTARGET(__fortify_fail)
#endif
@@ -66,7 +68,7 @@ ENTRY (____longjmp_chk)
/* TODO: need locking? */
/* struct hurd_sigstate * _hurd_self_sigstate (void) */
- call _hurd_self_sigstate
+ call HIDDEN_JUMPTARGET(_hurd_self_sigstate)
/* TODO: %eax and %eax->sigaltstack are always valid? */
testl $SS_ONSTACK, (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)(%eax)
diff --git a/sysdeps/mach/hurd/i386/bits/sigcontext.h b/sysdeps/mach/hurd/i386/bits/sigcontext.h
index 6d15b039ef..f493bc9750 100644
--- a/sysdeps/mach/hurd/i386/bits/sigcontext.h
+++ b/sysdeps/mach/hurd/i386/bits/sigcontext.h
@@ -1,5 +1,5 @@
/* Machine-dependent signal context structure for GNU Hurd. i386 version.
- Copyright (C) 1991-2016 Free Software Foundation, Inc.
+ Copyright (C) 1991-2018 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
@@ -16,15 +16,17 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifndef _BITS_SIGCONTEXT_H
+#define _BITS_SIGCONTEXT_H 1
+
#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
#endif
-#ifndef sc_pc
-
/* Signal handlers are actually called:
void handler (int sig, int code, struct sigcontext *scp); */
+#include <bits/types/__sigset_t.h>
#include <mach/machine/fp_reg.h>
/* State of this thread when the signal was taken. */
@@ -116,4 +118,4 @@ struct sigcontext
#define DBG_SINGLE_TRAP 0x1 /* single step */
#define DBG_BRKPNT_FAULT 0x2 /* breakpoint instruction */
-#endif /* sc_pc */
+#endif /* bits/sigcontext.h */
diff --git a/sysdeps/mach/hurd/i386/c++-types.data b/sysdeps/mach/hurd/i386/c++-types.data
new file mode 100644
index 0000000000..4cde3ca667
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/c++-types.data
@@ -0,0 +1,67 @@
+blkcnt64_t:x
+blkcnt_t:l
+blksize_t:l
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:j
+fd_mask:l
+fsblkcnt64_t:y
+fsblkcnt_t:m
+fsfilcnt64_t:y
+fsfilcnt_t:m
+fsid_t:y
+gid_t:j
+id_t:j
+ino64_t:y
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:x
+int8_t:a
+intptr_t:i
+key_t:i
+loff_t:x
+mode_t:j
+nlink_t:j
+off64_t:x
+off_t:l
+pid_t:i
+pthread_attr_t:14__pthread_attr
+pthread_barrier_t:17__pthread_barrier
+pthread_barrierattr_t:21__pthread_barrierattr
+pthread_cond_t:14__pthread_cond
+pthread_condattr_t:18__pthread_condattr
+pthread_key_t:i
+pthread_mutex_t:15__pthread_mutex
+pthread_mutexattr_t:19__pthread_mutexattr
+pthread_once_t:14__pthread_once
+pthread_rwlock_t:16__pthread_rwlock
+pthread_rwlockattr_t:20__pthread_rwlockattr
+pthread_spinlock_t:i
+pthread_t:i
+quad_t:x
+register_t:i
+rlim64_t:y
+rlim_t:m
+sigset_t:m
+size_t:j
+socklen_t:j
+ssize_t:i
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:y
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:y
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/sysdeps/mach/hurd/i386/exc2signal.c b/sysdeps/mach/hurd/i386/exc2signal.c
index bf0ca2e367..57bc05df99 100644
--- a/sysdeps/mach/hurd/i386/exc2signal.c
+++ b/sysdeps/mach/hurd/i386/exc2signal.c
@@ -1,5 +1,5 @@
/* Translate Mach exception codes into signal numbers. i386 version.
- Copyright (C) 1991-2016 Free Software Foundation, Inc.
+ Copyright (C) 1991-2018 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
@@ -163,3 +163,4 @@ _hurd_exception2signal (struct hurd_signal_detail *detail, int *signo)
break;
}
}
+libc_hidden_def (_hurd_exception2signal)
diff --git a/sysdeps/mach/hurd/i386/htl/Implies b/sysdeps/mach/hurd/i386/htl/Implies
new file mode 100644
index 0000000000..7a0f99d772
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/htl/Implies
@@ -0,0 +1,2 @@
+mach/hurd/htl
+i386/htl
diff --git a/sysdeps/mach/hurd/i386/htl/pt-machdep.c b/sysdeps/mach/hurd/i386/htl/pt-machdep.c
new file mode 100644
index 0000000000..2e35a095ab
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/htl/pt-machdep.c
@@ -0,0 +1,82 @@
+/* Machine dependent pthreads code. Hurd/i386 version.
+ Copyright (C) 2000-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+
+#include <mach.h>
+#include <mach/i386/thread_status.h>
+#include <mach/i386/mach_i386.h>
+#include <mach/mig_errors.h>
+#include <mach/thread_status.h>
+
+#define HURD_TLS_DESC_DECL(desc, tcb) \
+ struct descriptor desc = \
+ { /* low word: */ \
+ 0xffff /* limit 0..15 */ \
+ | (((unsigned int) (tcb)) << 16) /* base 0..15 */ \
+ , /* high word: */ \
+ ((((unsigned int) (tcb)) >> 16) & 0xff) /* base 16..23 */ \
+ | ((0x12 | 0x60 | 0x80) << 8) /* access = ACC_DATA_W|ACC_PL_U|ACC_P */ \
+ | (0xf << 16) /* limit 16..19 */ \
+ | ((4 | 8) << 20) /* granularity = SZ_32|SZ_G */ \
+ | (((unsigned int) (tcb)) & 0xff000000) /* base 24..31 */ \
+ }
+
+int
+__thread_set_pcsptp (thread_t thread,
+ int set_ip, void *ip,
+ int set_sp, void *sp,
+ int set_tp, void *tp)
+{
+ error_t err;
+ struct i386_thread_state state;
+ mach_msg_type_number_t state_count;
+
+ state_count = i386_THREAD_STATE_COUNT;
+
+ err = __thread_get_state (thread, i386_REGS_SEGS_STATE,
+ (thread_state_t) &state, &state_count);
+ if (err)
+ return err;
+
+ if (set_sp)
+ state.uesp = (unsigned int) sp;
+ if (set_ip)
+ state.eip = (unsigned int) ip;
+ if (set_tp)
+ {
+ HURD_TLS_DESC_DECL (desc, tp);
+ int sel;
+
+ asm ("mov %%gs, %w0": "=q" (sel):"0" (0));
+ if (__builtin_expect (sel, 0x48) & 4) /* LDT selector */
+ err = __i386_set_ldt (thread, sel, &desc, 1);
+ else
+ err = __i386_set_gdt (thread, &sel, desc);
+ if (err)
+ return err;
+ state.gs = sel;
+ }
+
+ err = __thread_set_state (thread, i386_REGS_SEGS_STATE,
+ (thread_state_t) &state, i386_THREAD_STATE_COUNT);
+ if (err)
+ return err;
+
+ return 0;
+}
diff --git a/sysdeps/mach/hurd/i386/htl/pt-setup.c b/sysdeps/mach/hurd/i386/htl/pt-setup.c
new file mode 100644
index 0000000000..e10d38a842
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/htl/pt-setup.c
@@ -0,0 +1,110 @@
+/* Setup thread stack. Hurd/i386 version.
+ Copyright (C) 2000-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <stdint.h>
+#include <assert.h>
+#include <mach.h>
+
+#include <pt-internal.h>
+
+/* The stack layout used on the i386 is:
+
+ -----------------
+ | ARG |
+ -----------------
+ | START_ROUTINE |
+ -----------------
+ | 0 |
+ -----------------
+ */
+
+/* Set up the stack for THREAD, such that it appears as if
+ START_ROUTINE and ARG were passed to the new thread's entry-point.
+ Return the stack pointer for the new thread. */
+static void *
+stack_setup (struct __pthread *thread,
+ void *(*start_routine) (void *), void *arg)
+{
+ error_t err;
+ uintptr_t *bottom, *top;
+
+ /* Calculate the top of the new stack. */
+ bottom = thread->stackaddr;
+ top = (uintptr_t *) ((uintptr_t) bottom + thread->stacksize
+ + ((thread->guardsize + __vm_page_size - 1)
+ / __vm_page_size) * __vm_page_size);
+
+ if (start_routine != NULL)
+ {
+ /* And then the call frame. */
+ top -= 3;
+ top = (uintptr_t *) ((uintptr_t) top & ~0xf);
+ top[2] = (uintptr_t) arg; /* Argument to START_ROUTINE. */
+ top[1] = (uintptr_t) start_routine;
+ top[0] = (uintptr_t) thread;
+ *--top = 0; /* Fake return address. */
+ }
+
+ if (thread->guardsize)
+ {
+ err = __vm_protect (__mach_task_self (), (vm_address_t) bottom,
+ thread->guardsize, 0, 0);
+ assert_perror (err);
+ }
+
+ return top;
+}
+
+int
+__pthread_setup (struct __pthread *thread,
+ void (*entry_point) (struct __pthread *, void *(*)(void *),
+ void *), void *(*start_routine) (void *),
+ void *arg)
+{
+ tcbhead_t *tcb;
+ error_t err;
+ mach_port_t ktid;
+
+ thread->mcontext.pc = entry_point;
+ thread->mcontext.sp = stack_setup (thread, start_routine, arg);
+
+ ktid = __mach_thread_self ();
+ if (thread->kernel_thread == ktid)
+ /* Fix up the TCB for the main thread. The C library has already
+ installed a TCB, which we want to keep using. This TCB must not
+ be freed so don't register it in the thread structure. On the
+ other hand, it's not yet possible to reliably release a TCB.
+ Leave the unused one registered so that it doesn't leak. The
+ only thing left to do is to correctly set the `self' member in
+ the already existing TCB. */
+ tcb = THREAD_SELF;
+ else
+ {
+ err = __thread_set_pcsptp (thread->kernel_thread,
+ 1, thread->mcontext.pc,
+ 1, thread->mcontext.sp,
+ 1, thread->tcb);
+ assert_perror (err);
+ tcb = thread->tcb;
+ }
+ __mach_port_deallocate (__mach_task_self (), ktid);
+
+ tcb->self = thread->kernel_thread;
+
+ return 0;
+}
diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c
index 5252f7f214..f8ad2ceb8e 100644
--- a/sysdeps/mach/hurd/i386/init-first.c
+++ b/sysdeps/mach/hurd/i386/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. For i386/Hurd.
- Copyright (C) 1995-2016 Free Software Foundation, Inc.
+ Copyright (C) 1995-2018 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
@@ -33,12 +33,8 @@
extern void __mach_init (void);
extern void __init_misc (int, char **, char **);
-#ifdef USE_NONOPTION_FLAGS
-extern void __getopt_clean_environment (char **);
-#endif
extern void __libc_global_ctors (void);
-unsigned int __hurd_threadvar_max;
unsigned long int __hurd_threadvar_stack_offset;
unsigned long int __hurd_threadvar_stack_mask;
@@ -88,11 +84,6 @@ posixland_init (int argc, char **argv, char **envp)
#endif
__init_misc (argc, argv, envp);
-#ifdef USE_NONOPTION_FLAGS
- /* This is a hack to make the special getopt in GNU libc working. */
- __getopt_clean_environment (envp);
-#endif
-
/* Initialize ctype data. */
__ctype_init ();
@@ -113,10 +104,12 @@ init1 (int argc, char *arg0, ...)
++envp;
d = (void *) ++envp;
- /* If we are the bootstrap task started by the kernel,
- then after the environment pointers there is no Hurd
- data block; the argument strings start there. */
+ /* Initialize libpthread if linked in. */
+ if (__pthread_initialize_minimal != NULL)
+ __pthread_initialize_minimal ();
+
if ((void *) d == argv[0])
+ /* No Hurd data block to process. */
return;
#ifndef SHARED
@@ -171,21 +164,21 @@ init (int *data)
/* If we are the bootstrap task started by the kernel,
then after the environment pointers there is no Hurd
data block; the argument strings start there. */
- if ((void *) d == argv[0])
+ if ((void *) d == argv[0] || d->phdr == 0)
{
/* With a new enough linker (binutils-2.23 or better),
- the magic __ehdr_start symbol will be available and
- __libc_start_main will have done this that way already. */
+ the magic __ehdr_start symbol will be available and
+ __libc_start_main will have done this that way already. */
if (_dl_phdr == NULL)
{
- /* We may need to see our own phdrs, e.g. for TLS setup.
- Try the usual kludge to find the headers without help from
- the exec server. */
- extern const void __executable_start;
- const ElfW(Ehdr) *const ehdr = &__executable_start;
- _dl_phdr = (const void *) ehdr + ehdr->e_phoff;
- _dl_phnum = ehdr->e_phnum;
- assert (ehdr->e_phentsize == sizeof (ElfW(Phdr)));
+ /* We may need to see our own phdrs, e.g. for TLS setup.
+ Try the usual kludge to find the headers without help from
+ the exec server. */
+ extern const void __executable_start;
+ const ElfW(Ehdr) *const ehdr = &__executable_start;
+ _dl_phdr = (const void *) ehdr + ehdr->e_phoff;
+ _dl_phnum = ehdr->e_phnum;
+ assert (ehdr->e_phentsize == sizeof (ElfW(Phdr)));
}
}
else
@@ -195,13 +188,10 @@ init (int *data)
assert (d->phdrsz % sizeof (ElfW(Phdr)) == 0);
}
- /* We need to setup TLS before starting the signal thread. */
- extern void __pthread_initialize_minimal (void);
- if (__pthread_initialize_minimal != NULL)
- __pthread_initialize_minimal ();
+ /* We need to setup TLS before initializing libpthread. */
+ __libc_setup_tls ();
#endif
-
/* After possibly switching stacks, call `init1' (above) with the user
code as the return address, and the argument data immediately above
that on the stack. */
diff --git a/sysdeps/mach/hurd/i386/intr-msg.h b/sysdeps/mach/hurd/i386/intr-msg.h
index d60cb197d6..64f05f8c4e 100644
--- a/sysdeps/mach/hurd/i386/intr-msg.h
+++ b/sysdeps/mach/hurd/i386/intr-msg.h
@@ -1,5 +1,5 @@
/* Machine-dependent details of interruptible RPC messaging. i386 version.
- Copyright (C) 1995-2016 Free Software Foundation, Inc.
+ Copyright (C) 1995-2018 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
diff --git a/sysdeps/mach/hurd/i386/ioperm.c b/sysdeps/mach/hurd/i386/ioperm.c
index d89a6bf79d..6f22a88490 100644
--- a/sysdeps/mach/hurd/i386/ioperm.c
+++ b/sysdeps/mach/hurd/i386/ioperm.c
@@ -1,5 +1,5 @@
/* Access to hardware i/o ports. Hurd/x86 version.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 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
diff --git a/sysdeps/mach/hurd/i386/jmp_buf-macros.h b/sysdeps/mach/hurd/i386/jmp_buf-macros.h
new file mode 100644
index 0000000000..834f5fb243
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 32
+#define SIGJMP_BUF_SIZE 32
+#define JMP_BUF_ALIGN 4
+#define SIGJMP_BUF_ALIGN 4
+#define MASK_WAS_SAVED_OFFSET 24
+#define SAVED_MASK_OFFSET 28
diff --git a/sysdeps/mach/hurd/i386/ld.abilist b/sysdeps/mach/hurd/i386/ld.abilist
new file mode 100644
index 0000000000..c76b913486
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/ld.abilist
@@ -0,0 +1,25 @@
+GLIBC_2.2.6 __close F
+GLIBC_2.2.6 __errno_location F
+GLIBC_2.2.6 __fxstat64 F
+GLIBC_2.2.6 __getpid F
+GLIBC_2.2.6 __libc_stack_end D 0x4
+GLIBC_2.2.6 __mmap F
+GLIBC_2.2.6 __open F
+GLIBC_2.2.6 __open64 F
+GLIBC_2.2.6 __read F
+GLIBC_2.2.6 __sbrk F
+GLIBC_2.2.6 __strtoul_internal F
+GLIBC_2.2.6 __write F
+GLIBC_2.2.6 __writev F
+GLIBC_2.2.6 __xstat64 F
+GLIBC_2.2.6 _dl_mcount F
+GLIBC_2.2.6 _hurd_intr_rpc_mach_msg F
+GLIBC_2.2.6 _r_debug D 0x14
+GLIBC_2.2.6 abort F
+GLIBC_2.2.6 calloc F
+GLIBC_2.2.6 free F
+GLIBC_2.2.6 malloc F
+GLIBC_2.2.6 realloc F
+GLIBC_2.3 ___tls_get_addr F
+GLIBC_2.3 __tls_get_addr F
+GLIBC_2.4 __stack_chk_guard D 0x4
diff --git a/sysdeps/mach/hurd/i386/libBrokenLocale.abilist b/sysdeps/mach/hurd/i386/libBrokenLocale.abilist
new file mode 100644
index 0000000000..a0f854c7f8
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/libBrokenLocale.abilist
@@ -0,0 +1 @@
+GLIBC_2.2.6 __ctype_get_mb_cur_max F
diff --git a/sysdeps/mach/hurd/i386/libanl.abilist b/sysdeps/mach/hurd/i386/libanl.abilist
new file mode 100644
index 0000000000..123013b2ce
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/libanl.abilist
@@ -0,0 +1,4 @@
+GLIBC_2.2.6 gai_cancel F
+GLIBC_2.2.6 gai_error F
+GLIBC_2.2.6 gai_suspend F
+GLIBC_2.2.6 getaddrinfo_a F
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
new file mode 100644
index 0000000000..e3fc05137b
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -0,0 +1,2306 @@
+GLIBC_2.10 __cxa_at_quick_exit F
+GLIBC_2.10 __posix_getopt F
+GLIBC_2.10 accept4 F
+GLIBC_2.10 endsgent F
+GLIBC_2.10 fgetsgent F
+GLIBC_2.10 fgetsgent_r F
+GLIBC_2.10 getsgent F
+GLIBC_2.10 getsgent_r F
+GLIBC_2.10 getsgnam F
+GLIBC_2.10 getsgnam_r F
+GLIBC_2.10 malloc_info F
+GLIBC_2.10 preadv F
+GLIBC_2.10 preadv64 F
+GLIBC_2.10 psiginfo F
+GLIBC_2.10 putsgent F
+GLIBC_2.10 pwritev F
+GLIBC_2.10 pwritev64 F
+GLIBC_2.10 quick_exit F
+GLIBC_2.10 register_printf_modifier F
+GLIBC_2.10 register_printf_specifier F
+GLIBC_2.10 register_printf_type F
+GLIBC_2.10 setsgent F
+GLIBC_2.10 sgetsgent F
+GLIBC_2.10 sgetsgent_r F
+GLIBC_2.11 __longjmp_chk F
+GLIBC_2.11 execvpe F
+GLIBC_2.11 mkostemps F
+GLIBC_2.11 mkostemps64 F
+GLIBC_2.11 mkstemps F
+GLIBC_2.11 mkstemps64 F
+GLIBC_2.13 __fentry__ F
+GLIBC_2.14 syncfs F
+GLIBC_2.15 __fdelt_chk F
+GLIBC_2.15 __fdelt_warn F
+GLIBC_2.15 posix_spawn F
+GLIBC_2.15 posix_spawnp F
+GLIBC_2.15 scandirat F
+GLIBC_2.15 scandirat64 F
+GLIBC_2.16 __getauxval F
+GLIBC_2.16 __poll_chk F
+GLIBC_2.16 __ppoll_chk F
+GLIBC_2.16 aligned_alloc F
+GLIBC_2.16 c16rtomb F
+GLIBC_2.16 c32rtomb F
+GLIBC_2.16 getauxval F
+GLIBC_2.16 mbrtoc16 F
+GLIBC_2.16 mbrtoc32 F
+GLIBC_2.16 timespec_get F
+GLIBC_2.17 clock_getcpuclockid F
+GLIBC_2.17 clock_getres F
+GLIBC_2.17 clock_gettime F
+GLIBC_2.17 clock_nanosleep F
+GLIBC_2.17 clock_settime F
+GLIBC_2.17 recvmmsg F
+GLIBC_2.17 secure_getenv F
+GLIBC_2.17 sendmmsg F
+GLIBC_2.18 __cxa_thread_atexit_impl F
+GLIBC_2.2.6 _Exit F
+GLIBC_2.2.6 _IO_2_1_stderr_ D 0x98
+GLIBC_2.2.6 _IO_2_1_stdin_ D 0x98
+GLIBC_2.2.6 _IO_2_1_stdout_ D 0x98
+GLIBC_2.2.6 _IO_adjust_column F
+GLIBC_2.2.6 _IO_adjust_wcolumn F
+GLIBC_2.2.6 _IO_default_doallocate F
+GLIBC_2.2.6 _IO_default_finish F
+GLIBC_2.2.6 _IO_default_pbackfail F
+GLIBC_2.2.6 _IO_default_uflow F
+GLIBC_2.2.6 _IO_default_xsgetn F
+GLIBC_2.2.6 _IO_default_xsputn F
+GLIBC_2.2.6 _IO_do_write F
+GLIBC_2.2.6 _IO_doallocbuf F
+GLIBC_2.2.6 _IO_fclose F
+GLIBC_2.2.6 _IO_fdopen F
+GLIBC_2.2.6 _IO_feof F
+GLIBC_2.2.6 _IO_ferror F
+GLIBC_2.2.6 _IO_fflush F
+GLIBC_2.2.6 _IO_fgetpos F
+GLIBC_2.2.6 _IO_fgetpos64 F
+GLIBC_2.2.6 _IO_fgets F
+GLIBC_2.2.6 _IO_file_attach F
+GLIBC_2.2.6 _IO_file_close F
+GLIBC_2.2.6 _IO_file_close_it F
+GLIBC_2.2.6 _IO_file_doallocate F
+GLIBC_2.2.6 _IO_file_finish F
+GLIBC_2.2.6 _IO_file_fopen F
+GLIBC_2.2.6 _IO_file_init F
+GLIBC_2.2.6 _IO_file_jumps D 0x54
+GLIBC_2.2.6 _IO_file_open F
+GLIBC_2.2.6 _IO_file_overflow F
+GLIBC_2.2.6 _IO_file_read F
+GLIBC_2.2.6 _IO_file_seek F
+GLIBC_2.2.6 _IO_file_seekoff F
+GLIBC_2.2.6 _IO_file_setbuf F
+GLIBC_2.2.6 _IO_file_stat F
+GLIBC_2.2.6 _IO_file_sync F
+GLIBC_2.2.6 _IO_file_underflow F
+GLIBC_2.2.6 _IO_file_write F
+GLIBC_2.2.6 _IO_file_xsputn F
+GLIBC_2.2.6 _IO_flockfile F
+GLIBC_2.2.6 _IO_flush_all F
+GLIBC_2.2.6 _IO_flush_all_linebuffered F
+GLIBC_2.2.6 _IO_fopen F
+GLIBC_2.2.6 _IO_fprintf F
+GLIBC_2.2.6 _IO_fputs F
+GLIBC_2.2.6 _IO_fread F
+GLIBC_2.2.6 _IO_free_backup_area F
+GLIBC_2.2.6 _IO_free_wbackup_area F
+GLIBC_2.2.6 _IO_fsetpos F
+GLIBC_2.2.6 _IO_fsetpos64 F
+GLIBC_2.2.6 _IO_ftell F
+GLIBC_2.2.6 _IO_ftrylockfile F
+GLIBC_2.2.6 _IO_funlockfile F
+GLIBC_2.2.6 _IO_fwrite F
+GLIBC_2.2.6 _IO_getc F
+GLIBC_2.2.6 _IO_getline F
+GLIBC_2.2.6 _IO_getline_info F
+GLIBC_2.2.6 _IO_gets F
+GLIBC_2.2.6 _IO_init F
+GLIBC_2.2.6 _IO_init_marker F
+GLIBC_2.2.6 _IO_init_wmarker F
+GLIBC_2.2.6 _IO_iter_begin F
+GLIBC_2.2.6 _IO_iter_end F
+GLIBC_2.2.6 _IO_iter_file F
+GLIBC_2.2.6 _IO_iter_next F
+GLIBC_2.2.6 _IO_least_wmarker F
+GLIBC_2.2.6 _IO_link_in F
+GLIBC_2.2.6 _IO_list_all D 0x4
+GLIBC_2.2.6 _IO_list_lock F
+GLIBC_2.2.6 _IO_list_resetlock F
+GLIBC_2.2.6 _IO_list_unlock F
+GLIBC_2.2.6 _IO_marker_delta F
+GLIBC_2.2.6 _IO_marker_difference F
+GLIBC_2.2.6 _IO_padn F
+GLIBC_2.2.6 _IO_peekc_locked F
+GLIBC_2.2.6 _IO_popen F
+GLIBC_2.2.6 _IO_printf F
+GLIBC_2.2.6 _IO_proc_close F
+GLIBC_2.2.6 _IO_proc_open F
+GLIBC_2.2.6 _IO_putc F
+GLIBC_2.2.6 _IO_puts F
+GLIBC_2.2.6 _IO_remove_marker F
+GLIBC_2.2.6 _IO_seekmark F
+GLIBC_2.2.6 _IO_seekoff F
+GLIBC_2.2.6 _IO_seekpos F
+GLIBC_2.2.6 _IO_seekwmark F
+GLIBC_2.2.6 _IO_setb F
+GLIBC_2.2.6 _IO_setbuffer F
+GLIBC_2.2.6 _IO_setvbuf F
+GLIBC_2.2.6 _IO_sgetn F
+GLIBC_2.2.6 _IO_sprintf F
+GLIBC_2.2.6 _IO_sputbackc F
+GLIBC_2.2.6 _IO_sputbackwc F
+GLIBC_2.2.6 _IO_sscanf F
+GLIBC_2.2.6 _IO_str_init_readonly F
+GLIBC_2.2.6 _IO_str_init_static F
+GLIBC_2.2.6 _IO_str_overflow F
+GLIBC_2.2.6 _IO_str_pbackfail F
+GLIBC_2.2.6 _IO_str_seekoff F
+GLIBC_2.2.6 _IO_str_underflow F
+GLIBC_2.2.6 _IO_sungetc F
+GLIBC_2.2.6 _IO_sungetwc F
+GLIBC_2.2.6 _IO_switch_to_get_mode F
+GLIBC_2.2.6 _IO_switch_to_main_wget_area F
+GLIBC_2.2.6 _IO_switch_to_wbackup_area F
+GLIBC_2.2.6 _IO_switch_to_wget_mode F
+GLIBC_2.2.6 _IO_un_link F
+GLIBC_2.2.6 _IO_ungetc F
+GLIBC_2.2.6 _IO_unsave_markers F
+GLIBC_2.2.6 _IO_unsave_wmarkers F
+GLIBC_2.2.6 _IO_vfprintf F
+GLIBC_2.2.6 _IO_vfscanf F
+GLIBC_2.2.6 _IO_vsprintf F
+GLIBC_2.2.6 _IO_wdefault_doallocate F
+GLIBC_2.2.6 _IO_wdefault_finish F
+GLIBC_2.2.6 _IO_wdefault_pbackfail F
+GLIBC_2.2.6 _IO_wdefault_uflow F
+GLIBC_2.2.6 _IO_wdefault_xsgetn F
+GLIBC_2.2.6 _IO_wdefault_xsputn F
+GLIBC_2.2.6 _IO_wdo_write F
+GLIBC_2.2.6 _IO_wdoallocbuf F
+GLIBC_2.2.6 _IO_wfile_jumps D 0x54
+GLIBC_2.2.6 _IO_wfile_overflow F
+GLIBC_2.2.6 _IO_wfile_seekoff F
+GLIBC_2.2.6 _IO_wfile_sync F
+GLIBC_2.2.6 _IO_wfile_underflow F
+GLIBC_2.2.6 _IO_wfile_xsputn F
+GLIBC_2.2.6 _IO_wmarker_delta F
+GLIBC_2.2.6 _IO_wsetb F
+GLIBC_2.2.6 _S_catch_exception_raise F
+GLIBC_2.2.6 _S_msg_add_auth F
+GLIBC_2.2.6 _S_msg_del_auth F
+GLIBC_2.2.6 _S_msg_describe_ports F
+GLIBC_2.2.6 _S_msg_get_dtable F
+GLIBC_2.2.6 _S_msg_get_env_variable F
+GLIBC_2.2.6 _S_msg_get_environment F
+GLIBC_2.2.6 _S_msg_get_fd F
+GLIBC_2.2.6 _S_msg_get_init_int F
+GLIBC_2.2.6 _S_msg_get_init_ints F
+GLIBC_2.2.6 _S_msg_get_init_port F
+GLIBC_2.2.6 _S_msg_get_init_ports F
+GLIBC_2.2.6 _S_msg_proc_newids F
+GLIBC_2.2.6 _S_msg_report_wait F
+GLIBC_2.2.6 _S_msg_set_dtable F
+GLIBC_2.2.6 _S_msg_set_env_variable F
+GLIBC_2.2.6 _S_msg_set_environment F
+GLIBC_2.2.6 _S_msg_set_fd F
+GLIBC_2.2.6 _S_msg_set_init_int F
+GLIBC_2.2.6 _S_msg_set_init_ints F
+GLIBC_2.2.6 _S_msg_set_init_port F
+GLIBC_2.2.6 _S_msg_set_init_ports F
+GLIBC_2.2.6 _S_msg_sig_post F
+GLIBC_2.2.6 _S_msg_sig_post_untraced F
+GLIBC_2.2.6 ___brk_addr D 0x4
+GLIBC_2.2.6 __after_morecore_hook D 0x4
+GLIBC_2.2.6 __argz_count F
+GLIBC_2.2.6 __argz_next F
+GLIBC_2.2.6 __argz_stringify F
+GLIBC_2.2.6 __asprintf F
+GLIBC_2.2.6 __assert F
+GLIBC_2.2.6 __assert_fail F
+GLIBC_2.2.6 __assert_perror_fail F
+GLIBC_2.2.6 __backtrace F
+GLIBC_2.2.6 __backtrace_symbols F
+GLIBC_2.2.6 __backtrace_symbols_fd F
+GLIBC_2.2.6 __bsd_getpgrp F
+GLIBC_2.2.6 __bzero F
+GLIBC_2.2.6 __check_rhosts_file D 0x4
+GLIBC_2.2.6 __close F
+GLIBC_2.2.6 __cmsg_nxthdr F
+GLIBC_2.2.6 __connect F
+GLIBC_2.2.6 __ctype32_b D 0x4
+GLIBC_2.2.6 __ctype32_tolower D 0x4
+GLIBC_2.2.6 __ctype32_toupper D 0x4
+GLIBC_2.2.6 __ctype_b D 0x4
+GLIBC_2.2.6 __ctype_get_mb_cur_max F
+GLIBC_2.2.6 __ctype_tolower D 0x4
+GLIBC_2.2.6 __ctype_toupper D 0x4
+GLIBC_2.2.6 __cxa_atexit F
+GLIBC_2.2.6 __cxa_finalize F
+GLIBC_2.2.6 __cyg_profile_func_enter F
+GLIBC_2.2.6 __cyg_profile_func_exit F
+GLIBC_2.2.6 __daylight D 0x4
+GLIBC_2.2.6 __dcgettext F
+GLIBC_2.2.6 __default_morecore F
+GLIBC_2.2.6 __dgettext F
+GLIBC_2.2.6 __divdi3 F
+GLIBC_2.2.6 __dup2 F
+GLIBC_2.2.6 __duplocale F
+GLIBC_2.2.6 __environ D 0x4
+GLIBC_2.2.6 __errno_location F
+GLIBC_2.2.6 __fbufsize F
+GLIBC_2.2.6 __fcntl F
+GLIBC_2.2.6 __ffs F
+GLIBC_2.2.6 __finite F
+GLIBC_2.2.6 __finitef F
+GLIBC_2.2.6 __finitel F
+GLIBC_2.2.6 __flbf F
+GLIBC_2.2.6 __fork F
+GLIBC_2.2.6 __fpending F
+GLIBC_2.2.6 __fpu_control D 0x2
+GLIBC_2.2.6 __fpurge F
+GLIBC_2.2.6 __freadable F
+GLIBC_2.2.6 __freading F
+GLIBC_2.2.6 __free_hook D 0x4
+GLIBC_2.2.6 __freelocale F
+GLIBC_2.2.6 __fsetlocking F
+GLIBC_2.2.6 __fwritable F
+GLIBC_2.2.6 __fwriting F
+GLIBC_2.2.6 __fxstat F
+GLIBC_2.2.6 __fxstat64 F
+GLIBC_2.2.6 __getdelim F
+GLIBC_2.2.6 __getpagesize F
+GLIBC_2.2.6 __getpgid F
+GLIBC_2.2.6 __getpid F
+GLIBC_2.2.6 __gettimeofday F
+GLIBC_2.2.6 __gmtime_r F
+GLIBC_2.2.6 __h_errno_location F
+GLIBC_2.2.6 __hurd_fail F
+GLIBC_2.2.6 __hurd_threadvar_stack_mask D 0x4
+GLIBC_2.2.6 __hurd_threadvar_stack_offset D 0x4
+GLIBC_2.2.6 __isalnum_l F
+GLIBC_2.2.6 __isalpha_l F
+GLIBC_2.2.6 __isascii_l F
+GLIBC_2.2.6 __isblank_l F
+GLIBC_2.2.6 __iscntrl_l F
+GLIBC_2.2.6 __isdigit_l F
+GLIBC_2.2.6 __isgraph_l F
+GLIBC_2.2.6 __isinf F
+GLIBC_2.2.6 __isinff F
+GLIBC_2.2.6 __isinfl F
+GLIBC_2.2.6 __islower_l F
+GLIBC_2.2.6 __isnan F
+GLIBC_2.2.6 __isnanf F
+GLIBC_2.2.6 __isnanl F
+GLIBC_2.2.6 __isprint_l F
+GLIBC_2.2.6 __ispunct_l F
+GLIBC_2.2.6 __isspace_l F
+GLIBC_2.2.6 __isupper_l F
+GLIBC_2.2.6 __iswalnum_l F
+GLIBC_2.2.6 __iswalpha_l F
+GLIBC_2.2.6 __iswblank_l F
+GLIBC_2.2.6 __iswcntrl_l F
+GLIBC_2.2.6 __iswctype F
+GLIBC_2.2.6 __iswctype_l F
+GLIBC_2.2.6 __iswdigit_l F
+GLIBC_2.2.6 __iswgraph_l F
+GLIBC_2.2.6 __iswlower_l F
+GLIBC_2.2.6 __iswprint_l F
+GLIBC_2.2.6 __iswpunct_l F
+GLIBC_2.2.6 __iswspace_l F
+GLIBC_2.2.6 __iswupper_l F
+GLIBC_2.2.6 __iswxdigit_l F
+GLIBC_2.2.6 __isxdigit_l F
+GLIBC_2.2.6 __ivaliduser F
+GLIBC_2.2.6 __key_decryptsession_pk_LOCAL D 0x4
+GLIBC_2.2.6 __key_encryptsession_pk_LOCAL D 0x4
+GLIBC_2.2.6 __key_gendes_LOCAL D 0x4
+GLIBC_2.2.6 __libc_allocate_rtsig F
+GLIBC_2.2.6 __libc_calloc F
+GLIBC_2.2.6 __libc_current_sigrtmax F
+GLIBC_2.2.6 __libc_current_sigrtmin F
+GLIBC_2.2.6 __libc_free F
+GLIBC_2.2.6 __libc_freeres F
+GLIBC_2.2.6 __libc_init_first F
+GLIBC_2.2.6 __libc_mallinfo F
+GLIBC_2.2.6 __libc_malloc F
+GLIBC_2.2.6 __libc_mallopt F
+GLIBC_2.2.6 __libc_memalign F
+GLIBC_2.2.6 __libc_pvalloc F
+GLIBC_2.2.6 __libc_realloc F
+GLIBC_2.2.6 __libc_start_main F
+GLIBC_2.2.6 __libc_valloc F
+GLIBC_2.2.6 __lseek F
+GLIBC_2.2.6 __lxstat F
+GLIBC_2.2.6 __lxstat64 F
+GLIBC_2.2.6 __mach_msg F
+GLIBC_2.2.6 __mach_msg_destroy F
+GLIBC_2.2.6 __mach_port_allocate F
+GLIBC_2.2.6 __mach_port_deallocate F
+GLIBC_2.2.6 __mach_port_insert_right F
+GLIBC_2.2.6 __mach_reply_port F
+GLIBC_2.2.6 __mach_task_self_ D 0x4
+GLIBC_2.2.6 __mach_thread_self F
+GLIBC_2.2.6 __malloc_hook D 0x4
+GLIBC_2.2.6 __malloc_initialize_hook D 0x4
+GLIBC_2.2.6 __mbrlen F
+GLIBC_2.2.6 __mbrtowc F
+GLIBC_2.2.6 __memalign_hook D 0x4
+GLIBC_2.2.6 __memcpy_by2 F
+GLIBC_2.2.6 __memcpy_by4 F
+GLIBC_2.2.6 __memcpy_c F
+GLIBC_2.2.6 __memcpy_g F
+GLIBC_2.2.6 __mempcpy F
+GLIBC_2.2.6 __mempcpy_by2 F
+GLIBC_2.2.6 __mempcpy_by4 F
+GLIBC_2.2.6 __mempcpy_byn F
+GLIBC_2.2.6 __mempcpy_small F
+GLIBC_2.2.6 __memset_cc F
+GLIBC_2.2.6 __memset_ccn_by2 F
+GLIBC_2.2.6 __memset_ccn_by4 F
+GLIBC_2.2.6 __memset_cg F
+GLIBC_2.2.6 __memset_gcn_by2 F
+GLIBC_2.2.6 __memset_gcn_by4 F
+GLIBC_2.2.6 __memset_gg F
+GLIBC_2.2.6 __mig_allocate F
+GLIBC_2.2.6 __mig_dealloc_reply_port F
+GLIBC_2.2.6 __mig_deallocate F
+GLIBC_2.2.6 __mig_get_reply_port F
+GLIBC_2.2.6 __mig_init F
+GLIBC_2.2.6 __mig_put_reply_port F
+GLIBC_2.2.6 __mig_strncpy F
+GLIBC_2.2.6 __mmap F
+GLIBC_2.2.6 __moddi3 F
+GLIBC_2.2.6 __monstartup F
+GLIBC_2.2.6 __morecore D 0x4
+GLIBC_2.2.6 __nanosleep F
+GLIBC_2.2.6 __newlocale F
+GLIBC_2.2.6 __nl_langinfo_l F
+GLIBC_2.2.6 __nss_configure_lookup F
+GLIBC_2.2.6 __nss_database_lookup F
+GLIBC_2.2.6 __nss_group_lookup F
+GLIBC_2.2.6 __nss_hostname_digits_dots F
+GLIBC_2.2.6 __nss_hosts_lookup F
+GLIBC_2.2.6 __nss_next F
+GLIBC_2.2.6 __nss_passwd_lookup F
+GLIBC_2.2.6 __open F
+GLIBC_2.2.6 __open64 F
+GLIBC_2.2.6 __overflow F
+GLIBC_2.2.6 __pipe F
+GLIBC_2.2.6 __poll F
+GLIBC_2.2.6 __pread64 F
+GLIBC_2.2.6 __printf_fp F
+GLIBC_2.2.6 __profile_frequency F
+GLIBC_2.2.6 __progname D 0x4
+GLIBC_2.2.6 __progname_full D 0x4
+GLIBC_2.2.6 __pwrite64 F
+GLIBC_2.2.6 __rawmemchr F
+GLIBC_2.2.6 __rcmd_errstr D 0x4
+GLIBC_2.2.6 __read F
+GLIBC_2.2.6 __realloc_hook D 0x4
+GLIBC_2.2.6 __res_init F
+GLIBC_2.2.6 __res_nclose F
+GLIBC_2.2.6 __res_ninit F
+GLIBC_2.2.6 __res_randomid F
+GLIBC_2.2.6 __res_state F
+GLIBC_2.2.6 __rpc_thread_createerr F
+GLIBC_2.2.6 __rpc_thread_svc_fdset F
+GLIBC_2.2.6 __rpc_thread_svc_max_pollfd F
+GLIBC_2.2.6 __rpc_thread_svc_pollfd F
+GLIBC_2.2.6 __sbrk F
+GLIBC_2.2.6 __sched_get_priority_max F
+GLIBC_2.2.6 __sched_get_priority_min F
+GLIBC_2.2.6 __sched_getparam F
+GLIBC_2.2.6 __sched_getscheduler F
+GLIBC_2.2.6 __sched_setscheduler F
+GLIBC_2.2.6 __sched_yield F
+GLIBC_2.2.6 __secure_getenv F
+GLIBC_2.2.6 __select F
+GLIBC_2.2.6 __send F
+GLIBC_2.2.6 __setpgid F
+GLIBC_2.2.6 __sigaction F
+GLIBC_2.2.6 __sigaddset F
+GLIBC_2.2.6 __sigdelset F
+GLIBC_2.2.6 __sigismember F
+GLIBC_2.2.6 __signbit F
+GLIBC_2.2.6 __signbitf F
+GLIBC_2.2.6 __signbitl F
+GLIBC_2.2.6 __sigpause F
+GLIBC_2.2.6 __sigsetjmp F
+GLIBC_2.2.6 __sigsuspend F
+GLIBC_2.2.6 __stpcpy F
+GLIBC_2.2.6 __stpcpy_g F
+GLIBC_2.2.6 __stpcpy_small F
+GLIBC_2.2.6 __stpncpy F
+GLIBC_2.2.6 __strcasecmp F
+GLIBC_2.2.6 __strcasecmp_l F
+GLIBC_2.2.6 __strcasestr F
+GLIBC_2.2.6 __strcat_c F
+GLIBC_2.2.6 __strcat_g F
+GLIBC_2.2.6 __strchr_c F
+GLIBC_2.2.6 __strchr_g F
+GLIBC_2.2.6 __strchrnul_c F
+GLIBC_2.2.6 __strchrnul_g F
+GLIBC_2.2.6 __strcmp_gg F
+GLIBC_2.2.6 __strcoll_l F
+GLIBC_2.2.6 __strcpy_g F
+GLIBC_2.2.6 __strcpy_small F
+GLIBC_2.2.6 __strcspn_c1 F
+GLIBC_2.2.6 __strcspn_c2 F
+GLIBC_2.2.6 __strcspn_c3 F
+GLIBC_2.2.6 __strcspn_cg F
+GLIBC_2.2.6 __strcspn_g F
+GLIBC_2.2.6 __strdup F
+GLIBC_2.2.6 __strerror_r F
+GLIBC_2.2.6 __strfmon_l F
+GLIBC_2.2.6 __strlen_g F
+GLIBC_2.2.6 __strncasecmp_l F
+GLIBC_2.2.6 __strncat_g F
+GLIBC_2.2.6 __strncmp_g F
+GLIBC_2.2.6 __strncpy_by2 F
+GLIBC_2.2.6 __strncpy_by4 F
+GLIBC_2.2.6 __strncpy_byn F
+GLIBC_2.2.6 __strncpy_gg F
+GLIBC_2.2.6 __strndup F
+GLIBC_2.2.6 __strpbrk_c2 F
+GLIBC_2.2.6 __strpbrk_c3 F
+GLIBC_2.2.6 __strpbrk_cg F
+GLIBC_2.2.6 __strpbrk_g F
+GLIBC_2.2.6 __strrchr_c F
+GLIBC_2.2.6 __strrchr_g F
+GLIBC_2.2.6 __strsep_1c F
+GLIBC_2.2.6 __strsep_2c F
+GLIBC_2.2.6 __strsep_3c F
+GLIBC_2.2.6 __strsep_g F
+GLIBC_2.2.6 __strspn_c1 F
+GLIBC_2.2.6 __strspn_c2 F
+GLIBC_2.2.6 __strspn_c3 F
+GLIBC_2.2.6 __strspn_cg F
+GLIBC_2.2.6 __strspn_g F
+GLIBC_2.2.6 __strstr_cg F
+GLIBC_2.2.6 __strstr_g F
+GLIBC_2.2.6 __strtod_internal F
+GLIBC_2.2.6 __strtod_l F
+GLIBC_2.2.6 __strtof_internal F
+GLIBC_2.2.6 __strtof_l F
+GLIBC_2.2.6 __strtok_r F
+GLIBC_2.2.6 __strtok_r_1c F
+GLIBC_2.2.6 __strtol_internal F
+GLIBC_2.2.6 __strtol_l F
+GLIBC_2.2.6 __strtold_internal F
+GLIBC_2.2.6 __strtold_l F
+GLIBC_2.2.6 __strtoll_internal F
+GLIBC_2.2.6 __strtoll_l F
+GLIBC_2.2.6 __strtoul_internal F
+GLIBC_2.2.6 __strtoul_l F
+GLIBC_2.2.6 __strtoull_internal F
+GLIBC_2.2.6 __strtoull_l F
+GLIBC_2.2.6 __strverscmp F
+GLIBC_2.2.6 __strxfrm_l F
+GLIBC_2.2.6 __sysconf F
+GLIBC_2.2.6 __sysv_signal F
+GLIBC_2.2.6 __timezone D 0x4
+GLIBC_2.2.6 __toascii_l F
+GLIBC_2.2.6 __tolower_l F
+GLIBC_2.2.6 __toupper_l F
+GLIBC_2.2.6 __towctrans F
+GLIBC_2.2.6 __towctrans_l F
+GLIBC_2.2.6 __towlower_l F
+GLIBC_2.2.6 __towupper_l F
+GLIBC_2.2.6 __tzname D 0x8
+GLIBC_2.2.6 __udivdi3 F
+GLIBC_2.2.6 __uflow F
+GLIBC_2.2.6 __umoddi3 F
+GLIBC_2.2.6 __underflow F
+GLIBC_2.2.6 __vfork F
+GLIBC_2.2.6 __vfscanf F
+GLIBC_2.2.6 __vm_allocate F
+GLIBC_2.2.6 __vm_deallocate F
+GLIBC_2.2.6 __vm_page_size D 0x4
+GLIBC_2.2.6 __vsnprintf F
+GLIBC_2.2.6 __vsscanf F
+GLIBC_2.2.6 __wait F
+GLIBC_2.2.6 __waitpid F
+GLIBC_2.2.6 __wcscasecmp_l F
+GLIBC_2.2.6 __wcscoll_l F
+GLIBC_2.2.6 __wcsncasecmp_l F
+GLIBC_2.2.6 __wcstod_internal F
+GLIBC_2.2.6 __wcstod_l F
+GLIBC_2.2.6 __wcstof_internal F
+GLIBC_2.2.6 __wcstof_l F
+GLIBC_2.2.6 __wcstol_internal F
+GLIBC_2.2.6 __wcstol_l F
+GLIBC_2.2.6 __wcstold_internal F
+GLIBC_2.2.6 __wcstold_l F
+GLIBC_2.2.6 __wcstoll_internal F
+GLIBC_2.2.6 __wcstoll_l F
+GLIBC_2.2.6 __wcstoul_internal F
+GLIBC_2.2.6 __wcstoul_l F
+GLIBC_2.2.6 __wcstoull_internal F
+GLIBC_2.2.6 __wcstoull_l F
+GLIBC_2.2.6 __wcsxfrm_l F
+GLIBC_2.2.6 __wctrans_l F
+GLIBC_2.2.6 __wctype_l F
+GLIBC_2.2.6 __woverflow F
+GLIBC_2.2.6 __write F
+GLIBC_2.2.6 __writev F
+GLIBC_2.2.6 __wuflow F
+GLIBC_2.2.6 __wunderflow F
+GLIBC_2.2.6 __xmknod F
+GLIBC_2.2.6 __xpg_basename F
+GLIBC_2.2.6 __xpg_sigpause F
+GLIBC_2.2.6 __xstat F
+GLIBC_2.2.6 __xstat64 F
+GLIBC_2.2.6 _authenticate F
+GLIBC_2.2.6 _dl_mcount_wrapper F
+GLIBC_2.2.6 _dl_mcount_wrapper_check F
+GLIBC_2.2.6 _end GLIBC_2.2.6 g ? D .bss 00000000
+GLIBC_2.2.6 _environ D 0x4
+GLIBC_2.2.6 _exit F
+GLIBC_2.2.6 _flushlbf F
+GLIBC_2.2.6 _hurd_canonicalize_directory_name_internal F
+GLIBC_2.2.6 _hurd_critical_section_lock F
+GLIBC_2.2.6 _hurd_critical_section_unlock F
+GLIBC_2.2.6 _hurd_device_master D 0x4
+GLIBC_2.2.6 _hurd_dtable D 0x4
+GLIBC_2.2.6 _hurd_dtable_lock D 0x18
+GLIBC_2.2.6 _hurd_dtablesize D 0x4
+GLIBC_2.2.6 _hurd_exception2signal F
+GLIBC_2.2.6 _hurd_exec F
+GLIBC_2.2.6 _hurd_fd_get F
+GLIBC_2.2.6 _hurd_host_priv D 0x4
+GLIBC_2.2.6 _hurd_init F
+GLIBC_2.2.6 _hurd_intern_fd F
+GLIBC_2.2.6 _hurd_intr_rpc_mach_msg F
+GLIBC_2.2.6 _hurd_msgport D 0x4
+GLIBC_2.2.6 _hurd_port_cleanup F
+GLIBC_2.2.6 _hurd_port_free F
+GLIBC_2.2.6 _hurd_port_get F
+GLIBC_2.2.6 _hurd_port_init F
+GLIBC_2.2.6 _hurd_port_locked_get F
+GLIBC_2.2.6 _hurd_port_set F
+GLIBC_2.2.6 _hurd_ports D 0x4
+GLIBC_2.2.6 _hurd_ports_use F
+GLIBC_2.2.6 _hurd_proc_init F
+GLIBC_2.2.6 _hurd_raise_signal F
+GLIBC_2.2.6 _hurd_self_sigstate F
+GLIBC_2.2.6 _hurd_thread_sigstate F
+GLIBC_2.2.6 _hurdsig_fault_catch_exception_raise F
+GLIBC_2.2.6 _hurdsig_fault_env D 0x20
+GLIBC_2.2.6 _hurdsig_fault_preemptor D 0x18
+GLIBC_2.2.6 _hurdsig_interrupt_timeout D 0x4
+GLIBC_2.2.6 _libc_intl_domainname D 0x5
+GLIBC_2.2.6 _longjmp F
+GLIBC_2.2.6 _mcleanup F
+GLIBC_2.2.6 _mcount F
+GLIBC_2.2.6 _nl_default_dirname D 0xe
+GLIBC_2.2.6 _nl_domain_bindings D 0x4
+GLIBC_2.2.6 _nl_msg_cat_cntr D 0x4
+GLIBC_2.2.6 _null_auth D 0xc
+GLIBC_2.2.6 _obstack D 0x4
+GLIBC_2.2.6 _obstack_allocated_p F
+GLIBC_2.2.6 _obstack_begin F
+GLIBC_2.2.6 _obstack_begin_1 F
+GLIBC_2.2.6 _obstack_free F
+GLIBC_2.2.6 _obstack_memory_used F
+GLIBC_2.2.6 _obstack_newchunk F
+GLIBC_2.2.6 _res D 0x200
+GLIBC_2.2.6 _res_hconf D 0x30
+GLIBC_2.2.6 _rpc_dtablesize F
+GLIBC_2.2.6 _seterr_reply F
+GLIBC_2.2.6 _setjmp F
+GLIBC_2.2.6 _sys_siglist D 0x84
+GLIBC_2.2.6 _tolower F
+GLIBC_2.2.6 _toupper F
+GLIBC_2.2.6 a64l F
+GLIBC_2.2.6 abort F
+GLIBC_2.2.6 abs F
+GLIBC_2.2.6 accept F
+GLIBC_2.2.6 access F
+GLIBC_2.2.6 acct F
+GLIBC_2.2.6 addmntent F
+GLIBC_2.2.6 addseverity F
+GLIBC_2.2.6 adjtime F
+GLIBC_2.2.6 advance F
+GLIBC_2.2.6 alarm F
+GLIBC_2.2.6 alphasort F
+GLIBC_2.2.6 alphasort64 F
+GLIBC_2.2.6 argp_err_exit_status D 0x4
+GLIBC_2.2.6 argp_error F
+GLIBC_2.2.6 argp_failure F
+GLIBC_2.2.6 argp_help F
+GLIBC_2.2.6 argp_parse F
+GLIBC_2.2.6 argp_program_bug_address D 0x4
+GLIBC_2.2.6 argp_program_version D 0x4
+GLIBC_2.2.6 argp_program_version_hook D 0x4
+GLIBC_2.2.6 argp_state_help F
+GLIBC_2.2.6 argp_usage F
+GLIBC_2.2.6 argz_add F
+GLIBC_2.2.6 argz_add_sep F
+GLIBC_2.2.6 argz_append F
+GLIBC_2.2.6 argz_count F
+GLIBC_2.2.6 argz_create F
+GLIBC_2.2.6 argz_create_sep F
+GLIBC_2.2.6 argz_delete F
+GLIBC_2.2.6 argz_extract F
+GLIBC_2.2.6 argz_insert F
+GLIBC_2.2.6 argz_next F
+GLIBC_2.2.6 argz_replace F
+GLIBC_2.2.6 argz_stringify F
+GLIBC_2.2.6 asctime F
+GLIBC_2.2.6 asctime_r F
+GLIBC_2.2.6 asprintf F
+GLIBC_2.2.6 atof F
+GLIBC_2.2.6 atoi F
+GLIBC_2.2.6 atol F
+GLIBC_2.2.6 atoll F
+GLIBC_2.2.6 authdes_create F
+GLIBC_2.2.6 authdes_getucred F
+GLIBC_2.2.6 authdes_pk_create F
+GLIBC_2.2.6 authnone_create F
+GLIBC_2.2.6 authunix_create F
+GLIBC_2.2.6 authunix_create_default F
+GLIBC_2.2.6 backtrace F
+GLIBC_2.2.6 backtrace_symbols F
+GLIBC_2.2.6 backtrace_symbols_fd F
+GLIBC_2.2.6 basename F
+GLIBC_2.2.6 bcmp F
+GLIBC_2.2.6 bcopy F
+GLIBC_2.2.6 bind F
+GLIBC_2.2.6 bind_textdomain_codeset F
+GLIBC_2.2.6 bindresvport F
+GLIBC_2.2.6 bindtextdomain F
+GLIBC_2.2.6 brk F
+GLIBC_2.2.6 bsd_signal F
+GLIBC_2.2.6 bsearch F
+GLIBC_2.2.6 btowc F
+GLIBC_2.2.6 bzero F
+GLIBC_2.2.6 calloc F
+GLIBC_2.2.6 callrpc F
+GLIBC_2.2.6 canonicalize_file_name F
+GLIBC_2.2.6 catclose F
+GLIBC_2.2.6 catgets F
+GLIBC_2.2.6 catopen F
+GLIBC_2.2.6 cbc_crypt F
+GLIBC_2.2.6 cfgetispeed F
+GLIBC_2.2.6 cfgetospeed F
+GLIBC_2.2.6 cfmakeraw F
+GLIBC_2.2.6 cfree F
+GLIBC_2.2.6 cfsetispeed F
+GLIBC_2.2.6 cfsetospeed F
+GLIBC_2.2.6 cfsetspeed F
+GLIBC_2.2.6 chdir F
+GLIBC_2.2.6 chflags F
+GLIBC_2.2.6 chmod F
+GLIBC_2.2.6 chown F
+GLIBC_2.2.6 chroot F
+GLIBC_2.2.6 clearenv F
+GLIBC_2.2.6 clearerr F
+GLIBC_2.2.6 clearerr_unlocked F
+GLIBC_2.2.6 clnt_broadcast F
+GLIBC_2.2.6 clnt_create F
+GLIBC_2.2.6 clnt_pcreateerror F
+GLIBC_2.2.6 clnt_perrno F
+GLIBC_2.2.6 clnt_perror F
+GLIBC_2.2.6 clnt_spcreateerror F
+GLIBC_2.2.6 clnt_sperrno F
+GLIBC_2.2.6 clnt_sperror F
+GLIBC_2.2.6 clntraw_create F
+GLIBC_2.2.6 clnttcp_create F
+GLIBC_2.2.6 clntudp_bufcreate F
+GLIBC_2.2.6 clntudp_create F
+GLIBC_2.2.6 clntunix_create F
+GLIBC_2.2.6 clock F
+GLIBC_2.2.6 close F
+GLIBC_2.2.6 closedir F
+GLIBC_2.2.6 closelog F
+GLIBC_2.2.6 confstr F
+GLIBC_2.2.6 connect F
+GLIBC_2.2.6 copysign F
+GLIBC_2.2.6 copysignf F
+GLIBC_2.2.6 copysignl F
+GLIBC_2.2.6 creat F
+GLIBC_2.2.6 creat64 F
+GLIBC_2.2.6 ctermid F
+GLIBC_2.2.6 ctime F
+GLIBC_2.2.6 ctime_r F
+GLIBC_2.2.6 cuserid F
+GLIBC_2.2.6 daemon F
+GLIBC_2.2.6 daylight D 0x4
+GLIBC_2.2.6 dcgettext F
+GLIBC_2.2.6 dcngettext F
+GLIBC_2.2.6 des_setparity F
+GLIBC_2.2.6 dgettext F
+GLIBC_2.2.6 difftime F
+GLIBC_2.2.6 directory_name_split F
+GLIBC_2.2.6 dirfd F
+GLIBC_2.2.6 dirname F
+GLIBC_2.2.6 div F
+GLIBC_2.2.6 dl_iterate_phdr F
+GLIBC_2.2.6 dngettext F
+GLIBC_2.2.6 dprintf F
+GLIBC_2.2.6 drand48 F
+GLIBC_2.2.6 drand48_r F
+GLIBC_2.2.6 dup F
+GLIBC_2.2.6 dup2 F
+GLIBC_2.2.6 dysize F
+GLIBC_2.2.6 ecb_crypt F
+GLIBC_2.2.6 ecvt F
+GLIBC_2.2.6 ecvt_r F
+GLIBC_2.2.6 endaliasent F
+GLIBC_2.2.6 endfsent F
+GLIBC_2.2.6 endgrent F
+GLIBC_2.2.6 endhostent F
+GLIBC_2.2.6 endmntent F
+GLIBC_2.2.6 endnetent F
+GLIBC_2.2.6 endnetgrent F
+GLIBC_2.2.6 endprotoent F
+GLIBC_2.2.6 endpwent F
+GLIBC_2.2.6 endrpcent F
+GLIBC_2.2.6 endservent F
+GLIBC_2.2.6 endspent F
+GLIBC_2.2.6 endttyent F
+GLIBC_2.2.6 endusershell F
+GLIBC_2.2.6 endutent F
+GLIBC_2.2.6 endutxent F
+GLIBC_2.2.6 environ D 0x4
+GLIBC_2.2.6 envz_add F
+GLIBC_2.2.6 envz_entry F
+GLIBC_2.2.6 envz_get F
+GLIBC_2.2.6 envz_merge F
+GLIBC_2.2.6 envz_remove F
+GLIBC_2.2.6 envz_strip F
+GLIBC_2.2.6 erand48 F
+GLIBC_2.2.6 erand48_r F
+GLIBC_2.2.6 err F
+GLIBC_2.2.6 error F
+GLIBC_2.2.6 error_at_line F
+GLIBC_2.2.6 error_message_count D 0x4
+GLIBC_2.2.6 error_one_per_line D 0x4
+GLIBC_2.2.6 error_print_progname D 0x4
+GLIBC_2.2.6 errx F
+GLIBC_2.2.6 ether_aton F
+GLIBC_2.2.6 ether_aton_r F
+GLIBC_2.2.6 ether_hostton F
+GLIBC_2.2.6 ether_line F
+GLIBC_2.2.6 ether_ntoa F
+GLIBC_2.2.6 ether_ntoa_r F
+GLIBC_2.2.6 ether_ntohost F
+GLIBC_2.2.6 euidaccess F
+GLIBC_2.2.6 evc_wait F
+GLIBC_2.2.6 execl F
+GLIBC_2.2.6 execle F
+GLIBC_2.2.6 execlp F
+GLIBC_2.2.6 execv F
+GLIBC_2.2.6 execve F
+GLIBC_2.2.6 execvp F
+GLIBC_2.2.6 exit F
+GLIBC_2.2.6 fattach F
+GLIBC_2.2.6 fchdir F
+GLIBC_2.2.6 fchflags F
+GLIBC_2.2.6 fchmod F
+GLIBC_2.2.6 fchown F
+GLIBC_2.2.6 fclose F
+GLIBC_2.2.6 fcloseall F
+GLIBC_2.2.6 fcntl F
+GLIBC_2.2.6 fcvt F
+GLIBC_2.2.6 fcvt_r F
+GLIBC_2.2.6 fdatasync F
+GLIBC_2.2.6 fdetach F
+GLIBC_2.2.6 fdopen F
+GLIBC_2.2.6 feof F
+GLIBC_2.2.6 feof_unlocked F
+GLIBC_2.2.6 ferror F
+GLIBC_2.2.6 ferror_unlocked F
+GLIBC_2.2.6 fexecve F
+GLIBC_2.2.6 fflush F
+GLIBC_2.2.6 fflush_unlocked F
+GLIBC_2.2.6 ffs F
+GLIBC_2.2.6 ffsl F
+GLIBC_2.2.6 ffsll F
+GLIBC_2.2.6 fgetc F
+GLIBC_2.2.6 fgetc_unlocked F
+GLIBC_2.2.6 fgetgrent F
+GLIBC_2.2.6 fgetgrent_r F
+GLIBC_2.2.6 fgetpos F
+GLIBC_2.2.6 fgetpos64 F
+GLIBC_2.2.6 fgetpwent F
+GLIBC_2.2.6 fgetpwent_r F
+GLIBC_2.2.6 fgets F
+GLIBC_2.2.6 fgets_unlocked F
+GLIBC_2.2.6 fgetspent F
+GLIBC_2.2.6 fgetspent_r F
+GLIBC_2.2.6 fgetwc F
+GLIBC_2.2.6 fgetwc_unlocked F
+GLIBC_2.2.6 fgetws F
+GLIBC_2.2.6 fgetws_unlocked F
+GLIBC_2.2.6 file_name_lookup F
+GLIBC_2.2.6 file_name_lookup_under F
+GLIBC_2.2.6 file_name_path_lookup F
+GLIBC_2.2.6 file_name_split F
+GLIBC_2.2.6 fileno F
+GLIBC_2.2.6 fileno_unlocked F
+GLIBC_2.2.6 finite F
+GLIBC_2.2.6 finitef F
+GLIBC_2.2.6 finitel F
+GLIBC_2.2.6 flock F
+GLIBC_2.2.6 flockfile F
+GLIBC_2.2.6 fmemopen F
+GLIBC_2.2.6 fmtmsg F
+GLIBC_2.2.6 fnmatch F
+GLIBC_2.2.6 fopen F
+GLIBC_2.2.6 fopen64 F
+GLIBC_2.2.6 fopencookie F
+GLIBC_2.2.6 fopenport F
+GLIBC_2.2.6 fork F
+GLIBC_2.2.6 fpathconf F
+GLIBC_2.2.6 fprintf F
+GLIBC_2.2.6 fputc F
+GLIBC_2.2.6 fputc_unlocked F
+GLIBC_2.2.6 fputs F
+GLIBC_2.2.6 fputs_unlocked F
+GLIBC_2.2.6 fputwc F
+GLIBC_2.2.6 fputwc_unlocked F
+GLIBC_2.2.6 fputws F
+GLIBC_2.2.6 fputws_unlocked F
+GLIBC_2.2.6 fread F
+GLIBC_2.2.6 fread_unlocked F
+GLIBC_2.2.6 free F
+GLIBC_2.2.6 freeaddrinfo F
+GLIBC_2.2.6 freopen F
+GLIBC_2.2.6 freopen64 F
+GLIBC_2.2.6 frexp F
+GLIBC_2.2.6 frexpf F
+GLIBC_2.2.6 frexpl F
+GLIBC_2.2.6 fscanf F
+GLIBC_2.2.6 fseek F
+GLIBC_2.2.6 fseeko F
+GLIBC_2.2.6 fseeko64 F
+GLIBC_2.2.6 fsetpos F
+GLIBC_2.2.6 fsetpos64 F
+GLIBC_2.2.6 fstatfs F
+GLIBC_2.2.6 fstatfs64 F
+GLIBC_2.2.6 fstatvfs F
+GLIBC_2.2.6 fstatvfs64 F
+GLIBC_2.2.6 fsync F
+GLIBC_2.2.6 ftell F
+GLIBC_2.2.6 ftello F
+GLIBC_2.2.6 ftello64 F
+GLIBC_2.2.6 ftime F
+GLIBC_2.2.6 ftok F
+GLIBC_2.2.6 ftruncate F
+GLIBC_2.2.6 ftruncate64 F
+GLIBC_2.2.6 ftrylockfile F
+GLIBC_2.2.6 fts_children F
+GLIBC_2.2.6 fts_close F
+GLIBC_2.2.6 fts_open F
+GLIBC_2.2.6 fts_read F
+GLIBC_2.2.6 fts_set F
+GLIBC_2.2.6 ftw F
+GLIBC_2.2.6 ftw64 F
+GLIBC_2.2.6 funlockfile F
+GLIBC_2.2.6 fwide F
+GLIBC_2.2.6 fwprintf F
+GLIBC_2.2.6 fwrite F
+GLIBC_2.2.6 fwrite_unlocked F
+GLIBC_2.2.6 fwscanf F
+GLIBC_2.2.6 gai_strerror F
+GLIBC_2.2.6 gcvt F
+GLIBC_2.2.6 get_avphys_pages F
+GLIBC_2.2.6 get_current_dir_name F
+GLIBC_2.2.6 get_myaddress F
+GLIBC_2.2.6 get_nprocs F
+GLIBC_2.2.6 get_nprocs_conf F
+GLIBC_2.2.6 get_phys_pages F
+GLIBC_2.2.6 get_privileged_ports F
+GLIBC_2.2.6 getaddrinfo F
+GLIBC_2.2.6 getaliasbyname F
+GLIBC_2.2.6 getaliasbyname_r F
+GLIBC_2.2.6 getaliasent F
+GLIBC_2.2.6 getaliasent_r F
+GLIBC_2.2.6 getauth F
+GLIBC_2.2.6 getc F
+GLIBC_2.2.6 getc_unlocked F
+GLIBC_2.2.6 getchar F
+GLIBC_2.2.6 getchar_unlocked F
+GLIBC_2.2.6 getcontext F
+GLIBC_2.2.6 getcrdir F
+GLIBC_2.2.6 getcttyid F
+GLIBC_2.2.6 getcwd F
+GLIBC_2.2.6 getcwdir F
+GLIBC_2.2.6 getdate F
+GLIBC_2.2.6 getdate_err D 0x4
+GLIBC_2.2.6 getdate_r F
+GLIBC_2.2.6 getdelim F
+GLIBC_2.2.6 getdirentries F
+GLIBC_2.2.6 getdirentries64 F
+GLIBC_2.2.6 getdomainname F
+GLIBC_2.2.6 getdport F
+GLIBC_2.2.6 getdtablesize F
+GLIBC_2.2.6 getegid F
+GLIBC_2.2.6 getenv F
+GLIBC_2.2.6 geteuid F
+GLIBC_2.2.6 geteuids F
+GLIBC_2.2.6 getfsent F
+GLIBC_2.2.6 getfsfile F
+GLIBC_2.2.6 getfsspec F
+GLIBC_2.2.6 getgid F
+GLIBC_2.2.6 getgrent F
+GLIBC_2.2.6 getgrent_r F
+GLIBC_2.2.6 getgrgid F
+GLIBC_2.2.6 getgrgid_r F
+GLIBC_2.2.6 getgrnam F
+GLIBC_2.2.6 getgrnam_r F
+GLIBC_2.2.6 getgrouplist F
+GLIBC_2.2.6 getgroups F
+GLIBC_2.2.6 gethostbyaddr F
+GLIBC_2.2.6 gethostbyaddr_r F
+GLIBC_2.2.6 gethostbyname F
+GLIBC_2.2.6 gethostbyname2 F
+GLIBC_2.2.6 gethostbyname2_r F
+GLIBC_2.2.6 gethostbyname_r F
+GLIBC_2.2.6 gethostent F
+GLIBC_2.2.6 gethostent_r F
+GLIBC_2.2.6 gethostid F
+GLIBC_2.2.6 gethostname F
+GLIBC_2.2.6 getitimer F
+GLIBC_2.2.6 getline F
+GLIBC_2.2.6 getloadavg F
+GLIBC_2.2.6 getlogin F
+GLIBC_2.2.6 getlogin_r F
+GLIBC_2.2.6 getmntent F
+GLIBC_2.2.6 getmntent_r F
+GLIBC_2.2.6 getmsg F
+GLIBC_2.2.6 getnameinfo F
+GLIBC_2.2.6 getnetbyaddr F
+GLIBC_2.2.6 getnetbyaddr_r F
+GLIBC_2.2.6 getnetbyname F
+GLIBC_2.2.6 getnetbyname_r F
+GLIBC_2.2.6 getnetent F
+GLIBC_2.2.6 getnetent_r F
+GLIBC_2.2.6 getnetgrent F
+GLIBC_2.2.6 getnetgrent_r F
+GLIBC_2.2.6 getnetname F
+GLIBC_2.2.6 getopt F
+GLIBC_2.2.6 getopt_long F
+GLIBC_2.2.6 getopt_long_only F
+GLIBC_2.2.6 getpagesize F
+GLIBC_2.2.6 getpass F
+GLIBC_2.2.6 getpeername F
+GLIBC_2.2.6 getpgid F
+GLIBC_2.2.6 getpgrp F
+GLIBC_2.2.6 getpid F
+GLIBC_2.2.6 getpmsg F
+GLIBC_2.2.6 getppid F
+GLIBC_2.2.6 getpriority F
+GLIBC_2.2.6 getproc F
+GLIBC_2.2.6 getprotobyname F
+GLIBC_2.2.6 getprotobyname_r F
+GLIBC_2.2.6 getprotobynumber F
+GLIBC_2.2.6 getprotobynumber_r F
+GLIBC_2.2.6 getprotoent F
+GLIBC_2.2.6 getprotoent_r F
+GLIBC_2.2.6 getpt F
+GLIBC_2.2.6 getpublickey F
+GLIBC_2.2.6 getpw F
+GLIBC_2.2.6 getpwent F
+GLIBC_2.2.6 getpwent_r F
+GLIBC_2.2.6 getpwnam F
+GLIBC_2.2.6 getpwnam_r F
+GLIBC_2.2.6 getpwuid F
+GLIBC_2.2.6 getpwuid_r F
+GLIBC_2.2.6 getrlimit F
+GLIBC_2.2.6 getrlimit64 F
+GLIBC_2.2.6 getrpcbyname F
+GLIBC_2.2.6 getrpcbyname_r F
+GLIBC_2.2.6 getrpcbynumber F
+GLIBC_2.2.6 getrpcbynumber_r F
+GLIBC_2.2.6 getrpcent F
+GLIBC_2.2.6 getrpcent_r F
+GLIBC_2.2.6 getrpcport F
+GLIBC_2.2.6 getrusage F
+GLIBC_2.2.6 gets F
+GLIBC_2.2.6 getsecretkey F
+GLIBC_2.2.6 getservbyname F
+GLIBC_2.2.6 getservbyname_r F
+GLIBC_2.2.6 getservbyport F
+GLIBC_2.2.6 getservbyport_r F
+GLIBC_2.2.6 getservent F
+GLIBC_2.2.6 getservent_r F
+GLIBC_2.2.6 getsid F
+GLIBC_2.2.6 getsockname F
+GLIBC_2.2.6 getsockopt F
+GLIBC_2.2.6 getspent F
+GLIBC_2.2.6 getspent_r F
+GLIBC_2.2.6 getspnam F
+GLIBC_2.2.6 getspnam_r F
+GLIBC_2.2.6 getsubopt F
+GLIBC_2.2.6 gettext F
+GLIBC_2.2.6 gettimeofday F
+GLIBC_2.2.6 getttyent F
+GLIBC_2.2.6 getttynam F
+GLIBC_2.2.6 getuid F
+GLIBC_2.2.6 getumask F
+GLIBC_2.2.6 getusershell F
+GLIBC_2.2.6 getutent F
+GLIBC_2.2.6 getutent_r F
+GLIBC_2.2.6 getutid F
+GLIBC_2.2.6 getutid_r F
+GLIBC_2.2.6 getutline F
+GLIBC_2.2.6 getutline_r F
+GLIBC_2.2.6 getutmp F
+GLIBC_2.2.6 getutmpx F
+GLIBC_2.2.6 getutxent F
+GLIBC_2.2.6 getutxid F
+GLIBC_2.2.6 getutxline F
+GLIBC_2.2.6 getw F
+GLIBC_2.2.6 getwc F
+GLIBC_2.2.6 getwc_unlocked F
+GLIBC_2.2.6 getwchar F
+GLIBC_2.2.6 getwchar_unlocked F
+GLIBC_2.2.6 getwd F
+GLIBC_2.2.6 glob F
+GLIBC_2.2.6 glob64 F
+GLIBC_2.2.6 glob_pattern_p F
+GLIBC_2.2.6 globfree F
+GLIBC_2.2.6 globfree64 F
+GLIBC_2.2.6 gmtime F
+GLIBC_2.2.6 gmtime_r F
+GLIBC_2.2.6 gnu_get_libc_release F
+GLIBC_2.2.6 gnu_get_libc_version F
+GLIBC_2.2.6 grantpt F
+GLIBC_2.2.6 group_member F
+GLIBC_2.2.6 gsignal F
+GLIBC_2.2.6 gtty F
+GLIBC_2.2.6 h_errlist D 0x14
+GLIBC_2.2.6 h_nerr D 0x4
+GLIBC_2.2.6 hasmntopt F
+GLIBC_2.2.6 hcreate F
+GLIBC_2.2.6 hcreate_r F
+GLIBC_2.2.6 hdestroy F
+GLIBC_2.2.6 hdestroy_r F
+GLIBC_2.2.6 herror F
+GLIBC_2.2.6 host2netname F
+GLIBC_2.2.6 hsearch F
+GLIBC_2.2.6 hsearch_r F
+GLIBC_2.2.6 hstrerror F
+GLIBC_2.2.6 htonl F
+GLIBC_2.2.6 htons F
+GLIBC_2.2.6 hurd_catch_signal F
+GLIBC_2.2.6 hurd_check_cancel F
+GLIBC_2.2.6 hurd_directory_name_split F
+GLIBC_2.2.6 hurd_file_name_lookup F
+GLIBC_2.2.6 hurd_file_name_lookup_retry F
+GLIBC_2.2.6 hurd_file_name_path_lookup F
+GLIBC_2.2.6 hurd_file_name_split F
+GLIBC_2.2.6 hurd_preempt_signals F
+GLIBC_2.2.6 hurd_safe_copyin F
+GLIBC_2.2.6 hurd_safe_copyout F
+GLIBC_2.2.6 hurd_safe_memmove F
+GLIBC_2.2.6 hurd_safe_memset F
+GLIBC_2.2.6 hurd_sig_post F
+GLIBC_2.2.6 hurd_thread_cancel F
+GLIBC_2.2.6 hurd_thread_self F
+GLIBC_2.2.6 hurd_unpreempt_signals F
+GLIBC_2.2.6 iconv F
+GLIBC_2.2.6 iconv_close F
+GLIBC_2.2.6 iconv_open F
+GLIBC_2.2.6 if_freenameindex F
+GLIBC_2.2.6 if_indextoname F
+GLIBC_2.2.6 if_nameindex F
+GLIBC_2.2.6 if_nametoindex F
+GLIBC_2.2.6 imaxabs F
+GLIBC_2.2.6 imaxdiv F
+GLIBC_2.2.6 in6addr_any D 0x10
+GLIBC_2.2.6 in6addr_loopback D 0x10
+GLIBC_2.2.6 index F
+GLIBC_2.2.6 inet_addr F
+GLIBC_2.2.6 inet_aton F
+GLIBC_2.2.6 inet_lnaof F
+GLIBC_2.2.6 inet_makeaddr F
+GLIBC_2.2.6 inet_netof F
+GLIBC_2.2.6 inet_network F
+GLIBC_2.2.6 inet_nsap_addr F
+GLIBC_2.2.6 inet_nsap_ntoa F
+GLIBC_2.2.6 inet_ntoa F
+GLIBC_2.2.6 inet_ntop F
+GLIBC_2.2.6 inet_pton F
+GLIBC_2.2.6 initgroups F
+GLIBC_2.2.6 initstate F
+GLIBC_2.2.6 initstate_r F
+GLIBC_2.2.6 innetgr F
+GLIBC_2.2.6 insque F
+GLIBC_2.2.6 ioctl F
+GLIBC_2.2.6 ioperm F
+GLIBC_2.2.6 iruserok F
+GLIBC_2.2.6 iruserok_af F
+GLIBC_2.2.6 isalnum F
+GLIBC_2.2.6 isalpha F
+GLIBC_2.2.6 isascii F
+GLIBC_2.2.6 isastream F
+GLIBC_2.2.6 isatty F
+GLIBC_2.2.6 isblank F
+GLIBC_2.2.6 iscntrl F
+GLIBC_2.2.6 isdigit F
+GLIBC_2.2.6 isfdtype F
+GLIBC_2.2.6 isgraph F
+GLIBC_2.2.6 isinf F
+GLIBC_2.2.6 isinff F
+GLIBC_2.2.6 isinfl F
+GLIBC_2.2.6 islower F
+GLIBC_2.2.6 isnan F
+GLIBC_2.2.6 isnanf F
+GLIBC_2.2.6 isnanl F
+GLIBC_2.2.6 isprint F
+GLIBC_2.2.6 ispunct F
+GLIBC_2.2.6 isspace F
+GLIBC_2.2.6 isupper F
+GLIBC_2.2.6 iswalnum F
+GLIBC_2.2.6 iswalpha F
+GLIBC_2.2.6 iswblank F
+GLIBC_2.2.6 iswcntrl F
+GLIBC_2.2.6 iswctype F
+GLIBC_2.2.6 iswdigit F
+GLIBC_2.2.6 iswgraph F
+GLIBC_2.2.6 iswlower F
+GLIBC_2.2.6 iswprint F
+GLIBC_2.2.6 iswpunct F
+GLIBC_2.2.6 iswspace F
+GLIBC_2.2.6 iswupper F
+GLIBC_2.2.6 iswxdigit F
+GLIBC_2.2.6 isxdigit F
+GLIBC_2.2.6 jrand48 F
+GLIBC_2.2.6 jrand48_r F
+GLIBC_2.2.6 key_decryptsession F
+GLIBC_2.2.6 key_decryptsession_pk F
+GLIBC_2.2.6 key_encryptsession F
+GLIBC_2.2.6 key_encryptsession_pk F
+GLIBC_2.2.6 key_gendes F
+GLIBC_2.2.6 key_get_conv F
+GLIBC_2.2.6 key_secretkey_is_set F
+GLIBC_2.2.6 key_setnet F
+GLIBC_2.2.6 key_setsecret F
+GLIBC_2.2.6 kill F
+GLIBC_2.2.6 killpg F
+GLIBC_2.2.6 l64a F
+GLIBC_2.2.6 labs F
+GLIBC_2.2.6 lchown F
+GLIBC_2.2.6 lckpwdf F
+GLIBC_2.2.6 lcong48 F
+GLIBC_2.2.6 lcong48_r F
+GLIBC_2.2.6 ldexp F
+GLIBC_2.2.6 ldexpf F
+GLIBC_2.2.6 ldexpl F
+GLIBC_2.2.6 ldiv F
+GLIBC_2.2.6 lfind F
+GLIBC_2.2.6 link F
+GLIBC_2.2.6 listen F
+GLIBC_2.2.6 llabs F
+GLIBC_2.2.6 lldiv F
+GLIBC_2.2.6 loc1 D 0x4
+GLIBC_2.2.6 loc2 D 0x4
+GLIBC_2.2.6 localeconv F
+GLIBC_2.2.6 localtime F
+GLIBC_2.2.6 localtime_r F
+GLIBC_2.2.6 lockf F
+GLIBC_2.2.6 lockf64 F
+GLIBC_2.2.6 locs D 0x4
+GLIBC_2.2.6 longjmp F
+GLIBC_2.2.6 lrand48 F
+GLIBC_2.2.6 lrand48_r F
+GLIBC_2.2.6 lsearch F
+GLIBC_2.2.6 lseek F
+GLIBC_2.2.6 lseek64 F
+GLIBC_2.2.6 mach_error F
+GLIBC_2.2.6 mach_error_string F
+GLIBC_2.2.6 mach_error_type F
+GLIBC_2.2.6 mach_host_self F
+GLIBC_2.2.6 mach_msg F
+GLIBC_2.2.6 mach_msg_destroy F
+GLIBC_2.2.6 mach_msg_receive F
+GLIBC_2.2.6 mach_msg_send F
+GLIBC_2.2.6 mach_msg_server F
+GLIBC_2.2.6 mach_msg_server_timeout F
+GLIBC_2.2.6 mach_open_devstream F
+GLIBC_2.2.6 mach_port_allocate F
+GLIBC_2.2.6 mach_port_allocate_name F
+GLIBC_2.2.6 mach_port_deallocate F
+GLIBC_2.2.6 mach_port_insert_right F
+GLIBC_2.2.6 mach_reply_port F
+GLIBC_2.2.6 mach_setup_thread F
+GLIBC_2.2.6 mach_setup_tls F
+GLIBC_2.2.6 mach_task_self F
+GLIBC_2.2.6 mach_thread_self F
+GLIBC_2.2.6 madvise F
+GLIBC_2.2.6 makecontext F
+GLIBC_2.2.6 mallinfo F
+GLIBC_2.2.6 malloc F
+GLIBC_2.2.6 malloc_get_state F
+GLIBC_2.2.6 malloc_set_state F
+GLIBC_2.2.6 malloc_stats F
+GLIBC_2.2.6 malloc_trim F
+GLIBC_2.2.6 malloc_usable_size F
+GLIBC_2.2.6 mallopt F
+GLIBC_2.2.6 mallwatch D 0x4
+GLIBC_2.2.6 mblen F
+GLIBC_2.2.6 mbrlen F
+GLIBC_2.2.6 mbrtowc F
+GLIBC_2.2.6 mbsinit F
+GLIBC_2.2.6 mbsnrtowcs F
+GLIBC_2.2.6 mbsrtowcs F
+GLIBC_2.2.6 mbstowcs F
+GLIBC_2.2.6 mbtowc F
+GLIBC_2.2.6 mcheck F
+GLIBC_2.2.6 mcheck_check_all F
+GLIBC_2.2.6 mcheck_pedantic F
+GLIBC_2.2.6 mcount F
+GLIBC_2.2.6 memalign F
+GLIBC_2.2.6 memccpy F
+GLIBC_2.2.6 memchr F
+GLIBC_2.2.6 memcmp F
+GLIBC_2.2.6 memcpy F
+GLIBC_2.2.6 memfrob F
+GLIBC_2.2.6 memmem F
+GLIBC_2.2.6 memmove F
+GLIBC_2.2.6 mempcpy F
+GLIBC_2.2.6 memrchr F
+GLIBC_2.2.6 memset F
+GLIBC_2.2.6 mig_allocate F
+GLIBC_2.2.6 mig_dealloc_reply_port F
+GLIBC_2.2.6 mig_deallocate F
+GLIBC_2.2.6 mig_get_reply_port F
+GLIBC_2.2.6 mig_init F
+GLIBC_2.2.6 mig_put_reply_port F
+GLIBC_2.2.6 mig_strncpy F
+GLIBC_2.2.6 mincore F
+GLIBC_2.2.6 mkdir F
+GLIBC_2.2.6 mkdtemp F
+GLIBC_2.2.6 mkfifo F
+GLIBC_2.2.6 mkstemp F
+GLIBC_2.2.6 mkstemp64 F
+GLIBC_2.2.6 mktemp F
+GLIBC_2.2.6 mktime F
+GLIBC_2.2.6 mlock F
+GLIBC_2.2.6 mlockall F
+GLIBC_2.2.6 mmap F
+GLIBC_2.2.6 mmap64 F
+GLIBC_2.2.6 modf F
+GLIBC_2.2.6 modff F
+GLIBC_2.2.6 modfl F
+GLIBC_2.2.6 moncontrol F
+GLIBC_2.2.6 monstartup F
+GLIBC_2.2.6 mprobe F
+GLIBC_2.2.6 mprotect F
+GLIBC_2.2.6 mrand48 F
+GLIBC_2.2.6 mrand48_r F
+GLIBC_2.2.6 msgctl F
+GLIBC_2.2.6 msgget F
+GLIBC_2.2.6 msgrcv F
+GLIBC_2.2.6 msgsnd F
+GLIBC_2.2.6 msync F
+GLIBC_2.2.6 mtrace F
+GLIBC_2.2.6 munlock F
+GLIBC_2.2.6 munlockall F
+GLIBC_2.2.6 munmap F
+GLIBC_2.2.6 muntrace F
+GLIBC_2.2.6 nanosleep F
+GLIBC_2.2.6 netname2host F
+GLIBC_2.2.6 netname2user F
+GLIBC_2.2.6 nftw F
+GLIBC_2.2.6 nftw64 F
+GLIBC_2.2.6 ngettext F
+GLIBC_2.2.6 nice F
+GLIBC_2.2.6 nl_langinfo F
+GLIBC_2.2.6 nrand48 F
+GLIBC_2.2.6 nrand48_r F
+GLIBC_2.2.6 ntohl F
+GLIBC_2.2.6 ntohs F
+GLIBC_2.2.6 obstack_alloc_failed_handler D 0x4
+GLIBC_2.2.6 obstack_exit_failure D 0x4
+GLIBC_2.2.6 obstack_free F
+GLIBC_2.2.6 obstack_printf F
+GLIBC_2.2.6 obstack_vprintf F
+GLIBC_2.2.6 on_exit F
+GLIBC_2.2.6 open F
+GLIBC_2.2.6 open64 F
+GLIBC_2.2.6 open_memstream F
+GLIBC_2.2.6 opendir F
+GLIBC_2.2.6 openlog F
+GLIBC_2.2.6 openport F
+GLIBC_2.2.6 optarg D 0x4
+GLIBC_2.2.6 opterr D 0x4
+GLIBC_2.2.6 optind D 0x4
+GLIBC_2.2.6 optopt D 0x4
+GLIBC_2.2.6 parse_printf_format F
+GLIBC_2.2.6 passwd2des F
+GLIBC_2.2.6 pathconf F
+GLIBC_2.2.6 pause F
+GLIBC_2.2.6 pclose F
+GLIBC_2.2.6 perror F
+GLIBC_2.2.6 pid2task F
+GLIBC_2.2.6 pipe F
+GLIBC_2.2.6 pmap_getmaps F
+GLIBC_2.2.6 pmap_getport F
+GLIBC_2.2.6 pmap_rmtcall F
+GLIBC_2.2.6 pmap_set F
+GLIBC_2.2.6 pmap_unset F
+GLIBC_2.2.6 poll F
+GLIBC_2.2.6 popen F
+GLIBC_2.2.6 posix_fadvise F
+GLIBC_2.2.6 posix_fadvise64 F
+GLIBC_2.2.6 posix_fallocate F
+GLIBC_2.2.6 posix_fallocate64 F
+GLIBC_2.2.6 posix_madvise F
+GLIBC_2.2.6 posix_memalign F
+GLIBC_2.2.6 posix_openpt F
+GLIBC_2.2.6 posix_spawn F
+GLIBC_2.2.6 posix_spawn_file_actions_addclose F
+GLIBC_2.2.6 posix_spawn_file_actions_adddup2 F
+GLIBC_2.2.6 posix_spawn_file_actions_addopen F
+GLIBC_2.2.6 posix_spawn_file_actions_destroy F
+GLIBC_2.2.6 posix_spawn_file_actions_init F
+GLIBC_2.2.6 posix_spawnattr_destroy F
+GLIBC_2.2.6 posix_spawnattr_getflags F
+GLIBC_2.2.6 posix_spawnattr_getpgroup F
+GLIBC_2.2.6 posix_spawnattr_getschedparam F
+GLIBC_2.2.6 posix_spawnattr_getschedpolicy F
+GLIBC_2.2.6 posix_spawnattr_getsigdefault F
+GLIBC_2.2.6 posix_spawnattr_getsigmask F
+GLIBC_2.2.6 posix_spawnattr_init F
+GLIBC_2.2.6 posix_spawnattr_setflags F
+GLIBC_2.2.6 posix_spawnattr_setpgroup F
+GLIBC_2.2.6 posix_spawnattr_setschedparam F
+GLIBC_2.2.6 posix_spawnattr_setschedpolicy F
+GLIBC_2.2.6 posix_spawnattr_setsigdefault F
+GLIBC_2.2.6 posix_spawnattr_setsigmask F
+GLIBC_2.2.6 posix_spawnp F
+GLIBC_2.2.6 pread F
+GLIBC_2.2.6 pread64 F
+GLIBC_2.2.6 printf F
+GLIBC_2.2.6 printf_size F
+GLIBC_2.2.6 printf_size_info F
+GLIBC_2.2.6 profil F
+GLIBC_2.2.6 program_invocation_name D 0x4
+GLIBC_2.2.6 program_invocation_short_name D 0x4
+GLIBC_2.2.6 pselect F
+GLIBC_2.2.6 psignal F
+GLIBC_2.2.6 ptrace F
+GLIBC_2.2.6 ptsname F
+GLIBC_2.2.6 ptsname_r F
+GLIBC_2.2.6 putc F
+GLIBC_2.2.6 putc_unlocked F
+GLIBC_2.2.6 putchar F
+GLIBC_2.2.6 putchar_unlocked F
+GLIBC_2.2.6 putenv F
+GLIBC_2.2.6 putgrent F
+GLIBC_2.2.6 putmsg F
+GLIBC_2.2.6 putpmsg F
+GLIBC_2.2.6 putpwent F
+GLIBC_2.2.6 puts F
+GLIBC_2.2.6 putspent F
+GLIBC_2.2.6 pututline F
+GLIBC_2.2.6 pututxline F
+GLIBC_2.2.6 putw F
+GLIBC_2.2.6 putwc F
+GLIBC_2.2.6 putwc_unlocked F
+GLIBC_2.2.6 putwchar F
+GLIBC_2.2.6 putwchar_unlocked F
+GLIBC_2.2.6 pvalloc F
+GLIBC_2.2.6 pwrite F
+GLIBC_2.2.6 pwrite64 F
+GLIBC_2.2.6 qecvt F
+GLIBC_2.2.6 qecvt_r F
+GLIBC_2.2.6 qfcvt F
+GLIBC_2.2.6 qfcvt_r F
+GLIBC_2.2.6 qgcvt F
+GLIBC_2.2.6 qsort F
+GLIBC_2.2.6 raise F
+GLIBC_2.2.6 rand F
+GLIBC_2.2.6 rand_r F
+GLIBC_2.2.6 random F
+GLIBC_2.2.6 random_r F
+GLIBC_2.2.6 rawmemchr F
+GLIBC_2.2.6 rcmd F
+GLIBC_2.2.6 rcmd_af F
+GLIBC_2.2.6 re_comp F
+GLIBC_2.2.6 re_compile_fastmap F
+GLIBC_2.2.6 re_compile_pattern F
+GLIBC_2.2.6 re_exec F
+GLIBC_2.2.6 re_match F
+GLIBC_2.2.6 re_match_2 F
+GLIBC_2.2.6 re_max_failures D 0x4
+GLIBC_2.2.6 re_search F
+GLIBC_2.2.6 re_search_2 F
+GLIBC_2.2.6 re_set_registers F
+GLIBC_2.2.6 re_set_syntax F
+GLIBC_2.2.6 re_syntax_options D 0x4
+GLIBC_2.2.6 read F
+GLIBC_2.2.6 readdir F
+GLIBC_2.2.6 readdir64 F
+GLIBC_2.2.6 readdir64_r F
+GLIBC_2.2.6 readdir_r F
+GLIBC_2.2.6 readlink F
+GLIBC_2.2.6 readv F
+GLIBC_2.2.6 realloc F
+GLIBC_2.2.6 realpath F
+GLIBC_2.2.6 reboot F
+GLIBC_2.2.6 recv F
+GLIBC_2.2.6 recvfrom F
+GLIBC_2.2.6 recvmsg F
+GLIBC_2.2.6 regcomp F
+GLIBC_2.2.6 regerror F
+GLIBC_2.2.6 regexec F
+GLIBC_2.2.6 regfree F
+GLIBC_2.2.6 register_printf_function F
+GLIBC_2.2.6 registerrpc F
+GLIBC_2.2.6 remove F
+GLIBC_2.2.6 remque F
+GLIBC_2.2.6 rename F
+GLIBC_2.2.6 revoke F
+GLIBC_2.2.6 rewind F
+GLIBC_2.2.6 rewinddir F
+GLIBC_2.2.6 rexec F
+GLIBC_2.2.6 rexec_af F
+GLIBC_2.2.6 rexecoptions D 0x4
+GLIBC_2.2.6 rindex F
+GLIBC_2.2.6 rmdir F
+GLIBC_2.2.6 rpc_createerr D 0x10
+GLIBC_2.2.6 rpmatch F
+GLIBC_2.2.6 rresvport F
+GLIBC_2.2.6 rresvport_af F
+GLIBC_2.2.6 rtime F
+GLIBC_2.2.6 ruserok F
+GLIBC_2.2.6 ruserok_af F
+GLIBC_2.2.6 ruserpass F
+GLIBC_2.2.6 sbrk F
+GLIBC_2.2.6 scalbln F
+GLIBC_2.2.6 scalblnf F
+GLIBC_2.2.6 scalblnl F
+GLIBC_2.2.6 scalbn F
+GLIBC_2.2.6 scalbnf F
+GLIBC_2.2.6 scalbnl F
+GLIBC_2.2.6 scandir F
+GLIBC_2.2.6 scandir64 F
+GLIBC_2.2.6 scanf F
+GLIBC_2.2.6 sched_get_priority_max F
+GLIBC_2.2.6 sched_get_priority_min F
+GLIBC_2.2.6 sched_getparam F
+GLIBC_2.2.6 sched_getscheduler F
+GLIBC_2.2.6 sched_rr_get_interval F
+GLIBC_2.2.6 sched_setparam F
+GLIBC_2.2.6 sched_setscheduler F
+GLIBC_2.2.6 sched_yield F
+GLIBC_2.2.6 seed48 F
+GLIBC_2.2.6 seed48_r F
+GLIBC_2.2.6 seekdir F
+GLIBC_2.2.6 select F
+GLIBC_2.2.6 semctl F
+GLIBC_2.2.6 semget F
+GLIBC_2.2.6 semop F
+GLIBC_2.2.6 send F
+GLIBC_2.2.6 sendfile F
+GLIBC_2.2.6 sendmsg F
+GLIBC_2.2.6 sendto F
+GLIBC_2.2.6 setaliasent F
+GLIBC_2.2.6 setauth F
+GLIBC_2.2.6 setbuf F
+GLIBC_2.2.6 setbuffer F
+GLIBC_2.2.6 setcontext F
+GLIBC_2.2.6 setcrdir F
+GLIBC_2.2.6 setcttyid F
+GLIBC_2.2.6 setcwdir F
+GLIBC_2.2.6 setdomainname F
+GLIBC_2.2.6 setegid F
+GLIBC_2.2.6 setenv F
+GLIBC_2.2.6 seteuid F
+GLIBC_2.2.6 seteuids F
+GLIBC_2.2.6 setfsent F
+GLIBC_2.2.6 setgid F
+GLIBC_2.2.6 setgrent F
+GLIBC_2.2.6 setgroups F
+GLIBC_2.2.6 sethostent F
+GLIBC_2.2.6 sethostid F
+GLIBC_2.2.6 sethostname F
+GLIBC_2.2.6 setitimer F
+GLIBC_2.2.6 setjmp F
+GLIBC_2.2.6 setlinebuf F
+GLIBC_2.2.6 setlocale F
+GLIBC_2.2.6 setlogin F
+GLIBC_2.2.6 setlogmask F
+GLIBC_2.2.6 setmntent F
+GLIBC_2.2.6 setnetent F
+GLIBC_2.2.6 setnetgrent F
+GLIBC_2.2.6 setpgid F
+GLIBC_2.2.6 setpgrp F
+GLIBC_2.2.6 setpriority F
+GLIBC_2.2.6 setproc F
+GLIBC_2.2.6 setprotoent F
+GLIBC_2.2.6 setpwent F
+GLIBC_2.2.6 setregid F
+GLIBC_2.2.6 setreuid F
+GLIBC_2.2.6 setrlimit F
+GLIBC_2.2.6 setrlimit64 F
+GLIBC_2.2.6 setrpcent F
+GLIBC_2.2.6 setservent F
+GLIBC_2.2.6 setsid F
+GLIBC_2.2.6 setsockopt F
+GLIBC_2.2.6 setspent F
+GLIBC_2.2.6 setstate F
+GLIBC_2.2.6 setstate_r F
+GLIBC_2.2.6 settimeofday F
+GLIBC_2.2.6 setttyent F
+GLIBC_2.2.6 setuid F
+GLIBC_2.2.6 setusershell F
+GLIBC_2.2.6 setutent F
+GLIBC_2.2.6 setutxent F
+GLIBC_2.2.6 setvbuf F
+GLIBC_2.2.6 sgetspent F
+GLIBC_2.2.6 sgetspent_r F
+GLIBC_2.2.6 shmat F
+GLIBC_2.2.6 shmctl F
+GLIBC_2.2.6 shmdt F
+GLIBC_2.2.6 shmget F
+GLIBC_2.2.6 shutdown F
+GLIBC_2.2.6 sigaction F
+GLIBC_2.2.6 sigaddset F
+GLIBC_2.2.6 sigaltstack F
+GLIBC_2.2.6 sigandset F
+GLIBC_2.2.6 sigblock F
+GLIBC_2.2.6 sigdelset F
+GLIBC_2.2.6 sigemptyset F
+GLIBC_2.2.6 sigfillset F
+GLIBC_2.2.6 siggetmask F
+GLIBC_2.2.6 sighold F
+GLIBC_2.2.6 sigignore F
+GLIBC_2.2.6 siginterrupt F
+GLIBC_2.2.6 sigisemptyset F
+GLIBC_2.2.6 sigismember F
+GLIBC_2.2.6 siglongjmp F
+GLIBC_2.2.6 signal F
+GLIBC_2.2.6 sigorset F
+GLIBC_2.2.6 sigpause F
+GLIBC_2.2.6 sigpending F
+GLIBC_2.2.6 sigprocmask F
+GLIBC_2.2.6 sigqueue F
+GLIBC_2.2.6 sigrelse F
+GLIBC_2.2.6 sigreturn F
+GLIBC_2.2.6 sigset F
+GLIBC_2.2.6 sigsetmask F
+GLIBC_2.2.6 sigstack F
+GLIBC_2.2.6 sigsuspend F
+GLIBC_2.2.6 sigtimedwait F
+GLIBC_2.2.6 sigvec F
+GLIBC_2.2.6 sigwait F
+GLIBC_2.2.6 sigwaitinfo F
+GLIBC_2.2.6 sleep F
+GLIBC_2.2.6 snprintf F
+GLIBC_2.2.6 sockatmark F
+GLIBC_2.2.6 socket F
+GLIBC_2.2.6 socketpair F
+GLIBC_2.2.6 sprintf F
+GLIBC_2.2.6 sprofil F
+GLIBC_2.2.6 srand F
+GLIBC_2.2.6 srand48 F
+GLIBC_2.2.6 srand48_r F
+GLIBC_2.2.6 srandom F
+GLIBC_2.2.6 srandom_r F
+GLIBC_2.2.6 sscanf F
+GLIBC_2.2.6 ssignal F
+GLIBC_2.2.6 sstk F
+GLIBC_2.2.6 statfs F
+GLIBC_2.2.6 statfs64 F
+GLIBC_2.2.6 statvfs F
+GLIBC_2.2.6 statvfs64 F
+GLIBC_2.2.6 stderr D 0x4
+GLIBC_2.2.6 stdin D 0x4
+GLIBC_2.2.6 stdout D 0x4
+GLIBC_2.2.6 step F
+GLIBC_2.2.6 stime F
+GLIBC_2.2.6 stpcpy F
+GLIBC_2.2.6 stpncpy F
+GLIBC_2.2.6 strcasecmp F
+GLIBC_2.2.6 strcasestr F
+GLIBC_2.2.6 strcat F
+GLIBC_2.2.6 strchr F
+GLIBC_2.2.6 strchrnul F
+GLIBC_2.2.6 strcmp F
+GLIBC_2.2.6 strcoll F
+GLIBC_2.2.6 strcpy F
+GLIBC_2.2.6 strcspn F
+GLIBC_2.2.6 strdup F
+GLIBC_2.2.6 strerror F
+GLIBC_2.2.6 strerror_r F
+GLIBC_2.2.6 strfmon F
+GLIBC_2.2.6 strfry F
+GLIBC_2.2.6 strftime F
+GLIBC_2.2.6 strlen F
+GLIBC_2.2.6 strncasecmp F
+GLIBC_2.2.6 strncat F
+GLIBC_2.2.6 strncmp F
+GLIBC_2.2.6 strncpy F
+GLIBC_2.2.6 strndup F
+GLIBC_2.2.6 strnlen F
+GLIBC_2.2.6 strpbrk F
+GLIBC_2.2.6 strptime F
+GLIBC_2.2.6 strrchr F
+GLIBC_2.2.6 strsep F
+GLIBC_2.2.6 strsignal F
+GLIBC_2.2.6 strspn F
+GLIBC_2.2.6 strstr F
+GLIBC_2.2.6 strtod F
+GLIBC_2.2.6 strtof F
+GLIBC_2.2.6 strtoimax F
+GLIBC_2.2.6 strtok F
+GLIBC_2.2.6 strtok_r F
+GLIBC_2.2.6 strtol F
+GLIBC_2.2.6 strtold F
+GLIBC_2.2.6 strtoll F
+GLIBC_2.2.6 strtoq F
+GLIBC_2.2.6 strtoul F
+GLIBC_2.2.6 strtoull F
+GLIBC_2.2.6 strtoumax F
+GLIBC_2.2.6 strtouq F
+GLIBC_2.2.6 strverscmp F
+GLIBC_2.2.6 strxfrm F
+GLIBC_2.2.6 stty F
+GLIBC_2.2.6 svc_exit F
+GLIBC_2.2.6 svc_fdset D 0x20
+GLIBC_2.2.6 svc_getreq F
+GLIBC_2.2.6 svc_getreq_common F
+GLIBC_2.2.6 svc_getreq_poll F
+GLIBC_2.2.6 svc_getreqset F
+GLIBC_2.2.6 svc_max_pollfd D 0x4
+GLIBC_2.2.6 svc_pollfd D 0x4
+GLIBC_2.2.6 svc_register F
+GLIBC_2.2.6 svc_run F
+GLIBC_2.2.6 svc_sendreply F
+GLIBC_2.2.6 svc_unregister F
+GLIBC_2.2.6 svcauthdes_stats D 0xc
+GLIBC_2.2.6 svcerr_auth F
+GLIBC_2.2.6 svcerr_decode F
+GLIBC_2.2.6 svcerr_noproc F
+GLIBC_2.2.6 svcerr_noprog F
+GLIBC_2.2.6 svcerr_progvers F
+GLIBC_2.2.6 svcerr_systemerr F
+GLIBC_2.2.6 svcerr_weakauth F
+GLIBC_2.2.6 svcfd_create F
+GLIBC_2.2.6 svcraw_create F
+GLIBC_2.2.6 svctcp_create F
+GLIBC_2.2.6 svcudp_bufcreate F
+GLIBC_2.2.6 svcudp_create F
+GLIBC_2.2.6 svcudp_enablecache F
+GLIBC_2.2.6 svcunix_create F
+GLIBC_2.2.6 svcunixfd_create F
+GLIBC_2.2.6 swab F
+GLIBC_2.2.6 swapcontext F
+GLIBC_2.2.6 swprintf F
+GLIBC_2.2.6 swscanf F
+GLIBC_2.2.6 swtch F
+GLIBC_2.2.6 swtch_pri F
+GLIBC_2.2.6 symlink F
+GLIBC_2.2.6 sync F
+GLIBC_2.2.6 sys_sigabbrev D 0x84
+GLIBC_2.2.6 sys_siglist D 0x84
+GLIBC_2.2.6 syscall F
+GLIBC_2.2.6 sysconf F
+GLIBC_2.2.6 syslog F
+GLIBC_2.2.6 system F
+GLIBC_2.2.6 sysv_signal F
+GLIBC_2.2.6 task2pid F
+GLIBC_2.2.6 task_create F
+GLIBC_2.2.6 task_set_special_port F
+GLIBC_2.2.6 task_suspend F
+GLIBC_2.2.6 task_terminate F
+GLIBC_2.2.6 tcdrain F
+GLIBC_2.2.6 tcflow F
+GLIBC_2.2.6 tcflush F
+GLIBC_2.2.6 tcgetattr F
+GLIBC_2.2.6 tcgetpgrp F
+GLIBC_2.2.6 tcgetsid F
+GLIBC_2.2.6 tcsendbreak F
+GLIBC_2.2.6 tcsetattr F
+GLIBC_2.2.6 tcsetpgrp F
+GLIBC_2.2.6 tdelete F
+GLIBC_2.2.6 tdestroy F
+GLIBC_2.2.6 telldir F
+GLIBC_2.2.6 tempnam F
+GLIBC_2.2.6 textdomain F
+GLIBC_2.2.6 tfind F
+GLIBC_2.2.6 thread_depress_abort F
+GLIBC_2.2.6 thread_switch F
+GLIBC_2.2.6 time F
+GLIBC_2.2.6 timegm F
+GLIBC_2.2.6 timelocal F
+GLIBC_2.2.6 times F
+GLIBC_2.2.6 timezone D 0x4
+GLIBC_2.2.6 tmpfile F
+GLIBC_2.2.6 tmpfile64 F
+GLIBC_2.2.6 tmpnam F
+GLIBC_2.2.6 tmpnam_r F
+GLIBC_2.2.6 toascii F
+GLIBC_2.2.6 tolower F
+GLIBC_2.2.6 toupper F
+GLIBC_2.2.6 towctrans F
+GLIBC_2.2.6 towlower F
+GLIBC_2.2.6 towupper F
+GLIBC_2.2.6 tr_break F
+GLIBC_2.2.6 truncate F
+GLIBC_2.2.6 truncate64 F
+GLIBC_2.2.6 tsearch F
+GLIBC_2.2.6 ttyname F
+GLIBC_2.2.6 ttyname_r F
+GLIBC_2.2.6 ttyslot F
+GLIBC_2.2.6 twalk F
+GLIBC_2.2.6 tzname D 0x8
+GLIBC_2.2.6 tzset F
+GLIBC_2.2.6 ualarm F
+GLIBC_2.2.6 ulckpwdf F
+GLIBC_2.2.6 ulimit F
+GLIBC_2.2.6 umask F
+GLIBC_2.2.6 uname F
+GLIBC_2.2.6 ungetc F
+GLIBC_2.2.6 ungetwc F
+GLIBC_2.2.6 unlink F
+GLIBC_2.2.6 unlockpt F
+GLIBC_2.2.6 unsetenv F
+GLIBC_2.2.6 updwtmp F
+GLIBC_2.2.6 updwtmpx F
+GLIBC_2.2.6 user2netname F
+GLIBC_2.2.6 usleep F
+GLIBC_2.2.6 ustat F
+GLIBC_2.2.6 utime F
+GLIBC_2.2.6 utimes F
+GLIBC_2.2.6 utmpname F
+GLIBC_2.2.6 utmpxname F
+GLIBC_2.2.6 valloc F
+GLIBC_2.2.6 vasprintf F
+GLIBC_2.2.6 vdprintf F
+GLIBC_2.2.6 verr F
+GLIBC_2.2.6 verrx F
+GLIBC_2.2.6 versionsort F
+GLIBC_2.2.6 versionsort64 F
+GLIBC_2.2.6 vfork F
+GLIBC_2.2.6 vfprintf F
+GLIBC_2.2.6 vfscanf F
+GLIBC_2.2.6 vfwprintf F
+GLIBC_2.2.6 vfwscanf F
+GLIBC_2.2.6 vhangup F
+GLIBC_2.2.6 vlimit F
+GLIBC_2.2.6 vm_allocate F
+GLIBC_2.2.6 vm_deallocate F
+GLIBC_2.2.6 vm_map F
+GLIBC_2.2.6 vm_page_size D 0x4
+GLIBC_2.2.6 vpprintf F
+GLIBC_2.2.6 vprintf F
+GLIBC_2.2.6 vscanf F
+GLIBC_2.2.6 vsnprintf F
+GLIBC_2.2.6 vsprintf F
+GLIBC_2.2.6 vsscanf F
+GLIBC_2.2.6 vswprintf F
+GLIBC_2.2.6 vswscanf F
+GLIBC_2.2.6 vsyslog F
+GLIBC_2.2.6 vtimes F
+GLIBC_2.2.6 vwarn F
+GLIBC_2.2.6 vwarnx F
+GLIBC_2.2.6 vwprintf F
+GLIBC_2.2.6 vwscanf F
+GLIBC_2.2.6 wait F
+GLIBC_2.2.6 wait3 F
+GLIBC_2.2.6 wait4 F
+GLIBC_2.2.6 waitid F
+GLIBC_2.2.6 waitpid F
+GLIBC_2.2.6 warn F
+GLIBC_2.2.6 warnx F
+GLIBC_2.2.6 wcpcpy F
+GLIBC_2.2.6 wcpncpy F
+GLIBC_2.2.6 wcrtomb F
+GLIBC_2.2.6 wcscasecmp F
+GLIBC_2.2.6 wcscat F
+GLIBC_2.2.6 wcschr F
+GLIBC_2.2.6 wcschrnul F
+GLIBC_2.2.6 wcscmp F
+GLIBC_2.2.6 wcscoll F
+GLIBC_2.2.6 wcscpy F
+GLIBC_2.2.6 wcscspn F
+GLIBC_2.2.6 wcsdup F
+GLIBC_2.2.6 wcsftime F
+GLIBC_2.2.6 wcslen F
+GLIBC_2.2.6 wcsncasecmp F
+GLIBC_2.2.6 wcsncat F
+GLIBC_2.2.6 wcsncmp F
+GLIBC_2.2.6 wcsncpy F
+GLIBC_2.2.6 wcsnlen F
+GLIBC_2.2.6 wcsnrtombs F
+GLIBC_2.2.6 wcspbrk F
+GLIBC_2.2.6 wcsrchr F
+GLIBC_2.2.6 wcsrtombs F
+GLIBC_2.2.6 wcsspn F
+GLIBC_2.2.6 wcsstr F
+GLIBC_2.2.6 wcstod F
+GLIBC_2.2.6 wcstof F
+GLIBC_2.2.6 wcstoimax F
+GLIBC_2.2.6 wcstok F
+GLIBC_2.2.6 wcstol F
+GLIBC_2.2.6 wcstold F
+GLIBC_2.2.6 wcstoll F
+GLIBC_2.2.6 wcstombs F
+GLIBC_2.2.6 wcstoq F
+GLIBC_2.2.6 wcstoul F
+GLIBC_2.2.6 wcstoull F
+GLIBC_2.2.6 wcstoumax F
+GLIBC_2.2.6 wcstouq F
+GLIBC_2.2.6 wcswcs F
+GLIBC_2.2.6 wcswidth F
+GLIBC_2.2.6 wcsxfrm F
+GLIBC_2.2.6 wctob F
+GLIBC_2.2.6 wctomb F
+GLIBC_2.2.6 wctrans F
+GLIBC_2.2.6 wctype F
+GLIBC_2.2.6 wcwidth F
+GLIBC_2.2.6 wmemchr F
+GLIBC_2.2.6 wmemcmp F
+GLIBC_2.2.6 wmemcpy F
+GLIBC_2.2.6 wmemmove F
+GLIBC_2.2.6 wmempcpy F
+GLIBC_2.2.6 wmemset F
+GLIBC_2.2.6 wordexp F
+GLIBC_2.2.6 wordfree F
+GLIBC_2.2.6 wprintf F
+GLIBC_2.2.6 write F
+GLIBC_2.2.6 writev F
+GLIBC_2.2.6 wscanf F
+GLIBC_2.2.6 xdecrypt F
+GLIBC_2.2.6 xdr_accepted_reply F
+GLIBC_2.2.6 xdr_array F
+GLIBC_2.2.6 xdr_authdes_cred F
+GLIBC_2.2.6 xdr_authdes_verf F
+GLIBC_2.2.6 xdr_authunix_parms F
+GLIBC_2.2.6 xdr_bool F
+GLIBC_2.2.6 xdr_bytes F
+GLIBC_2.2.6 xdr_callhdr F
+GLIBC_2.2.6 xdr_callmsg F
+GLIBC_2.2.6 xdr_char F
+GLIBC_2.2.6 xdr_cryptkeyarg F
+GLIBC_2.2.6 xdr_cryptkeyarg2 F
+GLIBC_2.2.6 xdr_cryptkeyres F
+GLIBC_2.2.6 xdr_des_block F
+GLIBC_2.2.6 xdr_double F
+GLIBC_2.2.6 xdr_enum F
+GLIBC_2.2.6 xdr_float F
+GLIBC_2.2.6 xdr_free F
+GLIBC_2.2.6 xdr_getcredres F
+GLIBC_2.2.6 xdr_hyper F
+GLIBC_2.2.6 xdr_int F
+GLIBC_2.2.6 xdr_int16_t F
+GLIBC_2.2.6 xdr_int32_t F
+GLIBC_2.2.6 xdr_int64_t F
+GLIBC_2.2.6 xdr_int8_t F
+GLIBC_2.2.6 xdr_key_netstarg F
+GLIBC_2.2.6 xdr_key_netstres F
+GLIBC_2.2.6 xdr_keybuf F
+GLIBC_2.2.6 xdr_keystatus F
+GLIBC_2.2.6 xdr_long F
+GLIBC_2.2.6 xdr_longlong_t F
+GLIBC_2.2.6 xdr_netnamestr F
+GLIBC_2.2.6 xdr_netobj F
+GLIBC_2.2.6 xdr_opaque F
+GLIBC_2.2.6 xdr_opaque_auth F
+GLIBC_2.2.6 xdr_pmap F
+GLIBC_2.2.6 xdr_pmaplist F
+GLIBC_2.2.6 xdr_pointer F
+GLIBC_2.2.6 xdr_reference F
+GLIBC_2.2.6 xdr_rejected_reply F
+GLIBC_2.2.6 xdr_replymsg F
+GLIBC_2.2.6 xdr_rmtcall_args F
+GLIBC_2.2.6 xdr_rmtcallres F
+GLIBC_2.2.6 xdr_short F
+GLIBC_2.2.6 xdr_sizeof F
+GLIBC_2.2.6 xdr_string F
+GLIBC_2.2.6 xdr_u_char F
+GLIBC_2.2.6 xdr_u_hyper F
+GLIBC_2.2.6 xdr_u_int F
+GLIBC_2.2.6 xdr_u_long F
+GLIBC_2.2.6 xdr_u_longlong_t F
+GLIBC_2.2.6 xdr_u_short F
+GLIBC_2.2.6 xdr_uint16_t F
+GLIBC_2.2.6 xdr_uint32_t F
+GLIBC_2.2.6 xdr_uint64_t F
+GLIBC_2.2.6 xdr_uint8_t F
+GLIBC_2.2.6 xdr_union F
+GLIBC_2.2.6 xdr_unixcred F
+GLIBC_2.2.6 xdr_vector F
+GLIBC_2.2.6 xdr_void F
+GLIBC_2.2.6 xdr_wrapstring F
+GLIBC_2.2.6 xdrmem_create F
+GLIBC_2.2.6 xdrrec_create F
+GLIBC_2.2.6 xdrrec_endofrecord F
+GLIBC_2.2.6 xdrrec_eof F
+GLIBC_2.2.6 xdrrec_skiprecord F
+GLIBC_2.2.6 xdrstdio_create F
+GLIBC_2.2.6 xencrypt F
+GLIBC_2.2.6 xprt_register F
+GLIBC_2.2.6 xprt_unregister F
+GLIBC_2.21 __mach_host_self_ D 0x4
+GLIBC_2.21 __pthread_get_cleanup_stack F
+GLIBC_2.21 pthread_attr_destroy F
+GLIBC_2.21 pthread_attr_getdetachstate F
+GLIBC_2.21 pthread_attr_getinheritsched F
+GLIBC_2.21 pthread_attr_getschedparam F
+GLIBC_2.21 pthread_attr_getschedpolicy F
+GLIBC_2.21 pthread_attr_getscope F
+GLIBC_2.21 pthread_attr_init F
+GLIBC_2.21 pthread_attr_setdetachstate F
+GLIBC_2.21 pthread_attr_setinheritsched F
+GLIBC_2.21 pthread_attr_setschedparam F
+GLIBC_2.21 pthread_attr_setschedpolicy F
+GLIBC_2.21 pthread_attr_setscope F
+GLIBC_2.21 pthread_cond_broadcast F
+GLIBC_2.21 pthread_cond_destroy F
+GLIBC_2.21 pthread_cond_init F
+GLIBC_2.21 pthread_cond_signal F
+GLIBC_2.21 pthread_cond_timedwait F
+GLIBC_2.21 pthread_cond_wait F
+GLIBC_2.21 pthread_condattr_destroy F
+GLIBC_2.21 pthread_condattr_init F
+GLIBC_2.21 pthread_equal F
+GLIBC_2.21 pthread_exit F
+GLIBC_2.21 pthread_getschedparam F
+GLIBC_2.21 pthread_mutex_destroy F
+GLIBC_2.21 pthread_mutex_init F
+GLIBC_2.21 pthread_mutex_lock F
+GLIBC_2.21 pthread_mutex_unlock F
+GLIBC_2.21 pthread_self F
+GLIBC_2.21 pthread_setcancelstate F
+GLIBC_2.21 pthread_setcanceltype F
+GLIBC_2.21 pthread_setschedparam F
+GLIBC_2.22 __register_atfork F
+GLIBC_2.22 fmemopen F
+GLIBC_2.23 fts64_children F
+GLIBC_2.23 fts64_close F
+GLIBC_2.23 fts64_open F
+GLIBC_2.23 fts64_read F
+GLIBC_2.23 fts64_set F
+GLIBC_2.24 quick_exit F
+GLIBC_2.25 __explicit_bzero_chk F
+GLIBC_2.25 explicit_bzero F
+GLIBC_2.25 getentropy F
+GLIBC_2.25 getrandom F
+GLIBC_2.25 gnu_dev_major F
+GLIBC_2.25 gnu_dev_makedev F
+GLIBC_2.25 gnu_dev_minor F
+GLIBC_2.25 strfromd F
+GLIBC_2.25 strfromf F
+GLIBC_2.25 strfroml F
+GLIBC_2.26 __strtof128_internal F
+GLIBC_2.26 __wcstof128_internal F
+GLIBC_2.26 _hurd_exec_paths F
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
+GLIBC_2.26 reallocarray F
+GLIBC_2.26 strfromf128 F
+GLIBC_2.26 strtof128 F
+GLIBC_2.26 strtof128_l F
+GLIBC_2.26 wcstof128 F
+GLIBC_2.26 wcstof128_l F
+GLIBC_2.27 __hurd_dfail F
+GLIBC_2.27 __hurd_sockfail F
+GLIBC_2.27 _hurd_fd_error F
+GLIBC_2.27 _hurd_fd_error_signal F
+GLIBC_2.27 _hurd_port_locked_set F
+GLIBC_2.27 _hurd_userlink_clear F
+GLIBC_2.27 _hurd_userlink_link F
+GLIBC_2.27 _hurd_userlink_unlink F
+GLIBC_2.27 copy_file_range F
+GLIBC_2.27 glob F
+GLIBC_2.27 glob64 F
+GLIBC_2.27 strfromf32 F
+GLIBC_2.27 strfromf32x F
+GLIBC_2.27 strfromf64 F
+GLIBC_2.27 strfromf64x F
+GLIBC_2.27 strtof32 F
+GLIBC_2.27 strtof32_l F
+GLIBC_2.27 strtof32x F
+GLIBC_2.27 strtof32x_l F
+GLIBC_2.27 strtof64 F
+GLIBC_2.27 strtof64_l F
+GLIBC_2.27 strtof64x F
+GLIBC_2.27 strtof64x_l F
+GLIBC_2.27 wcstof32 F
+GLIBC_2.27 wcstof32_l F
+GLIBC_2.27 wcstof32x F
+GLIBC_2.27 wcstof32x_l F
+GLIBC_2.27 wcstof64 F
+GLIBC_2.27 wcstof64_l F
+GLIBC_2.27 wcstof64x F
+GLIBC_2.27 wcstof64x_l F
+GLIBC_2.28 fcntl64 F
+GLIBC_2.28 renameat2 F
+GLIBC_2.28 statx F
+GLIBC_2.3 __ctype_b_loc F
+GLIBC_2.3 __ctype_tolower_loc F
+GLIBC_2.3 __ctype_toupper_loc F
+GLIBC_2.3 __isctype F
+GLIBC_2.3 __strftime_l F
+GLIBC_2.3 __uselocale F
+GLIBC_2.3 __wcsftime_l F
+GLIBC_2.3 duplocale F
+GLIBC_2.3 fgetxattr F
+GLIBC_2.3 flistxattr F
+GLIBC_2.3 freeifaddrs F
+GLIBC_2.3 freelocale F
+GLIBC_2.3 fremovexattr F
+GLIBC_2.3 fsetxattr F
+GLIBC_2.3 futimes F
+GLIBC_2.3 getifaddrs F
+GLIBC_2.3 getxattr F
+GLIBC_2.3 isalnum_l F
+GLIBC_2.3 isalpha_l F
+GLIBC_2.3 isblank_l F
+GLIBC_2.3 iscntrl_l F
+GLIBC_2.3 isctype F
+GLIBC_2.3 isdigit_l F
+GLIBC_2.3 isgraph_l F
+GLIBC_2.3 islower_l F
+GLIBC_2.3 isprint_l F
+GLIBC_2.3 ispunct_l F
+GLIBC_2.3 isspace_l F
+GLIBC_2.3 isupper_l F
+GLIBC_2.3 iswalnum_l F
+GLIBC_2.3 iswalpha_l F
+GLIBC_2.3 iswblank_l F
+GLIBC_2.3 iswcntrl_l F
+GLIBC_2.3 iswctype_l F
+GLIBC_2.3 iswdigit_l F
+GLIBC_2.3 iswgraph_l F
+GLIBC_2.3 iswlower_l F
+GLIBC_2.3 iswprint_l F
+GLIBC_2.3 iswpunct_l F
+GLIBC_2.3 iswspace_l F
+GLIBC_2.3 iswupper_l F
+GLIBC_2.3 iswxdigit_l F
+GLIBC_2.3 isxdigit_l F
+GLIBC_2.3 lgetxattr F
+GLIBC_2.3 listxattr F
+GLIBC_2.3 llistxattr F
+GLIBC_2.3 lremovexattr F
+GLIBC_2.3 lsetxattr F
+GLIBC_2.3 lutimes F
+GLIBC_2.3 newlocale F
+GLIBC_2.3 nl_langinfo_l F
+GLIBC_2.3 realpath F
+GLIBC_2.3 removexattr F
+GLIBC_2.3 sendfile64 F
+GLIBC_2.3 setxattr F
+GLIBC_2.3 strcasecmp_l F
+GLIBC_2.3 strcoll_l F
+GLIBC_2.3 strfmon_l F
+GLIBC_2.3 strftime_l F
+GLIBC_2.3 strncasecmp_l F
+GLIBC_2.3 strtod_l F
+GLIBC_2.3 strtof_l F
+GLIBC_2.3 strtol_l F
+GLIBC_2.3 strtold_l F
+GLIBC_2.3 strtoll_l F
+GLIBC_2.3 strtoul_l F
+GLIBC_2.3 strtoull_l F
+GLIBC_2.3 strxfrm_l F
+GLIBC_2.3 tolower_l F
+GLIBC_2.3 toupper_l F
+GLIBC_2.3 towctrans_l F
+GLIBC_2.3 towlower_l F
+GLIBC_2.3 towupper_l F
+GLIBC_2.3 uselocale F
+GLIBC_2.3 wcscasecmp_l F
+GLIBC_2.3 wcscoll_l F
+GLIBC_2.3 wcsftime_l F
+GLIBC_2.3 wcsncasecmp_l F
+GLIBC_2.3 wcstod_l F
+GLIBC_2.3 wcstof_l F
+GLIBC_2.3 wcstol_l F
+GLIBC_2.3 wcstold_l F
+GLIBC_2.3 wcstoll_l F
+GLIBC_2.3 wcstoul_l F
+GLIBC_2.3 wcstoull_l F
+GLIBC_2.3 wcsxfrm_l F
+GLIBC_2.3 wctrans_l F
+GLIBC_2.3 wctype_l F
+GLIBC_2.3.2 getresgid F
+GLIBC_2.3.2 getresuid F
+GLIBC_2.3.2 lchmod F
+GLIBC_2.3.2 setresgid F
+GLIBC_2.3.2 setresuid F
+GLIBC_2.3.2 strptime_l F
+GLIBC_2.3.3 inet6_option_alloc F
+GLIBC_2.3.3 inet6_option_append F
+GLIBC_2.3.3 inet6_option_find F
+GLIBC_2.3.3 inet6_option_init F
+GLIBC_2.3.3 inet6_option_next F
+GLIBC_2.3.3 inet6_option_space F
+GLIBC_2.3.3 nftw F
+GLIBC_2.3.3 nftw64 F
+GLIBC_2.3.3 posix_fallocate64 F
+GLIBC_2.3.3 remap_file_pages F
+GLIBC_2.3.3 sched_getaffinity F
+GLIBC_2.3.3 sched_setaffinity F
+GLIBC_2.3.3 semtimedop F
+GLIBC_2.3.4 __chk_fail F
+GLIBC_2.3.4 __fprintf_chk F
+GLIBC_2.3.4 __gets_chk F
+GLIBC_2.3.4 __memcpy_chk F
+GLIBC_2.3.4 __memmove_chk F
+GLIBC_2.3.4 __mempcpy_chk F
+GLIBC_2.3.4 __memset_chk F
+GLIBC_2.3.4 __printf_chk F
+GLIBC_2.3.4 __snprintf_chk F
+GLIBC_2.3.4 __sprintf_chk F
+GLIBC_2.3.4 __stpcpy_chk F
+GLIBC_2.3.4 __strcat_chk F
+GLIBC_2.3.4 __strcpy_chk F
+GLIBC_2.3.4 __strncat_chk F
+GLIBC_2.3.4 __strncpy_chk F
+GLIBC_2.3.4 __vfprintf_chk F
+GLIBC_2.3.4 __vprintf_chk F
+GLIBC_2.3.4 __vsnprintf_chk F
+GLIBC_2.3.4 __vsprintf_chk F
+GLIBC_2.3.4 __xpg_strerror_r F
+GLIBC_2.3.4 getipv4sourcefilter F
+GLIBC_2.3.4 getsourcefilter F
+GLIBC_2.3.4 regexec F
+GLIBC_2.3.4 setipv4sourcefilter F
+GLIBC_2.3.4 setsourcefilter F
+GLIBC_2.3.4 xdr_quad_t F
+GLIBC_2.3.4 xdr_u_quad_t F
+GLIBC_2.4 __confstr_chk F
+GLIBC_2.4 __fgets_chk F
+GLIBC_2.4 __fgets_unlocked_chk F
+GLIBC_2.4 __fgetws_chk F
+GLIBC_2.4 __fgetws_unlocked_chk F
+GLIBC_2.4 __fwprintf_chk F
+GLIBC_2.4 __fxstatat F
+GLIBC_2.4 __fxstatat64 F
+GLIBC_2.4 __getcwd_chk F
+GLIBC_2.4 __getdomainname_chk F
+GLIBC_2.4 __getgroups_chk F
+GLIBC_2.4 __gethostname_chk F
+GLIBC_2.4 __getlogin_r_chk F
+GLIBC_2.4 __getwd_chk F
+GLIBC_2.4 __mbsnrtowcs_chk F
+GLIBC_2.4 __mbsrtowcs_chk F
+GLIBC_2.4 __mbstowcs_chk F
+GLIBC_2.4 __pread64_chk F
+GLIBC_2.4 __pread_chk F
+GLIBC_2.4 __ptsname_r_chk F
+GLIBC_2.4 __read_chk F
+GLIBC_2.4 __readlink_chk F
+GLIBC_2.4 __realpath_chk F
+GLIBC_2.4 __recv_chk F
+GLIBC_2.4 __recvfrom_chk F
+GLIBC_2.4 __stack_chk_fail F
+GLIBC_2.4 __stpncpy_chk F
+GLIBC_2.4 __swprintf_chk F
+GLIBC_2.4 __syslog_chk F
+GLIBC_2.4 __ttyname_r_chk F
+GLIBC_2.4 __vfwprintf_chk F
+GLIBC_2.4 __vswprintf_chk F
+GLIBC_2.4 __vsyslog_chk F
+GLIBC_2.4 __vwprintf_chk F
+GLIBC_2.4 __wcpcpy_chk F
+GLIBC_2.4 __wcpncpy_chk F
+GLIBC_2.4 __wcrtomb_chk F
+GLIBC_2.4 __wcscat_chk F
+GLIBC_2.4 __wcscpy_chk F
+GLIBC_2.4 __wcsncat_chk F
+GLIBC_2.4 __wcsncpy_chk F
+GLIBC_2.4 __wcsnrtombs_chk F
+GLIBC_2.4 __wcsrtombs_chk F
+GLIBC_2.4 __wcstombs_chk F
+GLIBC_2.4 __wctomb_chk F
+GLIBC_2.4 __wmemcpy_chk F
+GLIBC_2.4 __wmemmove_chk F
+GLIBC_2.4 __wmempcpy_chk F
+GLIBC_2.4 __wmemset_chk F
+GLIBC_2.4 __wprintf_chk F
+GLIBC_2.4 __xmknodat F
+GLIBC_2.4 eaccess F
+GLIBC_2.4 faccessat F
+GLIBC_2.4 fchmodat F
+GLIBC_2.4 fchownat F
+GLIBC_2.4 fdopendir F
+GLIBC_2.4 futimesat F
+GLIBC_2.4 linkat F
+GLIBC_2.4 mkdirat F
+GLIBC_2.4 mkfifoat F
+GLIBC_2.4 open_wmemstream F
+GLIBC_2.4 openat F
+GLIBC_2.4 openat64 F
+GLIBC_2.4 ppoll F
+GLIBC_2.4 readlinkat F
+GLIBC_2.4 renameat F
+GLIBC_2.4 symlinkat F
+GLIBC_2.4 unlinkat F
+GLIBC_2.5 __readlinkat_chk F
+GLIBC_2.5 inet6_opt_append F
+GLIBC_2.5 inet6_opt_find F
+GLIBC_2.5 inet6_opt_finish F
+GLIBC_2.5 inet6_opt_get_val F
+GLIBC_2.5 inet6_opt_init F
+GLIBC_2.5 inet6_opt_next F
+GLIBC_2.5 inet6_opt_set_val F
+GLIBC_2.5 inet6_rth_add F
+GLIBC_2.5 inet6_rth_getaddr F
+GLIBC_2.5 inet6_rth_init F
+GLIBC_2.5 inet6_rth_reverse F
+GLIBC_2.5 inet6_rth_segments F
+GLIBC_2.5 inet6_rth_space F
+GLIBC_2.6 __sched_cpucount F
+GLIBC_2.6 futimens F
+GLIBC_2.6 strerror_l F
+GLIBC_2.6 utimensat F
+GLIBC_2.7 __fread_chk F
+GLIBC_2.7 __fread_unlocked_chk F
+GLIBC_2.7 __isoc99_fscanf F
+GLIBC_2.7 __isoc99_fwscanf F
+GLIBC_2.7 __isoc99_scanf F
+GLIBC_2.7 __isoc99_sscanf F
+GLIBC_2.7 __isoc99_swscanf F
+GLIBC_2.7 __isoc99_vfscanf F
+GLIBC_2.7 __isoc99_vfwscanf F
+GLIBC_2.7 __isoc99_vscanf F
+GLIBC_2.7 __isoc99_vsscanf F
+GLIBC_2.7 __isoc99_vswscanf F
+GLIBC_2.7 __isoc99_vwscanf F
+GLIBC_2.7 __isoc99_wscanf F
+GLIBC_2.7 __open64_2 F
+GLIBC_2.7 __open_2 F
+GLIBC_2.7 __openat64_2 F
+GLIBC_2.7 __openat_2 F
+GLIBC_2.7 __sched_cpualloc F
+GLIBC_2.7 __sched_cpufree F
+GLIBC_2.7 mkostemp F
+GLIBC_2.7 mkostemp64 F
+GLIBC_2.8 __asprintf_chk F
+GLIBC_2.8 __dprintf_chk F
+GLIBC_2.8 __obstack_printf_chk F
+GLIBC_2.8 __obstack_vprintf_chk F
+GLIBC_2.8 __vasprintf_chk F
+GLIBC_2.8 __vdprintf_chk F
+GLIBC_2.8 qsort_r F
+GLIBC_2.9 dup3 F
+GLIBC_2.9 pipe2 F
+HURD_CTHREADS_0.3 __cthread_getspecific F
+HURD_CTHREADS_0.3 __cthread_keycreate F
+HURD_CTHREADS_0.3 __cthread_setspecific F
+HURD_CTHREADS_0.3 __mutex_init F
+HURD_CTHREADS_0.3 __mutex_lock F
+HURD_CTHREADS_0.3 __mutex_lock_solid F
+HURD_CTHREADS_0.3 __mutex_trylock F
+HURD_CTHREADS_0.3 __mutex_unlock F
+HURD_CTHREADS_0.3 __mutex_unlock_solid F
+HURD_CTHREADS_0.3 __spin_lock F
+HURD_CTHREADS_0.3 __spin_lock_init F
+HURD_CTHREADS_0.3 __spin_lock_solid F
+HURD_CTHREADS_0.3 __spin_try_lock F
+HURD_CTHREADS_0.3 __spin_unlock F
+HURD_CTHREADS_0.3 _cthread_exit_routine D 0x4
diff --git a/sysdeps/mach/hurd/i386/libcrypt.abilist b/sysdeps/mach/hurd/i386/libcrypt.abilist
new file mode 100644
index 0000000000..5cd9b78d1e
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/libcrypt.abilist
@@ -0,0 +1,7 @@
+GLIBC_2.2.6 crypt F
+GLIBC_2.2.6 crypt_r F
+GLIBC_2.2.6 encrypt F
+GLIBC_2.2.6 encrypt_r F
+GLIBC_2.2.6 fcrypt F
+GLIBC_2.2.6 setkey F
+GLIBC_2.2.6 setkey_r F
diff --git a/sysdeps/mach/hurd/i386/libdl.abilist b/sysdeps/mach/hurd/i386/libdl.abilist
new file mode 100644
index 0000000000..27d133bb7b
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/libdl.abilist
@@ -0,0 +1,9 @@
+GLIBC_2.2.6 dladdr F
+GLIBC_2.2.6 dlclose F
+GLIBC_2.2.6 dlerror F
+GLIBC_2.2.6 dlopen F
+GLIBC_2.2.6 dlsym F
+GLIBC_2.2.6 dlvsym F
+GLIBC_2.3.3 dladdr1 F
+GLIBC_2.3.3 dlinfo F
+GLIBC_2.3.4 dlmopen F
diff --git a/sysdeps/mach/hurd/i386/libm.abilist b/sysdeps/mach/hurd/i386/libm.abilist
new file mode 100644
index 0000000000..fd0a277bdc
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/libm.abilist
@@ -0,0 +1,1070 @@
+GLIBC_2.15 __acos_finite F
+GLIBC_2.15 __acosf_finite F
+GLIBC_2.15 __acosh_finite F
+GLIBC_2.15 __acoshf_finite F
+GLIBC_2.15 __acoshl_finite F
+GLIBC_2.15 __acosl_finite F
+GLIBC_2.15 __asin_finite F
+GLIBC_2.15 __asinf_finite F
+GLIBC_2.15 __asinl_finite F
+GLIBC_2.15 __atan2_finite F
+GLIBC_2.15 __atan2f_finite F
+GLIBC_2.15 __atan2l_finite F
+GLIBC_2.15 __atanh_finite F
+GLIBC_2.15 __atanhf_finite F
+GLIBC_2.15 __atanhl_finite F
+GLIBC_2.15 __cosh_finite F
+GLIBC_2.15 __coshf_finite F
+GLIBC_2.15 __coshl_finite F
+GLIBC_2.15 __exp10_finite F
+GLIBC_2.15 __exp10f_finite F
+GLIBC_2.15 __exp10l_finite F
+GLIBC_2.15 __exp2_finite F
+GLIBC_2.15 __exp2f_finite F
+GLIBC_2.15 __exp2l_finite F
+GLIBC_2.15 __exp_finite F
+GLIBC_2.15 __expf_finite F
+GLIBC_2.15 __expl_finite F
+GLIBC_2.15 __fmod_finite F
+GLIBC_2.15 __fmodf_finite F
+GLIBC_2.15 __fmodl_finite F
+GLIBC_2.15 __gamma_r_finite F
+GLIBC_2.15 __gammaf_r_finite F
+GLIBC_2.15 __gammal_r_finite F
+GLIBC_2.15 __hypot_finite F
+GLIBC_2.15 __hypotf_finite F
+GLIBC_2.15 __hypotl_finite F
+GLIBC_2.15 __j0_finite F
+GLIBC_2.15 __j0f_finite F
+GLIBC_2.15 __j0l_finite F
+GLIBC_2.15 __j1_finite F
+GLIBC_2.15 __j1f_finite F
+GLIBC_2.15 __j1l_finite F
+GLIBC_2.15 __jn_finite F
+GLIBC_2.15 __jnf_finite F
+GLIBC_2.15 __jnl_finite F
+GLIBC_2.15 __lgamma_r_finite F
+GLIBC_2.15 __lgammaf_r_finite F
+GLIBC_2.15 __lgammal_r_finite F
+GLIBC_2.15 __log10_finite F
+GLIBC_2.15 __log10f_finite F
+GLIBC_2.15 __log10l_finite F
+GLIBC_2.15 __log2_finite F
+GLIBC_2.15 __log2f_finite F
+GLIBC_2.15 __log2l_finite F
+GLIBC_2.15 __log_finite F
+GLIBC_2.15 __logf_finite F
+GLIBC_2.15 __logl_finite F
+GLIBC_2.15 __pow_finite F
+GLIBC_2.15 __powf_finite F
+GLIBC_2.15 __powl_finite F
+GLIBC_2.15 __remainder_finite F
+GLIBC_2.15 __remainderf_finite F
+GLIBC_2.15 __remainderl_finite F
+GLIBC_2.15 __scalb_finite F
+GLIBC_2.15 __scalbf_finite F
+GLIBC_2.15 __scalbl_finite F
+GLIBC_2.15 __sinh_finite F
+GLIBC_2.15 __sinhf_finite F
+GLIBC_2.15 __sinhl_finite F
+GLIBC_2.15 __sqrt_finite F
+GLIBC_2.15 __sqrtf_finite F
+GLIBC_2.15 __sqrtl_finite F
+GLIBC_2.15 __y0_finite F
+GLIBC_2.15 __y0f_finite F
+GLIBC_2.15 __y0l_finite F
+GLIBC_2.15 __y1_finite F
+GLIBC_2.15 __y1f_finite F
+GLIBC_2.15 __y1l_finite F
+GLIBC_2.15 __yn_finite F
+GLIBC_2.15 __ynf_finite F
+GLIBC_2.15 __ynl_finite F
+GLIBC_2.18 __issignaling F
+GLIBC_2.18 __issignalingf F
+GLIBC_2.18 __issignalingl F
+GLIBC_2.2.6 _LIB_VERSION D 0x4
+GLIBC_2.2.6 __clog10 F
+GLIBC_2.2.6 __clog10f F
+GLIBC_2.2.6 __clog10l F
+GLIBC_2.2.6 __expl F
+GLIBC_2.2.6 __expm1l F
+GLIBC_2.2.6 __finite F
+GLIBC_2.2.6 __finitef F
+GLIBC_2.2.6 __finitel F
+GLIBC_2.2.6 __fpclassify F
+GLIBC_2.2.6 __fpclassifyf F
+GLIBC_2.2.6 __fpclassifyl F
+GLIBC_2.2.6 __signbit F
+GLIBC_2.2.6 __signbitf F
+GLIBC_2.2.6 __signbitl F
+GLIBC_2.2.6 acos F
+GLIBC_2.2.6 acosf F
+GLIBC_2.2.6 acosh F
+GLIBC_2.2.6 acoshf F
+GLIBC_2.2.6 acoshl F
+GLIBC_2.2.6 acosl F
+GLIBC_2.2.6 asin F
+GLIBC_2.2.6 asinf F
+GLIBC_2.2.6 asinh F
+GLIBC_2.2.6 asinhf F
+GLIBC_2.2.6 asinhl F
+GLIBC_2.2.6 asinl F
+GLIBC_2.2.6 atan F
+GLIBC_2.2.6 atan2 F
+GLIBC_2.2.6 atan2f F
+GLIBC_2.2.6 atan2l F
+GLIBC_2.2.6 atanf F
+GLIBC_2.2.6 atanh F
+GLIBC_2.2.6 atanhf F
+GLIBC_2.2.6 atanhl F
+GLIBC_2.2.6 atanl F
+GLIBC_2.2.6 cabs F
+GLIBC_2.2.6 cabsf F
+GLIBC_2.2.6 cabsl F
+GLIBC_2.2.6 cacos F
+GLIBC_2.2.6 cacosf F
+GLIBC_2.2.6 cacosh F
+GLIBC_2.2.6 cacoshf F
+GLIBC_2.2.6 cacoshl F
+GLIBC_2.2.6 cacosl F
+GLIBC_2.2.6 carg F
+GLIBC_2.2.6 cargf F
+GLIBC_2.2.6 cargl F
+GLIBC_2.2.6 casin F
+GLIBC_2.2.6 casinf F
+GLIBC_2.2.6 casinh F
+GLIBC_2.2.6 casinhf F
+GLIBC_2.2.6 casinhl F
+GLIBC_2.2.6 casinl F
+GLIBC_2.2.6 catan F
+GLIBC_2.2.6 catanf F
+GLIBC_2.2.6 catanh F
+GLIBC_2.2.6 catanhf F
+GLIBC_2.2.6 catanhl F
+GLIBC_2.2.6 catanl F
+GLIBC_2.2.6 cbrt F
+GLIBC_2.2.6 cbrtf F
+GLIBC_2.2.6 cbrtl F
+GLIBC_2.2.6 ccos F
+GLIBC_2.2.6 ccosf F
+GLIBC_2.2.6 ccosh F
+GLIBC_2.2.6 ccoshf F
+GLIBC_2.2.6 ccoshl F
+GLIBC_2.2.6 ccosl F
+GLIBC_2.2.6 ceil F
+GLIBC_2.2.6 ceilf F
+GLIBC_2.2.6 ceill F
+GLIBC_2.2.6 cexp F
+GLIBC_2.2.6 cexpf F
+GLIBC_2.2.6 cexpl F
+GLIBC_2.2.6 cimag F
+GLIBC_2.2.6 cimagf F
+GLIBC_2.2.6 cimagl F
+GLIBC_2.2.6 clog F
+GLIBC_2.2.6 clog10 F
+GLIBC_2.2.6 clog10f F
+GLIBC_2.2.6 clog10l F
+GLIBC_2.2.6 clogf F
+GLIBC_2.2.6 clogl F
+GLIBC_2.2.6 conj F
+GLIBC_2.2.6 conjf F
+GLIBC_2.2.6 conjl F
+GLIBC_2.2.6 copysign F
+GLIBC_2.2.6 copysignf F
+GLIBC_2.2.6 copysignl F
+GLIBC_2.2.6 cos F
+GLIBC_2.2.6 cosf F
+GLIBC_2.2.6 cosh F
+GLIBC_2.2.6 coshf F
+GLIBC_2.2.6 coshl F
+GLIBC_2.2.6 cosl F
+GLIBC_2.2.6 cpow F
+GLIBC_2.2.6 cpowf F
+GLIBC_2.2.6 cpowl F
+GLIBC_2.2.6 cproj F
+GLIBC_2.2.6 cprojf F
+GLIBC_2.2.6 cprojl F
+GLIBC_2.2.6 creal F
+GLIBC_2.2.6 crealf F
+GLIBC_2.2.6 creall F
+GLIBC_2.2.6 csin F
+GLIBC_2.2.6 csinf F
+GLIBC_2.2.6 csinh F
+GLIBC_2.2.6 csinhf F
+GLIBC_2.2.6 csinhl F
+GLIBC_2.2.6 csinl F
+GLIBC_2.2.6 csqrt F
+GLIBC_2.2.6 csqrtf F
+GLIBC_2.2.6 csqrtl F
+GLIBC_2.2.6 ctan F
+GLIBC_2.2.6 ctanf F
+GLIBC_2.2.6 ctanh F
+GLIBC_2.2.6 ctanhf F
+GLIBC_2.2.6 ctanhl F
+GLIBC_2.2.6 ctanl F
+GLIBC_2.2.6 drem F
+GLIBC_2.2.6 dremf F
+GLIBC_2.2.6 dreml F
+GLIBC_2.2.6 erf F
+GLIBC_2.2.6 erfc F
+GLIBC_2.2.6 erfcf F
+GLIBC_2.2.6 erfcl F
+GLIBC_2.2.6 erff F
+GLIBC_2.2.6 erfl F
+GLIBC_2.2.6 exp F
+GLIBC_2.2.6 exp10 F
+GLIBC_2.2.6 exp10f F
+GLIBC_2.2.6 exp10l F
+GLIBC_2.2.6 exp2 F
+GLIBC_2.2.6 exp2f F
+GLIBC_2.2.6 exp2l F
+GLIBC_2.2.6 expf F
+GLIBC_2.2.6 expl F
+GLIBC_2.2.6 expm1 F
+GLIBC_2.2.6 expm1f F
+GLIBC_2.2.6 expm1l F
+GLIBC_2.2.6 fabs F
+GLIBC_2.2.6 fabsf F
+GLIBC_2.2.6 fabsl F
+GLIBC_2.2.6 fdim F
+GLIBC_2.2.6 fdimf F
+GLIBC_2.2.6 fdiml F
+GLIBC_2.2.6 feclearexcept F
+GLIBC_2.2.6 fedisableexcept F
+GLIBC_2.2.6 feenableexcept F
+GLIBC_2.2.6 fegetenv F
+GLIBC_2.2.6 fegetexcept F
+GLIBC_2.2.6 fegetexceptflag F
+GLIBC_2.2.6 fegetround F
+GLIBC_2.2.6 feholdexcept F
+GLIBC_2.2.6 feraiseexcept F
+GLIBC_2.2.6 fesetenv F
+GLIBC_2.2.6 fesetexceptflag F
+GLIBC_2.2.6 fesetround F
+GLIBC_2.2.6 fetestexcept F
+GLIBC_2.2.6 feupdateenv F
+GLIBC_2.2.6 finite F
+GLIBC_2.2.6 finitef F
+GLIBC_2.2.6 finitel F
+GLIBC_2.2.6 floor F
+GLIBC_2.2.6 floorf F
+GLIBC_2.2.6 floorl F
+GLIBC_2.2.6 fma F
+GLIBC_2.2.6 fmaf F
+GLIBC_2.2.6 fmal F
+GLIBC_2.2.6 fmax F
+GLIBC_2.2.6 fmaxf F
+GLIBC_2.2.6 fmaxl F
+GLIBC_2.2.6 fmin F
+GLIBC_2.2.6 fminf F
+GLIBC_2.2.6 fminl F
+GLIBC_2.2.6 fmod F
+GLIBC_2.2.6 fmodf F
+GLIBC_2.2.6 fmodl F
+GLIBC_2.2.6 frexp F
+GLIBC_2.2.6 frexpf F
+GLIBC_2.2.6 frexpl F
+GLIBC_2.2.6 gamma F
+GLIBC_2.2.6 gammaf F
+GLIBC_2.2.6 gammal F
+GLIBC_2.2.6 hypot F
+GLIBC_2.2.6 hypotf F
+GLIBC_2.2.6 hypotl F
+GLIBC_2.2.6 ilogb F
+GLIBC_2.2.6 ilogbf F
+GLIBC_2.2.6 ilogbl F
+GLIBC_2.2.6 j0 F
+GLIBC_2.2.6 j0f F
+GLIBC_2.2.6 j0l F
+GLIBC_2.2.6 j1 F
+GLIBC_2.2.6 j1f F
+GLIBC_2.2.6 j1l F
+GLIBC_2.2.6 jn F
+GLIBC_2.2.6 jnf F
+GLIBC_2.2.6 jnl F
+GLIBC_2.2.6 ldexp F
+GLIBC_2.2.6 ldexpf F
+GLIBC_2.2.6 ldexpl F
+GLIBC_2.2.6 lgamma F
+GLIBC_2.2.6 lgamma_r F
+GLIBC_2.2.6 lgammaf F
+GLIBC_2.2.6 lgammaf_r F
+GLIBC_2.2.6 lgammal F
+GLIBC_2.2.6 lgammal_r F
+GLIBC_2.2.6 llrint F
+GLIBC_2.2.6 llrintf F
+GLIBC_2.2.6 llrintl F
+GLIBC_2.2.6 llround F
+GLIBC_2.2.6 llroundf F
+GLIBC_2.2.6 llroundl F
+GLIBC_2.2.6 log F
+GLIBC_2.2.6 log10 F
+GLIBC_2.2.6 log10f F
+GLIBC_2.2.6 log10l F
+GLIBC_2.2.6 log1p F
+GLIBC_2.2.6 log1pf F
+GLIBC_2.2.6 log1pl F
+GLIBC_2.2.6 log2 F
+GLIBC_2.2.6 log2f F
+GLIBC_2.2.6 log2l F
+GLIBC_2.2.6 logb F
+GLIBC_2.2.6 logbf F
+GLIBC_2.2.6 logbl F
+GLIBC_2.2.6 logf F
+GLIBC_2.2.6 logl F
+GLIBC_2.2.6 lrint F
+GLIBC_2.2.6 lrintf F
+GLIBC_2.2.6 lrintl F
+GLIBC_2.2.6 lround F
+GLIBC_2.2.6 lroundf F
+GLIBC_2.2.6 lroundl F
+GLIBC_2.2.6 matherr F
+GLIBC_2.2.6 modf F
+GLIBC_2.2.6 modff F
+GLIBC_2.2.6 modfl F
+GLIBC_2.2.6 nan F
+GLIBC_2.2.6 nanf F
+GLIBC_2.2.6 nanl F
+GLIBC_2.2.6 nearbyint F
+GLIBC_2.2.6 nearbyintf F
+GLIBC_2.2.6 nearbyintl F
+GLIBC_2.2.6 nextafter F
+GLIBC_2.2.6 nextafterf F
+GLIBC_2.2.6 nextafterl F
+GLIBC_2.2.6 nexttoward F
+GLIBC_2.2.6 nexttowardf F
+GLIBC_2.2.6 nexttowardl F
+GLIBC_2.2.6 pow F
+GLIBC_2.2.6 pow10 F
+GLIBC_2.2.6 pow10f F
+GLIBC_2.2.6 pow10l F
+GLIBC_2.2.6 powf F
+GLIBC_2.2.6 powl F
+GLIBC_2.2.6 remainder F
+GLIBC_2.2.6 remainderf F
+GLIBC_2.2.6 remainderl F
+GLIBC_2.2.6 remquo F
+GLIBC_2.2.6 remquof F
+GLIBC_2.2.6 remquol F
+GLIBC_2.2.6 rint F
+GLIBC_2.2.6 rintf F
+GLIBC_2.2.6 rintl F
+GLIBC_2.2.6 round F
+GLIBC_2.2.6 roundf F
+GLIBC_2.2.6 roundl F
+GLIBC_2.2.6 scalb F
+GLIBC_2.2.6 scalbf F
+GLIBC_2.2.6 scalbl F
+GLIBC_2.2.6 scalbln F
+GLIBC_2.2.6 scalblnf F
+GLIBC_2.2.6 scalblnl F
+GLIBC_2.2.6 scalbn F
+GLIBC_2.2.6 scalbnf F
+GLIBC_2.2.6 scalbnl F
+GLIBC_2.2.6 signgam D 0x4
+GLIBC_2.2.6 significand F
+GLIBC_2.2.6 significandf F
+GLIBC_2.2.6 significandl F
+GLIBC_2.2.6 sin F
+GLIBC_2.2.6 sincos F
+GLIBC_2.2.6 sincosf F
+GLIBC_2.2.6 sincosl F
+GLIBC_2.2.6 sinf F
+GLIBC_2.2.6 sinh F
+GLIBC_2.2.6 sinhf F
+GLIBC_2.2.6 sinhl F
+GLIBC_2.2.6 sinl F
+GLIBC_2.2.6 sqrt F
+GLIBC_2.2.6 sqrtf F
+GLIBC_2.2.6 sqrtl F
+GLIBC_2.2.6 tan F
+GLIBC_2.2.6 tanf F
+GLIBC_2.2.6 tanh F
+GLIBC_2.2.6 tanhf F
+GLIBC_2.2.6 tanhl F
+GLIBC_2.2.6 tanl F
+GLIBC_2.2.6 tgamma F
+GLIBC_2.2.6 tgammaf F
+GLIBC_2.2.6 tgammal F
+GLIBC_2.2.6 trunc F
+GLIBC_2.2.6 truncf F
+GLIBC_2.2.6 truncl F
+GLIBC_2.2.6 y0 F
+GLIBC_2.2.6 y0f F
+GLIBC_2.2.6 y0l F
+GLIBC_2.2.6 y1 F
+GLIBC_2.2.6 y1f F
+GLIBC_2.2.6 y1l F
+GLIBC_2.2.6 yn F
+GLIBC_2.2.6 ynf F
+GLIBC_2.2.6 ynl F
+GLIBC_2.23 __signgam D 0x4
+GLIBC_2.23 lgamma F
+GLIBC_2.23 lgammaf F
+GLIBC_2.23 lgammal F
+GLIBC_2.24 nextdown F
+GLIBC_2.24 nextdownf F
+GLIBC_2.24 nextdownl F
+GLIBC_2.24 nextup F
+GLIBC_2.24 nextupf F
+GLIBC_2.24 nextupl F
+GLIBC_2.25 __iscanonicall F
+GLIBC_2.25 __iseqsig F
+GLIBC_2.25 __iseqsigf F
+GLIBC_2.25 __iseqsigl F
+GLIBC_2.25 canonicalize F
+GLIBC_2.25 canonicalizef F
+GLIBC_2.25 canonicalizel F
+GLIBC_2.25 fegetmode F
+GLIBC_2.25 fesetexcept F
+GLIBC_2.25 fesetmode F
+GLIBC_2.25 fetestexceptflag F
+GLIBC_2.25 fmaxmag F
+GLIBC_2.25 fmaxmagf F
+GLIBC_2.25 fmaxmagl F
+GLIBC_2.25 fminmag F
+GLIBC_2.25 fminmagf F
+GLIBC_2.25 fminmagl F
+GLIBC_2.25 fromfp F
+GLIBC_2.25 fromfpf F
+GLIBC_2.25 fromfpl F
+GLIBC_2.25 fromfpx F
+GLIBC_2.25 fromfpxf F
+GLIBC_2.25 fromfpxl F
+GLIBC_2.25 getpayload F
+GLIBC_2.25 getpayloadf F
+GLIBC_2.25 getpayloadl F
+GLIBC_2.25 llogb F
+GLIBC_2.25 llogbf F
+GLIBC_2.25 llogbl F
+GLIBC_2.25 roundeven F
+GLIBC_2.25 roundevenf F
+GLIBC_2.25 roundevenl F
+GLIBC_2.25 setpayload F
+GLIBC_2.25 setpayloadf F
+GLIBC_2.25 setpayloadl F
+GLIBC_2.25 setpayloadsig F
+GLIBC_2.25 setpayloadsigf F
+GLIBC_2.25 setpayloadsigl F
+GLIBC_2.25 totalorder F
+GLIBC_2.25 totalorderf F
+GLIBC_2.25 totalorderl F
+GLIBC_2.25 totalordermag F
+GLIBC_2.25 totalordermagf F
+GLIBC_2.25 totalordermagl F
+GLIBC_2.25 ufromfp F
+GLIBC_2.25 ufromfpf F
+GLIBC_2.25 ufromfpl F
+GLIBC_2.25 ufromfpx F
+GLIBC_2.25 ufromfpxf F
+GLIBC_2.25 ufromfpxl F
+GLIBC_2.26 __acosf128_finite F
+GLIBC_2.26 __acoshf128_finite F
+GLIBC_2.26 __asinf128_finite F
+GLIBC_2.26 __atan2f128_finite F
+GLIBC_2.26 __atanhf128_finite F
+GLIBC_2.26 __coshf128_finite F
+GLIBC_2.26 __exp10f128_finite F
+GLIBC_2.26 __exp2f128_finite F
+GLIBC_2.26 __expf128_finite F
+GLIBC_2.26 __finitef128 F
+GLIBC_2.26 __fmodf128_finite F
+GLIBC_2.26 __fpclassifyf128 F
+GLIBC_2.26 __gammaf128_r_finite F
+GLIBC_2.26 __hypotf128_finite F
+GLIBC_2.26 __iseqsigf128 F
+GLIBC_2.26 __isinff128 F
+GLIBC_2.26 __isnanf128 F
+GLIBC_2.26 __issignalingf128 F
+GLIBC_2.26 __j0f128_finite F
+GLIBC_2.26 __j1f128_finite F
+GLIBC_2.26 __jnf128_finite F
+GLIBC_2.26 __lgammaf128_r_finite F
+GLIBC_2.26 __log10f128_finite F
+GLIBC_2.26 __log2f128_finite F
+GLIBC_2.26 __logf128_finite F
+GLIBC_2.26 __powf128_finite F
+GLIBC_2.26 __remainderf128_finite F
+GLIBC_2.26 __signbitf128 F
+GLIBC_2.26 __sinhf128_finite F
+GLIBC_2.26 __sqrtf128_finite F
+GLIBC_2.26 __y0f128_finite F
+GLIBC_2.26 __y1f128_finite F
+GLIBC_2.26 __ynf128_finite F
+GLIBC_2.26 acosf128 F
+GLIBC_2.26 acoshf128 F
+GLIBC_2.26 asinf128 F
+GLIBC_2.26 asinhf128 F
+GLIBC_2.26 atan2f128 F
+GLIBC_2.26 atanf128 F
+GLIBC_2.26 atanhf128 F
+GLIBC_2.26 cabsf128 F
+GLIBC_2.26 cacosf128 F
+GLIBC_2.26 cacoshf128 F
+GLIBC_2.26 canonicalizef128 F
+GLIBC_2.26 cargf128 F
+GLIBC_2.26 casinf128 F
+GLIBC_2.26 casinhf128 F
+GLIBC_2.26 catanf128 F
+GLIBC_2.26 catanhf128 F
+GLIBC_2.26 cbrtf128 F
+GLIBC_2.26 ccosf128 F
+GLIBC_2.26 ccoshf128 F
+GLIBC_2.26 ceilf128 F
+GLIBC_2.26 cexpf128 F
+GLIBC_2.26 cimagf128 F
+GLIBC_2.26 clog10f128 F
+GLIBC_2.26 clogf128 F
+GLIBC_2.26 conjf128 F
+GLIBC_2.26 copysignf128 F
+GLIBC_2.26 cosf128 F
+GLIBC_2.26 coshf128 F
+GLIBC_2.26 cpowf128 F
+GLIBC_2.26 cprojf128 F
+GLIBC_2.26 crealf128 F
+GLIBC_2.26 csinf128 F
+GLIBC_2.26 csinhf128 F
+GLIBC_2.26 csqrtf128 F
+GLIBC_2.26 ctanf128 F
+GLIBC_2.26 ctanhf128 F
+GLIBC_2.26 erfcf128 F
+GLIBC_2.26 erff128 F
+GLIBC_2.26 exp10f128 F
+GLIBC_2.26 exp2f128 F
+GLIBC_2.26 expf128 F
+GLIBC_2.26 expm1f128 F
+GLIBC_2.26 fabsf128 F
+GLIBC_2.26 fdimf128 F
+GLIBC_2.26 floorf128 F
+GLIBC_2.26 fmaf128 F
+GLIBC_2.26 fmaxf128 F
+GLIBC_2.26 fmaxmagf128 F
+GLIBC_2.26 fminf128 F
+GLIBC_2.26 fminmagf128 F
+GLIBC_2.26 fmodf128 F
+GLIBC_2.26 frexpf128 F
+GLIBC_2.26 fromfpf128 F
+GLIBC_2.26 fromfpxf128 F
+GLIBC_2.26 getpayloadf128 F
+GLIBC_2.26 hypotf128 F
+GLIBC_2.26 ilogbf128 F
+GLIBC_2.26 j0f128 F
+GLIBC_2.26 j1f128 F
+GLIBC_2.26 jnf128 F
+GLIBC_2.26 ldexpf128 F
+GLIBC_2.26 lgammaf128 F
+GLIBC_2.26 lgammaf128_r F
+GLIBC_2.26 llogbf128 F
+GLIBC_2.26 llrintf128 F
+GLIBC_2.26 llroundf128 F
+GLIBC_2.26 log10f128 F
+GLIBC_2.26 log1pf128 F
+GLIBC_2.26 log2f128 F
+GLIBC_2.26 logbf128 F
+GLIBC_2.26 logf128 F
+GLIBC_2.26 lrintf128 F
+GLIBC_2.26 lroundf128 F
+GLIBC_2.26 modff128 F
+GLIBC_2.26 nanf128 F
+GLIBC_2.26 nearbyintf128 F
+GLIBC_2.26 nextafterf128 F
+GLIBC_2.26 nextdownf128 F
+GLIBC_2.26 nextupf128 F
+GLIBC_2.26 powf128 F
+GLIBC_2.26 remainderf128 F
+GLIBC_2.26 remquof128 F
+GLIBC_2.26 rintf128 F
+GLIBC_2.26 roundevenf128 F
+GLIBC_2.26 roundf128 F
+GLIBC_2.26 scalblnf128 F
+GLIBC_2.26 scalbnf128 F
+GLIBC_2.26 setpayloadf128 F
+GLIBC_2.26 setpayloadsigf128 F
+GLIBC_2.26 sincosf128 F
+GLIBC_2.26 sinf128 F
+GLIBC_2.26 sinhf128 F
+GLIBC_2.26 sqrtf128 F
+GLIBC_2.26 tanf128 F
+GLIBC_2.26 tanhf128 F
+GLIBC_2.26 tgammaf128 F
+GLIBC_2.26 totalorderf128 F
+GLIBC_2.26 totalordermagf128 F
+GLIBC_2.26 truncf128 F
+GLIBC_2.26 ufromfpf128 F
+GLIBC_2.26 ufromfpxf128 F
+GLIBC_2.26 y0f128 F
+GLIBC_2.26 y1f128 F
+GLIBC_2.26 ynf128 F
+GLIBC_2.27 acosf32 F
+GLIBC_2.27 acosf32x F
+GLIBC_2.27 acosf64 F
+GLIBC_2.27 acosf64x F
+GLIBC_2.27 acoshf32 F
+GLIBC_2.27 acoshf32x F
+GLIBC_2.27 acoshf64 F
+GLIBC_2.27 acoshf64x F
+GLIBC_2.27 asinf32 F
+GLIBC_2.27 asinf32x F
+GLIBC_2.27 asinf64 F
+GLIBC_2.27 asinf64x F
+GLIBC_2.27 asinhf32 F
+GLIBC_2.27 asinhf32x F
+GLIBC_2.27 asinhf64 F
+GLIBC_2.27 asinhf64x F
+GLIBC_2.27 atan2f32 F
+GLIBC_2.27 atan2f32x F
+GLIBC_2.27 atan2f64 F
+GLIBC_2.27 atan2f64x F
+GLIBC_2.27 atanf32 F
+GLIBC_2.27 atanf32x F
+GLIBC_2.27 atanf64 F
+GLIBC_2.27 atanf64x F
+GLIBC_2.27 atanhf32 F
+GLIBC_2.27 atanhf32x F
+GLIBC_2.27 atanhf64 F
+GLIBC_2.27 atanhf64x F
+GLIBC_2.27 cabsf32 F
+GLIBC_2.27 cabsf32x F
+GLIBC_2.27 cabsf64 F
+GLIBC_2.27 cabsf64x F
+GLIBC_2.27 cacosf32 F
+GLIBC_2.27 cacosf32x F
+GLIBC_2.27 cacosf64 F
+GLIBC_2.27 cacosf64x F
+GLIBC_2.27 cacoshf32 F
+GLIBC_2.27 cacoshf32x F
+GLIBC_2.27 cacoshf64 F
+GLIBC_2.27 cacoshf64x F
+GLIBC_2.27 canonicalizef32 F
+GLIBC_2.27 canonicalizef32x F
+GLIBC_2.27 canonicalizef64 F
+GLIBC_2.27 canonicalizef64x F
+GLIBC_2.27 cargf32 F
+GLIBC_2.27 cargf32x F
+GLIBC_2.27 cargf64 F
+GLIBC_2.27 cargf64x F
+GLIBC_2.27 casinf32 F
+GLIBC_2.27 casinf32x F
+GLIBC_2.27 casinf64 F
+GLIBC_2.27 casinf64x F
+GLIBC_2.27 casinhf32 F
+GLIBC_2.27 casinhf32x F
+GLIBC_2.27 casinhf64 F
+GLIBC_2.27 casinhf64x F
+GLIBC_2.27 catanf32 F
+GLIBC_2.27 catanf32x F
+GLIBC_2.27 catanf64 F
+GLIBC_2.27 catanf64x F
+GLIBC_2.27 catanhf32 F
+GLIBC_2.27 catanhf32x F
+GLIBC_2.27 catanhf64 F
+GLIBC_2.27 catanhf64x F
+GLIBC_2.27 cbrtf32 F
+GLIBC_2.27 cbrtf32x F
+GLIBC_2.27 cbrtf64 F
+GLIBC_2.27 cbrtf64x F
+GLIBC_2.27 ccosf32 F
+GLIBC_2.27 ccosf32x F
+GLIBC_2.27 ccosf64 F
+GLIBC_2.27 ccosf64x F
+GLIBC_2.27 ccoshf32 F
+GLIBC_2.27 ccoshf32x F
+GLIBC_2.27 ccoshf64 F
+GLIBC_2.27 ccoshf64x F
+GLIBC_2.27 ceilf32 F
+GLIBC_2.27 ceilf32x F
+GLIBC_2.27 ceilf64 F
+GLIBC_2.27 ceilf64x F
+GLIBC_2.27 cexpf32 F
+GLIBC_2.27 cexpf32x F
+GLIBC_2.27 cexpf64 F
+GLIBC_2.27 cexpf64x F
+GLIBC_2.27 cimagf32 F
+GLIBC_2.27 cimagf32x F
+GLIBC_2.27 cimagf64 F
+GLIBC_2.27 cimagf64x F
+GLIBC_2.27 clog10f32 F
+GLIBC_2.27 clog10f32x F
+GLIBC_2.27 clog10f64 F
+GLIBC_2.27 clog10f64x F
+GLIBC_2.27 clogf32 F
+GLIBC_2.27 clogf32x F
+GLIBC_2.27 clogf64 F
+GLIBC_2.27 clogf64x F
+GLIBC_2.27 conjf32 F
+GLIBC_2.27 conjf32x F
+GLIBC_2.27 conjf64 F
+GLIBC_2.27 conjf64x F
+GLIBC_2.27 copysignf32 F
+GLIBC_2.27 copysignf32x F
+GLIBC_2.27 copysignf64 F
+GLIBC_2.27 copysignf64x F
+GLIBC_2.27 cosf32 F
+GLIBC_2.27 cosf32x F
+GLIBC_2.27 cosf64 F
+GLIBC_2.27 cosf64x F
+GLIBC_2.27 coshf32 F
+GLIBC_2.27 coshf32x F
+GLIBC_2.27 coshf64 F
+GLIBC_2.27 coshf64x F
+GLIBC_2.27 cpowf32 F
+GLIBC_2.27 cpowf32x F
+GLIBC_2.27 cpowf64 F
+GLIBC_2.27 cpowf64x F
+GLIBC_2.27 cprojf32 F
+GLIBC_2.27 cprojf32x F
+GLIBC_2.27 cprojf64 F
+GLIBC_2.27 cprojf64x F
+GLIBC_2.27 crealf32 F
+GLIBC_2.27 crealf32x F
+GLIBC_2.27 crealf64 F
+GLIBC_2.27 crealf64x F
+GLIBC_2.27 csinf32 F
+GLIBC_2.27 csinf32x F
+GLIBC_2.27 csinf64 F
+GLIBC_2.27 csinf64x F
+GLIBC_2.27 csinhf32 F
+GLIBC_2.27 csinhf32x F
+GLIBC_2.27 csinhf64 F
+GLIBC_2.27 csinhf64x F
+GLIBC_2.27 csqrtf32 F
+GLIBC_2.27 csqrtf32x F
+GLIBC_2.27 csqrtf64 F
+GLIBC_2.27 csqrtf64x F
+GLIBC_2.27 ctanf32 F
+GLIBC_2.27 ctanf32x F
+GLIBC_2.27 ctanf64 F
+GLIBC_2.27 ctanf64x F
+GLIBC_2.27 ctanhf32 F
+GLIBC_2.27 ctanhf32x F
+GLIBC_2.27 ctanhf64 F
+GLIBC_2.27 ctanhf64x F
+GLIBC_2.27 erfcf32 F
+GLIBC_2.27 erfcf32x F
+GLIBC_2.27 erfcf64 F
+GLIBC_2.27 erfcf64x F
+GLIBC_2.27 erff32 F
+GLIBC_2.27 erff32x F
+GLIBC_2.27 erff64 F
+GLIBC_2.27 erff64x F
+GLIBC_2.27 exp10f32 F
+GLIBC_2.27 exp10f32x F
+GLIBC_2.27 exp10f64 F
+GLIBC_2.27 exp10f64x F
+GLIBC_2.27 exp2f F
+GLIBC_2.27 exp2f32 F
+GLIBC_2.27 exp2f32x F
+GLIBC_2.27 exp2f64 F
+GLIBC_2.27 exp2f64x F
+GLIBC_2.27 expf F
+GLIBC_2.27 expf32 F
+GLIBC_2.27 expf32x F
+GLIBC_2.27 expf64 F
+GLIBC_2.27 expf64x F
+GLIBC_2.27 expm1f32 F
+GLIBC_2.27 expm1f32x F
+GLIBC_2.27 expm1f64 F
+GLIBC_2.27 expm1f64x F
+GLIBC_2.27 fabsf32 F
+GLIBC_2.27 fabsf32x F
+GLIBC_2.27 fabsf64 F
+GLIBC_2.27 fabsf64x F
+GLIBC_2.27 fdimf32 F
+GLIBC_2.27 fdimf32x F
+GLIBC_2.27 fdimf64 F
+GLIBC_2.27 fdimf64x F
+GLIBC_2.27 floorf32 F
+GLIBC_2.27 floorf32x F
+GLIBC_2.27 floorf64 F
+GLIBC_2.27 floorf64x F
+GLIBC_2.27 fmaf32 F
+GLIBC_2.27 fmaf32x F
+GLIBC_2.27 fmaf64 F
+GLIBC_2.27 fmaf64x F
+GLIBC_2.27 fmaxf32 F
+GLIBC_2.27 fmaxf32x F
+GLIBC_2.27 fmaxf64 F
+GLIBC_2.27 fmaxf64x F
+GLIBC_2.27 fmaxmagf32 F
+GLIBC_2.27 fmaxmagf32x F
+GLIBC_2.27 fmaxmagf64 F
+GLIBC_2.27 fmaxmagf64x F
+GLIBC_2.27 fminf32 F
+GLIBC_2.27 fminf32x F
+GLIBC_2.27 fminf64 F
+GLIBC_2.27 fminf64x F
+GLIBC_2.27 fminmagf32 F
+GLIBC_2.27 fminmagf32x F
+GLIBC_2.27 fminmagf64 F
+GLIBC_2.27 fminmagf64x F
+GLIBC_2.27 fmodf32 F
+GLIBC_2.27 fmodf32x F
+GLIBC_2.27 fmodf64 F
+GLIBC_2.27 fmodf64x F
+GLIBC_2.27 frexpf32 F
+GLIBC_2.27 frexpf32x F
+GLIBC_2.27 frexpf64 F
+GLIBC_2.27 frexpf64x F
+GLIBC_2.27 fromfpf32 F
+GLIBC_2.27 fromfpf32x F
+GLIBC_2.27 fromfpf64 F
+GLIBC_2.27 fromfpf64x F
+GLIBC_2.27 fromfpxf32 F
+GLIBC_2.27 fromfpxf32x F
+GLIBC_2.27 fromfpxf64 F
+GLIBC_2.27 fromfpxf64x F
+GLIBC_2.27 getpayloadf32 F
+GLIBC_2.27 getpayloadf32x F
+GLIBC_2.27 getpayloadf64 F
+GLIBC_2.27 getpayloadf64x F
+GLIBC_2.27 hypotf32 F
+GLIBC_2.27 hypotf32x F
+GLIBC_2.27 hypotf64 F
+GLIBC_2.27 hypotf64x F
+GLIBC_2.27 ilogbf32 F
+GLIBC_2.27 ilogbf32x F
+GLIBC_2.27 ilogbf64 F
+GLIBC_2.27 ilogbf64x F
+GLIBC_2.27 j0f32 F
+GLIBC_2.27 j0f32x F
+GLIBC_2.27 j0f64 F
+GLIBC_2.27 j0f64x F
+GLIBC_2.27 j1f32 F
+GLIBC_2.27 j1f32x F
+GLIBC_2.27 j1f64 F
+GLIBC_2.27 j1f64x F
+GLIBC_2.27 jnf32 F
+GLIBC_2.27 jnf32x F
+GLIBC_2.27 jnf64 F
+GLIBC_2.27 jnf64x F
+GLIBC_2.27 ldexpf32 F
+GLIBC_2.27 ldexpf32x F
+GLIBC_2.27 ldexpf64 F
+GLIBC_2.27 ldexpf64x F
+GLIBC_2.27 lgammaf32 F
+GLIBC_2.27 lgammaf32_r F
+GLIBC_2.27 lgammaf32x F
+GLIBC_2.27 lgammaf32x_r F
+GLIBC_2.27 lgammaf64 F
+GLIBC_2.27 lgammaf64_r F
+GLIBC_2.27 lgammaf64x F
+GLIBC_2.27 lgammaf64x_r F
+GLIBC_2.27 llogbf32 F
+GLIBC_2.27 llogbf32x F
+GLIBC_2.27 llogbf64 F
+GLIBC_2.27 llogbf64x F
+GLIBC_2.27 llrintf32 F
+GLIBC_2.27 llrintf32x F
+GLIBC_2.27 llrintf64 F
+GLIBC_2.27 llrintf64x F
+GLIBC_2.27 llroundf32 F
+GLIBC_2.27 llroundf32x F
+GLIBC_2.27 llroundf64 F
+GLIBC_2.27 llroundf64x F
+GLIBC_2.27 log10f32 F
+GLIBC_2.27 log10f32x F
+GLIBC_2.27 log10f64 F
+GLIBC_2.27 log10f64x F
+GLIBC_2.27 log1pf32 F
+GLIBC_2.27 log1pf32x F
+GLIBC_2.27 log1pf64 F
+GLIBC_2.27 log1pf64x F
+GLIBC_2.27 log2f F
+GLIBC_2.27 log2f32 F
+GLIBC_2.27 log2f32x F
+GLIBC_2.27 log2f64 F
+GLIBC_2.27 log2f64x F
+GLIBC_2.27 logbf32 F
+GLIBC_2.27 logbf32x F
+GLIBC_2.27 logbf64 F
+GLIBC_2.27 logbf64x F
+GLIBC_2.27 logf F
+GLIBC_2.27 logf32 F
+GLIBC_2.27 logf32x F
+GLIBC_2.27 logf64 F
+GLIBC_2.27 logf64x F
+GLIBC_2.27 lrintf32 F
+GLIBC_2.27 lrintf32x F
+GLIBC_2.27 lrintf64 F
+GLIBC_2.27 lrintf64x F
+GLIBC_2.27 lroundf32 F
+GLIBC_2.27 lroundf32x F
+GLIBC_2.27 lroundf64 F
+GLIBC_2.27 lroundf64x F
+GLIBC_2.27 modff32 F
+GLIBC_2.27 modff32x F
+GLIBC_2.27 modff64 F
+GLIBC_2.27 modff64x F
+GLIBC_2.27 nanf32 F
+GLIBC_2.27 nanf32x F
+GLIBC_2.27 nanf64 F
+GLIBC_2.27 nanf64x F
+GLIBC_2.27 nearbyintf32 F
+GLIBC_2.27 nearbyintf32x F
+GLIBC_2.27 nearbyintf64 F
+GLIBC_2.27 nearbyintf64x F
+GLIBC_2.27 nextafterf32 F
+GLIBC_2.27 nextafterf32x F
+GLIBC_2.27 nextafterf64 F
+GLIBC_2.27 nextafterf64x F
+GLIBC_2.27 nextdownf32 F
+GLIBC_2.27 nextdownf32x F
+GLIBC_2.27 nextdownf64 F
+GLIBC_2.27 nextdownf64x F
+GLIBC_2.27 nextupf32 F
+GLIBC_2.27 nextupf32x F
+GLIBC_2.27 nextupf64 F
+GLIBC_2.27 nextupf64x F
+GLIBC_2.27 powf F
+GLIBC_2.27 powf32 F
+GLIBC_2.27 powf32x F
+GLIBC_2.27 powf64 F
+GLIBC_2.27 powf64x F
+GLIBC_2.27 remainderf32 F
+GLIBC_2.27 remainderf32x F
+GLIBC_2.27 remainderf64 F
+GLIBC_2.27 remainderf64x F
+GLIBC_2.27 remquof32 F
+GLIBC_2.27 remquof32x F
+GLIBC_2.27 remquof64 F
+GLIBC_2.27 remquof64x F
+GLIBC_2.27 rintf32 F
+GLIBC_2.27 rintf32x F
+GLIBC_2.27 rintf64 F
+GLIBC_2.27 rintf64x F
+GLIBC_2.27 roundevenf32 F
+GLIBC_2.27 roundevenf32x F
+GLIBC_2.27 roundevenf64 F
+GLIBC_2.27 roundevenf64x F
+GLIBC_2.27 roundf32 F
+GLIBC_2.27 roundf32x F
+GLIBC_2.27 roundf64 F
+GLIBC_2.27 roundf64x F
+GLIBC_2.27 scalblnf32 F
+GLIBC_2.27 scalblnf32x F
+GLIBC_2.27 scalblnf64 F
+GLIBC_2.27 scalblnf64x F
+GLIBC_2.27 scalbnf32 F
+GLIBC_2.27 scalbnf32x F
+GLIBC_2.27 scalbnf64 F
+GLIBC_2.27 scalbnf64x F
+GLIBC_2.27 setpayloadf32 F
+GLIBC_2.27 setpayloadf32x F
+GLIBC_2.27 setpayloadf64 F
+GLIBC_2.27 setpayloadf64x F
+GLIBC_2.27 setpayloadsigf32 F
+GLIBC_2.27 setpayloadsigf32x F
+GLIBC_2.27 setpayloadsigf64 F
+GLIBC_2.27 setpayloadsigf64x F
+GLIBC_2.27 sincosf32 F
+GLIBC_2.27 sincosf32x F
+GLIBC_2.27 sincosf64 F
+GLIBC_2.27 sincosf64x F
+GLIBC_2.27 sinf32 F
+GLIBC_2.27 sinf32x F
+GLIBC_2.27 sinf64 F
+GLIBC_2.27 sinf64x F
+GLIBC_2.27 sinhf32 F
+GLIBC_2.27 sinhf32x F
+GLIBC_2.27 sinhf64 F
+GLIBC_2.27 sinhf64x F
+GLIBC_2.27 sqrtf32 F
+GLIBC_2.27 sqrtf32x F
+GLIBC_2.27 sqrtf64 F
+GLIBC_2.27 sqrtf64x F
+GLIBC_2.27 tanf32 F
+GLIBC_2.27 tanf32x F
+GLIBC_2.27 tanf64 F
+GLIBC_2.27 tanf64x F
+GLIBC_2.27 tanhf32 F
+GLIBC_2.27 tanhf32x F
+GLIBC_2.27 tanhf64 F
+GLIBC_2.27 tanhf64x F
+GLIBC_2.27 tgammaf32 F
+GLIBC_2.27 tgammaf32x F
+GLIBC_2.27 tgammaf64 F
+GLIBC_2.27 tgammaf64x F
+GLIBC_2.27 totalorderf32 F
+GLIBC_2.27 totalorderf32x F
+GLIBC_2.27 totalorderf64 F
+GLIBC_2.27 totalorderf64x F
+GLIBC_2.27 totalordermagf32 F
+GLIBC_2.27 totalordermagf32x F
+GLIBC_2.27 totalordermagf64 F
+GLIBC_2.27 totalordermagf64x F
+GLIBC_2.27 truncf32 F
+GLIBC_2.27 truncf32x F
+GLIBC_2.27 truncf64 F
+GLIBC_2.27 truncf64x F
+GLIBC_2.27 ufromfpf32 F
+GLIBC_2.27 ufromfpf32x F
+GLIBC_2.27 ufromfpf64 F
+GLIBC_2.27 ufromfpf64x F
+GLIBC_2.27 ufromfpxf32 F
+GLIBC_2.27 ufromfpxf32x F
+GLIBC_2.27 ufromfpxf64 F
+GLIBC_2.27 ufromfpxf64x F
+GLIBC_2.27 y0f32 F
+GLIBC_2.27 y0f32x F
+GLIBC_2.27 y0f64 F
+GLIBC_2.27 y0f64x F
+GLIBC_2.27 y1f32 F
+GLIBC_2.27 y1f32x F
+GLIBC_2.27 y1f64 F
+GLIBC_2.27 y1f64x F
+GLIBC_2.27 ynf32 F
+GLIBC_2.27 ynf32x F
+GLIBC_2.27 ynf64 F
+GLIBC_2.27 ynf64x F
+GLIBC_2.28 daddl F
+GLIBC_2.28 ddivl F
+GLIBC_2.28 dmull F
+GLIBC_2.28 dsubl F
+GLIBC_2.28 f32addf128 F
+GLIBC_2.28 f32addf32x F
+GLIBC_2.28 f32addf64 F
+GLIBC_2.28 f32addf64x F
+GLIBC_2.28 f32divf128 F
+GLIBC_2.28 f32divf32x F
+GLIBC_2.28 f32divf64 F
+GLIBC_2.28 f32divf64x F
+GLIBC_2.28 f32mulf128 F
+GLIBC_2.28 f32mulf32x F
+GLIBC_2.28 f32mulf64 F
+GLIBC_2.28 f32mulf64x F
+GLIBC_2.28 f32subf128 F
+GLIBC_2.28 f32subf32x F
+GLIBC_2.28 f32subf64 F
+GLIBC_2.28 f32subf64x F
+GLIBC_2.28 f32xaddf128 F
+GLIBC_2.28 f32xaddf64 F
+GLIBC_2.28 f32xaddf64x F
+GLIBC_2.28 f32xdivf128 F
+GLIBC_2.28 f32xdivf64 F
+GLIBC_2.28 f32xdivf64x F
+GLIBC_2.28 f32xmulf128 F
+GLIBC_2.28 f32xmulf64 F
+GLIBC_2.28 f32xmulf64x F
+GLIBC_2.28 f32xsubf128 F
+GLIBC_2.28 f32xsubf64 F
+GLIBC_2.28 f32xsubf64x F
+GLIBC_2.28 f64addf128 F
+GLIBC_2.28 f64addf64x F
+GLIBC_2.28 f64divf128 F
+GLIBC_2.28 f64divf64x F
+GLIBC_2.28 f64mulf128 F
+GLIBC_2.28 f64mulf64x F
+GLIBC_2.28 f64subf128 F
+GLIBC_2.28 f64subf64x F
+GLIBC_2.28 f64xaddf128 F
+GLIBC_2.28 f64xdivf128 F
+GLIBC_2.28 f64xmulf128 F
+GLIBC_2.28 f64xsubf128 F
+GLIBC_2.28 fadd F
+GLIBC_2.28 faddl F
+GLIBC_2.28 fdiv F
+GLIBC_2.28 fdivl F
+GLIBC_2.28 fmul F
+GLIBC_2.28 fmull F
+GLIBC_2.28 fsub F
+GLIBC_2.28 fsubl F
diff --git a/sysdeps/mach/hurd/i386/libnsl.abilist b/sysdeps/mach/hurd/i386/libnsl.abilist
new file mode 100644
index 0000000000..c3979162d3
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/libnsl.abilist
@@ -0,0 +1,121 @@
+GLIBC_2.2.6 __free_fdresult F
+GLIBC_2.2.6 __nis_default_access F
+GLIBC_2.2.6 __nis_default_group F
+GLIBC_2.2.6 __nis_default_owner F
+GLIBC_2.2.6 __nis_default_ttl F
+GLIBC_2.2.6 __nis_finddirectory F
+GLIBC_2.2.6 __nis_hash F
+GLIBC_2.2.6 __nisbind_connect F
+GLIBC_2.2.6 __nisbind_create F
+GLIBC_2.2.6 __nisbind_destroy F
+GLIBC_2.2.6 __nisbind_next F
+GLIBC_2.2.6 __yp_check F
+GLIBC_2.2.6 nis_add F
+GLIBC_2.2.6 nis_add_entry F
+GLIBC_2.2.6 nis_addmember F
+GLIBC_2.2.6 nis_checkpoint F
+GLIBC_2.2.6 nis_clone_directory F
+GLIBC_2.2.6 nis_clone_object F
+GLIBC_2.2.6 nis_clone_result F
+GLIBC_2.2.6 nis_creategroup F
+GLIBC_2.2.6 nis_destroy_object F
+GLIBC_2.2.6 nis_destroygroup F
+GLIBC_2.2.6 nis_dir_cmp F
+GLIBC_2.2.6 nis_domain_of F
+GLIBC_2.2.6 nis_domain_of_r F
+GLIBC_2.2.6 nis_first_entry F
+GLIBC_2.2.6 nis_free_directory F
+GLIBC_2.2.6 nis_free_object F
+GLIBC_2.2.6 nis_free_request F
+GLIBC_2.2.6 nis_freenames F
+GLIBC_2.2.6 nis_freeresult F
+GLIBC_2.2.6 nis_freeservlist F
+GLIBC_2.2.6 nis_freetags F
+GLIBC_2.2.6 nis_getnames F
+GLIBC_2.2.6 nis_getservlist F
+GLIBC_2.2.6 nis_ismember F
+GLIBC_2.2.6 nis_leaf_of F
+GLIBC_2.2.6 nis_leaf_of_r F
+GLIBC_2.2.6 nis_lerror F
+GLIBC_2.2.6 nis_list F
+GLIBC_2.2.6 nis_local_directory F
+GLIBC_2.2.6 nis_local_group F
+GLIBC_2.2.6 nis_local_host F
+GLIBC_2.2.6 nis_local_principal F
+GLIBC_2.2.6 nis_lookup F
+GLIBC_2.2.6 nis_mkdir F
+GLIBC_2.2.6 nis_modify F
+GLIBC_2.2.6 nis_modify_entry F
+GLIBC_2.2.6 nis_name_of F
+GLIBC_2.2.6 nis_name_of_r F
+GLIBC_2.2.6 nis_next_entry F
+GLIBC_2.2.6 nis_perror F
+GLIBC_2.2.6 nis_ping F
+GLIBC_2.2.6 nis_print_directory F
+GLIBC_2.2.6 nis_print_entry F
+GLIBC_2.2.6 nis_print_group F
+GLIBC_2.2.6 nis_print_group_entry F
+GLIBC_2.2.6 nis_print_link F
+GLIBC_2.2.6 nis_print_object F
+GLIBC_2.2.6 nis_print_result F
+GLIBC_2.2.6 nis_print_rights F
+GLIBC_2.2.6 nis_print_table F
+GLIBC_2.2.6 nis_read_obj F
+GLIBC_2.2.6 nis_remove F
+GLIBC_2.2.6 nis_remove_entry F
+GLIBC_2.2.6 nis_removemember F
+GLIBC_2.2.6 nis_rmdir F
+GLIBC_2.2.6 nis_servstate F
+GLIBC_2.2.6 nis_sperrno F
+GLIBC_2.2.6 nis_sperror F
+GLIBC_2.2.6 nis_sperror_r F
+GLIBC_2.2.6 nis_stats F
+GLIBC_2.2.6 nis_verifygroup F
+GLIBC_2.2.6 nis_write_obj F
+GLIBC_2.2.6 readColdStartFile F
+GLIBC_2.2.6 writeColdStartFile F
+GLIBC_2.2.6 xdr_cback_data F
+GLIBC_2.2.6 xdr_domainname F
+GLIBC_2.2.6 xdr_keydat F
+GLIBC_2.2.6 xdr_mapname F
+GLIBC_2.2.6 xdr_obj_p F
+GLIBC_2.2.6 xdr_peername F
+GLIBC_2.2.6 xdr_valdat F
+GLIBC_2.2.6 xdr_yp_buf F
+GLIBC_2.2.6 xdr_ypall F
+GLIBC_2.2.6 xdr_ypbind_binding F
+GLIBC_2.2.6 xdr_ypbind_resp F
+GLIBC_2.2.6 xdr_ypbind_resptype F
+GLIBC_2.2.6 xdr_ypbind_setdom F
+GLIBC_2.2.6 xdr_ypdelete_args F
+GLIBC_2.2.6 xdr_ypmap_parms F
+GLIBC_2.2.6 xdr_ypmaplist F
+GLIBC_2.2.6 xdr_yppush_status F
+GLIBC_2.2.6 xdr_yppushresp_xfr F
+GLIBC_2.2.6 xdr_ypreq_key F
+GLIBC_2.2.6 xdr_ypreq_nokey F
+GLIBC_2.2.6 xdr_ypreq_xfr F
+GLIBC_2.2.6 xdr_ypresp_all F
+GLIBC_2.2.6 xdr_ypresp_key_val F
+GLIBC_2.2.6 xdr_ypresp_maplist F
+GLIBC_2.2.6 xdr_ypresp_master F
+GLIBC_2.2.6 xdr_ypresp_order F
+GLIBC_2.2.6 xdr_ypresp_val F
+GLIBC_2.2.6 xdr_ypresp_xfr F
+GLIBC_2.2.6 xdr_ypstat F
+GLIBC_2.2.6 xdr_ypupdate_args F
+GLIBC_2.2.6 xdr_ypxfrstat F
+GLIBC_2.2.6 yp_all F
+GLIBC_2.2.6 yp_bind F
+GLIBC_2.2.6 yp_first F
+GLIBC_2.2.6 yp_get_default_domain F
+GLIBC_2.2.6 yp_maplist F
+GLIBC_2.2.6 yp_master F
+GLIBC_2.2.6 yp_match F
+GLIBC_2.2.6 yp_next F
+GLIBC_2.2.6 yp_order F
+GLIBC_2.2.6 yp_unbind F
+GLIBC_2.2.6 yp_update F
+GLIBC_2.2.6 ypbinderr_string F
+GLIBC_2.2.6 yperr_string F
+GLIBC_2.2.6 ypprot_err F
diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist
new file mode 100644
index 0000000000..4c7d06d073
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/libpthread.abilist
@@ -0,0 +1,149 @@
+GLIBC_2.12 __mutex_lock_solid F
+GLIBC_2.12 __mutex_unlock_solid F
+GLIBC_2.12 __pthread_get_cleanup_stack F
+GLIBC_2.12 __pthread_key_create F
+GLIBC_2.12 __pthread_kill F
+GLIBC_2.12 __pthread_mutex_transfer_np F
+GLIBC_2.12 __pthread_self F
+GLIBC_2.12 __pthread_spin_destroy F
+GLIBC_2.12 __pthread_spin_init F
+GLIBC_2.12 __pthread_spin_lock F
+GLIBC_2.12 __pthread_spin_trylock F
+GLIBC_2.12 __pthread_spin_unlock F
+GLIBC_2.12 _cthread_init_routine D 0x4
+GLIBC_2.12 _cthreads_flockfile F
+GLIBC_2.12 _cthreads_ftrylockfile F
+GLIBC_2.12 _cthreads_funlockfile F
+GLIBC_2.12 _pthread_mutex_destroy F
+GLIBC_2.12 _pthread_mutex_init F
+GLIBC_2.12 _pthread_mutex_lock F
+GLIBC_2.12 _pthread_mutex_trylock F
+GLIBC_2.12 _pthread_mutex_unlock F
+GLIBC_2.12 _pthread_rwlock_destroy F
+GLIBC_2.12 _pthread_rwlock_init F
+GLIBC_2.12 _pthread_spin_lock F
+GLIBC_2.12 cthread_detach F
+GLIBC_2.12 cthread_fork F
+GLIBC_2.12 cthread_getspecific F
+GLIBC_2.12 cthread_keycreate F
+GLIBC_2.12 cthread_setspecific F
+GLIBC_2.12 flockfile F
+GLIBC_2.12 ftrylockfile F
+GLIBC_2.12 funlockfile F
+GLIBC_2.12 pthread_atfork F
+GLIBC_2.12 pthread_attr_destroy F
+GLIBC_2.12 pthread_attr_getdetachstate F
+GLIBC_2.12 pthread_attr_getguardsize F
+GLIBC_2.12 pthread_attr_getinheritsched F
+GLIBC_2.12 pthread_attr_getschedparam F
+GLIBC_2.12 pthread_attr_getschedpolicy F
+GLIBC_2.12 pthread_attr_getscope F
+GLIBC_2.12 pthread_attr_getstack F
+GLIBC_2.12 pthread_attr_getstackaddr F
+GLIBC_2.12 pthread_attr_getstacksize F
+GLIBC_2.12 pthread_attr_init F
+GLIBC_2.12 pthread_attr_setdetachstate F
+GLIBC_2.12 pthread_attr_setguardsize F
+GLIBC_2.12 pthread_attr_setinheritsched F
+GLIBC_2.12 pthread_attr_setschedparam F
+GLIBC_2.12 pthread_attr_setschedpolicy F
+GLIBC_2.12 pthread_attr_setscope F
+GLIBC_2.12 pthread_attr_setstack F
+GLIBC_2.12 pthread_attr_setstackaddr F
+GLIBC_2.12 pthread_attr_setstacksize F
+GLIBC_2.12 pthread_barrier_destroy F
+GLIBC_2.12 pthread_barrier_init F
+GLIBC_2.12 pthread_barrier_wait F
+GLIBC_2.12 pthread_barrierattr_destroy F
+GLIBC_2.12 pthread_barrierattr_getpshared F
+GLIBC_2.12 pthread_barrierattr_init F
+GLIBC_2.12 pthread_barrierattr_setpshared F
+GLIBC_2.12 pthread_cancel F
+GLIBC_2.12 pthread_cond_broadcast F
+GLIBC_2.12 pthread_cond_destroy F
+GLIBC_2.12 pthread_cond_init F
+GLIBC_2.12 pthread_cond_signal F
+GLIBC_2.12 pthread_cond_timedwait F
+GLIBC_2.12 pthread_cond_wait F
+GLIBC_2.12 pthread_condattr_destroy F
+GLIBC_2.12 pthread_condattr_getclock F
+GLIBC_2.12 pthread_condattr_getpshared F
+GLIBC_2.12 pthread_condattr_init F
+GLIBC_2.12 pthread_condattr_setclock F
+GLIBC_2.12 pthread_condattr_setpshared F
+GLIBC_2.12 pthread_create F
+GLIBC_2.12 pthread_detach F
+GLIBC_2.12 pthread_equal F
+GLIBC_2.12 pthread_exit F
+GLIBC_2.12 pthread_getattr_np F
+GLIBC_2.12 pthread_getconcurrency F
+GLIBC_2.12 pthread_getcpuclockid F
+GLIBC_2.12 pthread_getschedparam F
+GLIBC_2.12 pthread_getspecific F
+GLIBC_2.12 pthread_join F
+GLIBC_2.12 pthread_key_create F
+GLIBC_2.12 pthread_key_delete F
+GLIBC_2.12 pthread_kill F
+GLIBC_2.12 pthread_mutex_destroy F
+GLIBC_2.12 pthread_mutex_getprioceiling F
+GLIBC_2.12 pthread_mutex_init F
+GLIBC_2.12 pthread_mutex_lock F
+GLIBC_2.12 pthread_mutex_setprioceiling F
+GLIBC_2.12 pthread_mutex_timedlock F
+GLIBC_2.12 pthread_mutex_transfer_np F
+GLIBC_2.12 pthread_mutex_trylock F
+GLIBC_2.12 pthread_mutex_unlock F
+GLIBC_2.12 pthread_mutexattr_destroy F
+GLIBC_2.12 pthread_mutexattr_getprioceiling F
+GLIBC_2.12 pthread_mutexattr_getprotocol F
+GLIBC_2.12 pthread_mutexattr_getpshared F
+GLIBC_2.12 pthread_mutexattr_gettype F
+GLIBC_2.12 pthread_mutexattr_init F
+GLIBC_2.12 pthread_mutexattr_setprioceiling F
+GLIBC_2.12 pthread_mutexattr_setprotocol F
+GLIBC_2.12 pthread_mutexattr_setpshared F
+GLIBC_2.12 pthread_mutexattr_settype F
+GLIBC_2.12 pthread_once F
+GLIBC_2.12 pthread_rwlock_destroy F
+GLIBC_2.12 pthread_rwlock_init F
+GLIBC_2.12 pthread_rwlock_rdlock F
+GLIBC_2.12 pthread_rwlock_timedrdlock F
+GLIBC_2.12 pthread_rwlock_timedwrlock F
+GLIBC_2.12 pthread_rwlock_tryrdlock F
+GLIBC_2.12 pthread_rwlock_trywrlock F
+GLIBC_2.12 pthread_rwlock_unlock F
+GLIBC_2.12 pthread_rwlock_wrlock F
+GLIBC_2.12 pthread_rwlockattr_destroy F
+GLIBC_2.12 pthread_rwlockattr_getpshared F
+GLIBC_2.12 pthread_rwlockattr_init F
+GLIBC_2.12 pthread_rwlockattr_setpshared F
+GLIBC_2.12 pthread_self F
+GLIBC_2.12 pthread_setcancelstate F
+GLIBC_2.12 pthread_setcanceltype F
+GLIBC_2.12 pthread_setconcurrency F
+GLIBC_2.12 pthread_setschedparam F
+GLIBC_2.12 pthread_setschedprio F
+GLIBC_2.12 pthread_setspecific F
+GLIBC_2.12 pthread_sigmask F
+GLIBC_2.12 pthread_spin_destroy F
+GLIBC_2.12 pthread_spin_init F
+GLIBC_2.12 pthread_spin_lock F
+GLIBC_2.12 pthread_spin_trylock F
+GLIBC_2.12 pthread_spin_unlock F
+GLIBC_2.12 pthread_testcancel F
+GLIBC_2.12 pthread_yield F
+GLIBC_2.12 sem_close F
+GLIBC_2.12 sem_destroy F
+GLIBC_2.12 sem_getvalue F
+GLIBC_2.12 sem_init F
+GLIBC_2.12 sem_open F
+GLIBC_2.12 sem_post F
+GLIBC_2.12 sem_timedwait F
+GLIBC_2.12 sem_trywait F
+GLIBC_2.12 sem_unlink F
+GLIBC_2.12 sem_wait F
+GLIBC_2.2.6 _IO_flockfile F
+GLIBC_2.2.6 _IO_ftrylockfile F
+GLIBC_2.2.6 _IO_funlockfile F
+GLIBC_2.21 pthread_hurd_cond_timedwait_np F
+GLIBC_2.21 pthread_hurd_cond_wait_np F
diff --git a/sysdeps/mach/hurd/i386/libresolv.abilist b/sysdeps/mach/hurd/i386/libresolv.abilist
new file mode 100644
index 0000000000..e662651c8e
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/libresolv.abilist
@@ -0,0 +1,91 @@
+GLIBC_2.2.6 __b64_ntop F
+GLIBC_2.2.6 __b64_pton F
+GLIBC_2.2.6 __dn_comp F
+GLIBC_2.2.6 __dn_count_labels F
+GLIBC_2.2.6 __dn_expand F
+GLIBC_2.2.6 __dn_skipname F
+GLIBC_2.2.6 __fp_nquery F
+GLIBC_2.2.6 __fp_query F
+GLIBC_2.2.6 __fp_resstat F
+GLIBC_2.2.6 __hostalias F
+GLIBC_2.2.6 __loc_aton F
+GLIBC_2.2.6 __loc_ntoa F
+GLIBC_2.2.6 __p_cdname F
+GLIBC_2.2.6 __p_cdnname F
+GLIBC_2.2.6 __p_class F
+GLIBC_2.2.6 __p_class_syms D 0x54
+GLIBC_2.2.6 __p_fqname F
+GLIBC_2.2.6 __p_fqnname F
+GLIBC_2.2.6 __p_option F
+GLIBC_2.2.6 __p_query F
+GLIBC_2.2.6 __p_secstodate F
+GLIBC_2.2.6 __p_time F
+GLIBC_2.2.6 __p_type F
+GLIBC_2.2.6 __p_type_syms D 0x228
+GLIBC_2.2.6 __putlong F
+GLIBC_2.2.6 __putshort F
+GLIBC_2.2.6 __res_close F
+GLIBC_2.2.6 __res_dnok F
+GLIBC_2.2.6 __res_hnok F
+GLIBC_2.2.6 __res_hostalias F
+GLIBC_2.2.6 __res_isourserver F
+GLIBC_2.2.6 __res_mailok F
+GLIBC_2.2.6 __res_mkquery F
+GLIBC_2.2.6 __res_nameinquery F
+GLIBC_2.2.6 __res_nmkquery F
+GLIBC_2.2.6 __res_nquery F
+GLIBC_2.2.6 __res_nquerydomain F
+GLIBC_2.2.6 __res_nsearch F
+GLIBC_2.2.6 __res_nsend F
+GLIBC_2.2.6 __res_ownok F
+GLIBC_2.2.6 __res_queriesmatch F
+GLIBC_2.2.6 __res_query F
+GLIBC_2.2.6 __res_querydomain F
+GLIBC_2.2.6 __res_search F
+GLIBC_2.2.6 __res_send F
+GLIBC_2.2.6 __sym_ntop F
+GLIBC_2.2.6 __sym_ntos F
+GLIBC_2.2.6 __sym_ston F
+GLIBC_2.2.6 _gethtbyaddr F
+GLIBC_2.2.6 _gethtbyname F
+GLIBC_2.2.6 _gethtbyname2 F
+GLIBC_2.2.6 _gethtent F
+GLIBC_2.2.6 _getlong F
+GLIBC_2.2.6 _getshort F
+GLIBC_2.2.6 _res_opcodes D 0x40
+GLIBC_2.2.6 _sethtent F
+GLIBC_2.2.6 inet_net_ntop F
+GLIBC_2.2.6 inet_net_pton F
+GLIBC_2.2.6 inet_neta F
+GLIBC_2.2.6 res_gethostbyaddr F
+GLIBC_2.2.6 res_gethostbyname F
+GLIBC_2.2.6 res_gethostbyname2 F
+GLIBC_2.2.6 res_send_setqhook F
+GLIBC_2.2.6 res_send_setrhook F
+GLIBC_2.3.2 __p_rcode F
+GLIBC_2.9 ns_datetosecs F
+GLIBC_2.9 ns_format_ttl F
+GLIBC_2.9 ns_get16 F
+GLIBC_2.9 ns_get32 F
+GLIBC_2.9 ns_initparse F
+GLIBC_2.9 ns_makecanon F
+GLIBC_2.9 ns_msg_getflag F
+GLIBC_2.9 ns_name_compress F
+GLIBC_2.9 ns_name_ntol F
+GLIBC_2.9 ns_name_ntop F
+GLIBC_2.9 ns_name_pack F
+GLIBC_2.9 ns_name_pton F
+GLIBC_2.9 ns_name_rollback F
+GLIBC_2.9 ns_name_skip F
+GLIBC_2.9 ns_name_uncompress F
+GLIBC_2.9 ns_name_unpack F
+GLIBC_2.9 ns_parse_ttl F
+GLIBC_2.9 ns_parserr F
+GLIBC_2.9 ns_put16 F
+GLIBC_2.9 ns_put32 F
+GLIBC_2.9 ns_samedomain F
+GLIBC_2.9 ns_samename F
+GLIBC_2.9 ns_skiprr F
+GLIBC_2.9 ns_sprintrr F
+GLIBC_2.9 ns_sprintrrf F
+GLIBC_2.9 ns_subdomain F
diff --git a/sysdeps/mach/hurd/i386/librt.abilist b/sysdeps/mach/hurd/i386/librt.abilist
new file mode 100644
index 0000000000..d5fe32b3a9
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/librt.abilist
@@ -0,0 +1,42 @@
+GLIBC_2.2.6 aio_cancel F
+GLIBC_2.2.6 aio_cancel64 F
+GLIBC_2.2.6 aio_error F
+GLIBC_2.2.6 aio_error64 F
+GLIBC_2.2.6 aio_fsync F
+GLIBC_2.2.6 aio_fsync64 F
+GLIBC_2.2.6 aio_init F
+GLIBC_2.2.6 aio_read F
+GLIBC_2.2.6 aio_read64 F
+GLIBC_2.2.6 aio_return F
+GLIBC_2.2.6 aio_return64 F
+GLIBC_2.2.6 aio_suspend F
+GLIBC_2.2.6 aio_suspend64 F
+GLIBC_2.2.6 aio_write F
+GLIBC_2.2.6 aio_write64 F
+GLIBC_2.2.6 clock_getcpuclockid F
+GLIBC_2.2.6 clock_getres F
+GLIBC_2.2.6 clock_gettime F
+GLIBC_2.2.6 clock_nanosleep F
+GLIBC_2.2.6 clock_settime F
+GLIBC_2.2.6 lio_listio F
+GLIBC_2.2.6 lio_listio64 F
+GLIBC_2.2.6 shm_open F
+GLIBC_2.2.6 shm_unlink F
+GLIBC_2.2.6 timer_create F
+GLIBC_2.2.6 timer_delete F
+GLIBC_2.2.6 timer_getoverrun F
+GLIBC_2.2.6 timer_gettime F
+GLIBC_2.2.6 timer_settime F
+GLIBC_2.3.4 mq_close F
+GLIBC_2.3.4 mq_getattr F
+GLIBC_2.3.4 mq_notify F
+GLIBC_2.3.4 mq_open F
+GLIBC_2.3.4 mq_receive F
+GLIBC_2.3.4 mq_send F
+GLIBC_2.3.4 mq_setattr F
+GLIBC_2.3.4 mq_timedreceive F
+GLIBC_2.3.4 mq_timedsend F
+GLIBC_2.3.4 mq_unlink F
+GLIBC_2.4 lio_listio F
+GLIBC_2.4 lio_listio64 F
+GLIBC_2.7 __mq_open_2 F
diff --git a/sysdeps/mach/hurd/i386/libutil.abilist b/sysdeps/mach/hurd/i386/libutil.abilist
new file mode 100644
index 0000000000..1dd59e0afb
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/libutil.abilist
@@ -0,0 +1,6 @@
+GLIBC_2.2.6 forkpty F
+GLIBC_2.2.6 login F
+GLIBC_2.2.6 login_tty F
+GLIBC_2.2.6 logout F
+GLIBC_2.2.6 logwtmp F
+GLIBC_2.2.6 openpty F
diff --git a/sysdeps/mach/hurd/i386/localplt.data b/sysdeps/mach/hurd/i386/localplt.data
new file mode 100644
index 0000000000..a5b5241b84
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/localplt.data
@@ -0,0 +1,64 @@
+# See scripts/check-localplt.awk for how this file is processed.
+# PLT use is required for the malloc family and for matherr because
+# users can define their own functions and have library internals call them.
+# Linker in binutils 2.26 and newer consolidates R_X86_64_JUMP_SLOT
+# relocation with R_386_GLOB_DAT relocation against the same symbol.
+libc.so: calloc + REL R_386_GLOB_DAT
+libc.so: free + REL R_386_GLOB_DAT
+libc.so: malloc + REL R_386_GLOB_DAT
+libc.so: memalign + REL R_386_GLOB_DAT
+libc.so: realloc + REL R_386_GLOB_DAT
+libm.so: matherr + REL R_386_GLOB_DAT
+# The main malloc is interposed into the dynamic linker, for
+# allocations after the initial link (when dlopen is used).
+ld.so: malloc + REL R_386_GLOB_DAT
+ld.so: calloc + REL R_386_GLOB_DAT
+ld.so: realloc + REL R_386_GLOB_DAT
+ld.so: free + REL R_386_GLOB_DAT
+# The TLS-enabled version of these functions is interposed from libc.so.
+ld.so: _dl_signal_error + REL R_386_GLOB_DAT
+ld.so: _dl_catch_error + REL R_386_GLOB_DAT
+ld.so: _dl_signal_exception + REL R_386_GLOB_DAT
+ld.so: _dl_catch_exception + REL R_386_GLOB_DAT
+# The dynamic linker has its own versions of basic functions for initial loading
+# of shared libraries. These need to be overriden by libc once loaded.
+ld.so: __open ?
+ld.so: __open64
+ld.so: __close
+ld.so: __read
+ld.so: __write
+ld.so: __writev
+ld.so: __libc_lseek64
+ld.so: __mmap
+ld.so: __fxstat64
+ld.so: __xstat64
+#ld.so: __access
+ld.so: __access_noerrno
+ld.so: __getpid
+#ld.so: __getcwd
+ld.so: __sbrk
+ld.so: __strtoul_internal
+#ld.so: _exit
+ld.so: abort
+ld.so: _hurd_intr_rpc_mach_msg
+ld.so: __errno_location
+# rtld_hidden is currently disabled to avoid having to special-case the
+# functions above which do need a PLT. These are thus currently expected.
+ld.so: _dl_allocate_tls
+ld.so: _dl_allocate_tls_init
+ld.so: _dl_exception_create
+ld.so: _dl_exception_create_format
+ld.so: _dl_exception_free
+ld.so: _dl_find_dso_for_object
+ld.so: _dl_init_first
+ld.so: _dl_mcount
+ld.so: ___tls_get_addr
+ld.so: __tunable_get_val
+#
+# These should ideally be avoided, but is currently difficult
+libc.so: siglongjmp ?
+libc.so: longjmp ?
+# This is from lseek.c
+libc.so: __libc_lseek64 ?
+# This is through cleanup_region_start from vfprintf.c
+libc.so: _IO_funlockfile ?
diff --git a/sysdeps/mach/hurd/i386/longjmp-ts.c b/sysdeps/mach/hurd/i386/longjmp-ts.c
index ce2871e25e..37ac78ce5d 100644
--- a/sysdeps/mach/hurd/i386/longjmp-ts.c
+++ b/sysdeps/mach/hurd/i386/longjmp-ts.c
@@ -1,5 +1,5 @@
/* Perform a `longjmp' on a Mach thread_state. i386 version.
- Copyright (C) 1991-2016 Free Software Foundation, Inc.
+ Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/i386/makecontext-helper.c b/sysdeps/mach/hurd/i386/makecontext-helper.c
index e604488264..6db3b7e018 100644
--- a/sysdeps/mach/hurd/i386/makecontext-helper.c
+++ b/sysdeps/mach/hurd/i386/makecontext-helper.c
@@ -22,7 +22,6 @@
#include <string.h>
#include <ucontext.h>
-#if 0
void
__makecontext_helper (ucontext_t *ucp)
@@ -68,4 +67,3 @@ __makecontext_helper (ucontext_t *ucp)
ucp->uc_stack.ss_size -= t_size;
}
}
-#endif
diff --git a/sysdeps/mach/hurd/i386/makecontext.S b/sysdeps/mach/hurd/i386/makecontext.S
index b81403b04f..7f3f6b0b90 100644
--- a/sysdeps/mach/hurd/i386/makecontext.S
+++ b/sysdeps/mach/hurd/i386/makecontext.S
@@ -27,7 +27,7 @@ ENTRY(__makecontext)
subl $4, %esp
cfi_adjust_cfa_offset (4)
movl %eax, (%esp)
- /* call HIDDEN_JUMPTARGET (__makecontext_helper) */
+ call HIDDEN_JUMPTARGET (__makecontext_helper)
addl $4, %esp
cfi_adjust_cfa_offset (-4)
diff --git a/sysdeps/mach/hurd/i386/sigcontextinfo.h b/sysdeps/mach/hurd/i386/sigcontextinfo.h
index ff03b7a8bf..836ecb227f 100644
--- a/sysdeps/mach/hurd/i386/sigcontextinfo.h
+++ b/sysdeps/mach/hurd/i386/sigcontextinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2018 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
@@ -16,9 +16,4 @@
<http://www.gnu.org/licenses/>. */
#define SIGCONTEXT struct sigcontext
-#define SIGCONTEXT_EXTRA_ARGS
#define GET_PC(ctx) ((void *) (ctx).sc_eip)
-#define GET_FRAME(ctx) ((void *) (ctx).sc_ebp)
-#define GET_STACK(ctx) ((void *) (ctx).sc_uesp)
-#define CALL_SIGHANDLER(handler, signo, ctx) \
- (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/mach/hurd/i386/signal-defines.sym b/sysdeps/mach/hurd/i386/signal-defines.sym
index 9521bd723c..e42bbbe061 100644
--- a/sysdeps/mach/hurd/i386/signal-defines.sym
+++ b/sysdeps/mach/hurd/i386/signal-defines.sym
@@ -5,6 +5,6 @@
HURD_SIGSTATE__SIGALTSTACK__OFFSET offsetof(struct hurd_sigstate, sigaltstack)
-SIGALTSTACK__SS_SP__OFFSET offsetof(struct sigaltstack, ss_sp)
-SIGALTSTACK__SS_SIZE__OFFSET offsetof(struct sigaltstack, ss_size)
-SIGALTSTACK__SS_FLAGS__OFFSET offsetof(struct sigaltstack, ss_flags)
+SIGALTSTACK__SS_SP__OFFSET offsetof(stack_t, ss_sp)
+SIGALTSTACK__SS_SIZE__OFFSET offsetof(stack_t, ss_size)
+SIGALTSTACK__SS_FLAGS__OFFSET offsetof(stack_t, ss_flags)
diff --git a/sysdeps/mach/hurd/i386/sigreturn.c b/sysdeps/mach/hurd/i386/sigreturn.c
index 0a3af1fdef..07633e17c8 100644
--- a/sysdeps/mach/hurd/i386/sigreturn.c
+++ b/sysdeps/mach/hurd/i386/sigreturn.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/i386/static-start.S b/sysdeps/mach/hurd/i386/static-start.S
index 320191a1a5..1df95a0a18 100644
--- a/sysdeps/mach/hurd/i386/static-start.S
+++ b/sysdeps/mach/hurd/i386/static-start.S
@@ -1,5 +1,5 @@
/* Startup code for statically linked Hurd/i386 binaries.
- Copyright (C) 1998-2016 Free Software Foundation, Inc.
+ Copyright (C) 1998-2018 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
diff --git a/sysdeps/mach/hurd/i386/sys/io.h b/sysdeps/mach/hurd/i386/sys/io.h
index b0d20b6bee..81165f00a1 100644
--- a/sysdeps/mach/hurd/i386/sys/io.h
+++ b/sysdeps/mach/hurd/i386/sys/io.h
@@ -1,5 +1,5 @@
/* Access to hardware i/o ports. GNU/x86 version.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 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
diff --git a/sysdeps/mach/hurd/i386/tls.h b/sysdeps/mach/hurd/i386/tls.h
index 1a55fdb752..da1f7b78da 100644
--- a/sysdeps/mach/hurd/i386/tls.h
+++ b/sysdeps/mach/hurd/i386/tls.h
@@ -1,5 +1,5 @@
/* Definitions for thread-local data handling. Hurd/i386 version.
- Copyright (C) 2003-2016 Free Software Foundation, Inc.
+ Copyright (C) 2003-2018 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
@@ -25,17 +25,7 @@
#ifndef __ASSEMBLER__
-/* Type for the dtv. */
-typedef union dtv
-{
- size_t counter;
- struct
- {
- void *val;
- bool is_static;
- } pointer;
-} dtv_t;
-
+# include <dl-dtv.h>
/* Type of the TCB. */
typedef struct
@@ -54,12 +44,26 @@ typedef struct
/* GCC split stack support. */
void *__private_ss;
- /* Keep this field last */
- mach_port_t reply_port; /* This thread's reply port. */
+ /* Keep this field last, so fields above can continue being compatible with
+ the Linux version. */
+ mach_port_t reply_port; /* This thread's reply port. */
struct hurd_sigstate *_hurd_sigstate;
} tcbhead_t;
#endif
+/* Return tcbhead_t from a TLS segment descriptor. */
+# define HURD_DESC_TLS(desc) \
+ ({ \
+ (tcbhead_t *) ( (desc->low_word >> 16) \
+ | ((desc->high_word & 0xff) << 16) \
+ | (desc->high_word & 0xff000000)); \
+ })
+
+/* Return 1 if TLS is not initialized yet. */
+#define __LIBC_NO_TLS() \
+ ({ unsigned short ds, gs; \
+ asm ("movw %%ds,%w0; movw %%gs,%w1" : "=q" (ds), "=q" (gs)); \
+ __builtin_expect (ds == gs, 0); })
/* The TCB can have any size and the memory following the address the
thread pointer points to is unspecified. Allocate the TCB there. */
@@ -85,8 +89,6 @@ typedef struct
# define __i386_set_gdt(thr, sel, desc) ((void) (thr), (void) (sel), (void) (desc), MIG_BAD_ID)
# endif
-#define __i386_selector_is_ldt(sel) (!!((sel) & 4))
-
# include <errno.h>
# include <assert.h>
@@ -103,52 +105,49 @@ typedef struct
| (((unsigned int) (tcb)) & 0xff000000) /* base 24..31 */ \
}
-# define HURD_DESC_TLS(desc) \
- ({ \
- (tcbhead_t *) ( (desc->low_word >> 16) \
- | ((desc->high_word & 0xff) << 16) \
- | (desc->high_word & 0xff000000) \
- );})
-
-#define __LIBC_NO_TLS() \
- ({ unsigned short ds, gs; \
- asm ("movw %%ds,%w0; movw %%gs,%w1" : "=q" (ds), "=q" (gs)); \
- ds == gs; })
+# define HURD_SEL_LDT(sel) (__builtin_expect ((sel) & 4, 0))
static inline const char * __attribute__ ((unused))
_hurd_tls_init (tcbhead_t *tcb)
{
HURD_TLS_DESC_DECL (desc, tcb);
+ thread_t self = __mach_thread_self ();
+ const char *msg = NULL;
/* This field is used by TLS accesses to get our "thread pointer"
from the TLS point of view. */
tcb->tcb = tcb;
-
- /* Cache our thread port. */
- tcb->self = __mach_thread_self ();
+ /* We always at least start the sigthread anyway. */
+ tcb->multiple_threads = 1;
/* Get the first available selector. */
int sel = -1;
- error_t err = __i386_set_gdt (tcb->self, &sel, desc);
+ error_t err = __i386_set_gdt (self, &sel, desc);
if (err == MIG_BAD_ID)
{
/* Old kernel, use a per-thread LDT. */
sel = 0x27;
- err = __i386_set_ldt (tcb->self, sel, &desc, 1);
+ err = __i386_set_ldt (self, sel, &desc, 1);
assert_perror (err);
if (err)
- return "i386_set_ldt failed";
+ {
+ msg = "i386_set_ldt failed";
+ goto out;
+ }
}
else if (err)
{
assert_perror (err); /* Separate from above with different line #. */
- return "i386_set_gdt failed";
+ msg = "i386_set_gdt failed";
+ goto out;
}
/* Now install the new selector. */
asm volatile ("mov %w0, %%gs" :: "q" (sel));
- return 0;
+out:
+ __mach_port_deallocate (__mach_task_self (), self);
+ return msg;
}
/* Code to initially initialize the thread pointer. This might need
@@ -164,19 +163,20 @@ _hurd_tls_init (tcbhead_t *tcb)
: "i" (offsetof (tcbhead_t, tcb))); \
__tcb;})
-/* Return the TCB address of a thread given its state. */
+/* Return the TCB address of a thread given its state.
+ Note: this is expensive. */
# define THREAD_TCB(thread, thread_state) \
({ int __sel = (thread_state)->basic.gs; \
struct descriptor __desc, *___desc = &__desc; \
unsigned int __count = 1; \
kern_return_t __err; \
- if (__builtin_expect (__sel, 0x48) & 4) /* LDT selector */ \
+ if (HURD_SEL_LDT (__sel)) \
__err = __i386_get_ldt ((thread), __sel, 1, &___desc, &__count); \
else \
__err = __i386_get_gdt ((thread), __sel, &__desc); \
assert_perror (__err); \
assert (__count == 1); \
- HURD_DESC_TLS(___desc);})
+ HURD_DESC_TLS (___desc);})
/* Install new dtv for current thread. */
# define INSTALL_NEW_DTV(dtvp) \
@@ -205,7 +205,7 @@ _hurd_tls_fork (thread_t child, thread_t orig, struct i386_thread_state *state)
error_t err;
unsigned int count = 1;
- if (__glibc_unlikely (__i386_selector_is_ldt(sel)))
+ if (HURD_SEL_LDT (sel))
err = __i386_get_ldt (orig, sel, 1, &_desc, &count);
else
err = __i386_get_gdt (orig, sel, &desc);
@@ -214,7 +214,7 @@ _hurd_tls_fork (thread_t child, thread_t orig, struct i386_thread_state *state)
if (err)
return err;
- if (__glibc_unlikely (__i386_selector_is_ldt(sel)))
+ if (HURD_SEL_LDT (sel))
err = __i386_set_ldt (child, sel, &desc, 1);
else
err = __i386_set_gdt (child, &sel, desc);
@@ -238,7 +238,7 @@ _hurd_tls_new (thread_t child, struct i386_thread_state *state, tcbhead_t *tcb)
tcb->tcb = tcb;
tcb->self = child;
- if (__glibc_unlikely (__i386_selector_is_ldt(sel)))
+ if (HURD_SEL_LDT (sel))
err = __i386_set_ldt (child, sel, &desc, 1);
else
err = __i386_set_gdt (child, &sel, desc);
diff --git a/sysdeps/mach/hurd/i386/tlsdesc.sym b/sysdeps/mach/hurd/i386/tlsdesc.sym
new file mode 100644
index 0000000000..a358f7e325
--- /dev/null
+++ b/sysdeps/mach/hurd/i386/tlsdesc.sym
@@ -0,0 +1,19 @@
+#include <stddef.h>
+#include <sysdep.h>
+#include <tls.h>
+#include <link.h>
+#include <dl-tlsdesc.h>
+
+--
+
+-- We have to override sysdeps/i386/tlsdesc.sym to adapt to our libpthread.
+
+-- Abuse tls.h macros to derive offsets relative to the thread register.
+
+DTV_OFFSET offsetof(tcbhead_t, dtv)
+
+TLSDESC_ARG offsetof(struct tlsdesc, arg)
+
+TLSDESC_GEN_COUNT offsetof(struct tlsdesc_dynamic_arg, gen_count)
+TLSDESC_MODID offsetof(struct tlsdesc_dynamic_arg, tlsinfo.ti_module)
+TLSDESC_MODOFF offsetof(struct tlsdesc_dynamic_arg, tlsinfo.ti_offset)
diff --git a/sysdeps/mach/hurd/i386/trampoline.c b/sysdeps/mach/hurd/i386/trampoline.c
index 5de27564dd..0e795f9389 100644
--- a/sysdeps/mach/hurd/i386/trampoline.c
+++ b/sysdeps/mach/hurd/i386/trampoline.c
@@ -1,5 +1,5 @@
/* Set thread_state for sighandler, and sigcontext to recover. i386 version.
- Copyright (C) 1994-2016 Free Software Foundation, Inc.
+ Copyright (C) 1994-2018 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
diff --git a/sysdeps/mach/hurd/if_index.c b/sysdeps/mach/hurd/if_index.c
index 6479458a56..4303c938a8 100644
--- a/sysdeps/mach/hurd/if_index.c
+++ b/sysdeps/mach/hurd/if_index.c
@@ -1,5 +1,5 @@
/* Find network interface names and index numbers. Hurd version.
- Copyright (C) 2000-2016 Free Software Foundation, Inc.
+ Copyright (C) 2000-2018 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
@@ -37,6 +37,12 @@ __if_nametoindex (const char *ifname)
if (fd < 0)
return 0;
+ if (strlen (ifname) >= IFNAMSIZ)
+ {
+ __set_errno (ENODEV);
+ return 0;
+ }
+
strncpy (ifr.ifr_name, ifname, IFNAMSIZ);
if (__ioctl (fd, SIOCGIFINDEX, &ifr) < 0)
{
@@ -187,7 +193,6 @@ libc_hidden_weak (if_indextoname)
#if 0
void
-internal_function
__protocol_available (int *have_inet, int *have_inet6)
{
*have_inet = _hurd_socket_server (PF_INET, 0) != MACH_PORT_NULL;
diff --git a/sysdeps/mach/hurd/ifreq.c b/sysdeps/mach/hurd/ifreq.c
index cdbff2c3f8..70a906a83a 100644
--- a/sysdeps/mach/hurd/ifreq.c
+++ b/sysdeps/mach/hurd/ifreq.c
@@ -1,5 +1,5 @@
/* Fetch the host's network interface list. Hurd version.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 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
@@ -53,7 +53,7 @@ __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
if (len % sizeof (struct ifreq) != 0)
{
- munmap (data, len);
+ __munmap (data, len);
errno = EGRATUITOUS;
goto out;
}
diff --git a/sysdeps/mach/hurd/ifreq.h b/sysdeps/mach/hurd/ifreq.h
index fe332492e6..3ab8d858b6 100644
--- a/sysdeps/mach/hurd/ifreq.h
+++ b/sysdeps/mach/hurd/ifreq.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>.
@@ -24,21 +24,9 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
-static inline struct ifreq *
-__if_nextreq (struct ifreq *ifr)
-{
-#ifdef _HAVE_SA_LEN
- if (ifr->ifr_addr.sa_len > sizeof ifr->ifr_addr)
- return (struct ifreq *) ((char *) &ifr->ifr_addr + ifr->ifr_addr.sa_len);
-#endif
- return ifr + 1;
-}
-
-extern void __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd);
-
static inline void
__if_freereq (struct ifreq *ifreqs, int num_ifs)
{
- munmap (ifreqs, num_ifs * sizeof (struct ifreq));
+ __munmap (ifreqs, num_ifs * sizeof (struct ifreq));
}
diff --git a/sysdeps/mach/hurd/ioctl.c b/sysdeps/mach/hurd/ioctl.c
index 74b6c41c72..15b26f5bba 100644
--- a/sysdeps/mach/hurd/ioctl.c
+++ b/sysdeps/mach/hurd/ioctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
@@ -323,4 +323,5 @@ __ioctl (int fd, unsigned long int request, ...)
}
}
+libc_hidden_def (__ioctl)
weak_alias (__ioctl, ioctl)
diff --git a/sysdeps/mach/hurd/isatty.c b/sysdeps/mach/hurd/isatty.c
index 1bd062b17c..4adc8901fb 100644
--- a/sysdeps/mach/hurd/isatty.c
+++ b/sysdeps/mach/hurd/isatty.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 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
diff --git a/sysdeps/mach/hurd/jmp-unwind.c b/sysdeps/mach/hurd/jmp-unwind.c
index f74124eea9..d269f9f61b 100644
--- a/sysdeps/mach/hurd/jmp-unwind.c
+++ b/sysdeps/mach/hurd/jmp-unwind.c
@@ -1,5 +1,5 @@
/* _longjmp_unwind -- Clean up stack frames unwound by longjmp. Hurd version.
- Copyright (C) 1995-2016 Free Software Foundation, Inc.
+ Copyright (C) 1995-2018 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
diff --git a/sysdeps/mach/hurd/kernel-features.h b/sysdeps/mach/hurd/kernel-features.h
index 7de5c11b66..a13d6cdf11 100644
--- a/sysdeps/mach/hurd/kernel-features.h
+++ b/sysdeps/mach/hurd/kernel-features.h
@@ -1,5 +1,5 @@
/* Set flags signalling availability of certain operating system features.
- Copyright (C) 2012-2016 Free Software Foundation, Inc.
+ Copyright (C) 2012-2018 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
@@ -19,7 +19,3 @@
/* This file can define __ASSUME_* macros checked by certain source files.
Almost none of these are used outside of sysdeps/unix/sysv/linux code.
But those referring to POSIX-level features like O_* flags can be. */
-
-#define __ASSUME_O_CLOEXEC 1
-#define __ASSUME_DUP3 1
-#define __ASSUME_ACCEPT4 1
diff --git a/sysdeps/mach/hurd/kill.c b/sysdeps/mach/hurd/kill.c
index 3c5c0e573d..7e64e7c9d7 100644
--- a/sysdeps/mach/hurd/kill.c
+++ b/sysdeps/mach/hurd/kill.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -146,4 +146,5 @@ __kill (pid_t pid, int sig)
return delivered ? 0 : __hurd_fail (err ?: ESRCH);
}
+libc_hidden_def (__kill)
weak_alias (__kill, kill)
diff --git a/sysdeps/mach/hurd/lchmod.c b/sysdeps/mach/hurd/lchmod.c
index 7be10b7753..0fd02e86b8 100644
--- a/sysdeps/mach/hurd/lchmod.c
+++ b/sysdeps/mach/hurd/lchmod.c
@@ -1,5 +1,5 @@
/* lchmod -- Change the protections of a file or symbolic link. Hurd version.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 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
diff --git a/sysdeps/mach/hurd/lchown.c b/sysdeps/mach/hurd/lchown.c
index 147a422cee..eb5760eb18 100644
--- a/sysdeps/mach/hurd/lchown.c
+++ b/sysdeps/mach/hurd/lchown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/lgetxattr.c b/sysdeps/mach/hurd/lgetxattr.c
index f1adfb365d..ae385f8379 100644
--- a/sysdeps/mach/hurd/lgetxattr.c
+++ b/sysdeps/mach/hurd/lgetxattr.c
@@ -1,5 +1,5 @@
/* Access to extended attributes on files. Hurd version.
- Copyright (C) 2004-2016 Free Software Foundation, Inc.
+ Copyright (C) 2004-2018 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
diff --git a/sysdeps/mach/hurd/libc-lock.h b/sysdeps/mach/hurd/libc-lock.h
deleted file mode 100644
index a70f32ac12..0000000000
--- a/sysdeps/mach/hurd/libc-lock.h
+++ /dev/null
@@ -1,216 +0,0 @@
-/* libc-internal interface for mutex locks. Hurd version using Mach cthreads.
- Copyright (C) 1996-2016 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
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _LIBC_LOCK_H
-#define _LIBC_LOCK_H 1
-
-#if (_LIBC - 0) || (_CTHREADS_ - 0)
-#if (_LIBC - 0)
-#include <tls.h>
-#endif
-#include <cthreads.h>
-
-typedef struct mutex __libc_lock_t;
-typedef struct
-{
- struct mutex mutex;
- void *owner;
- int count;
-} __libc_lock_recursive_t;
-typedef __libc_lock_recursive_t __rtld_lock_recursive_t;
-
-extern char __libc_lock_self0[0];
-#define __libc_lock_owner_self() (__LIBC_NO_TLS() ? &__libc_lock_self0 : THREAD_SELF)
-
-#else
-typedef struct __libc_lock_opaque__ __libc_lock_t;
-typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
-#endif
-
-/* Define a lock variable NAME with storage class CLASS. The lock must be
- initialized with __libc_lock_init before it can be used (or define it
- with __libc_lock_define_initialized, below). Use `extern' for CLASS to
- declare a lock defined in another module. In public structure
- definitions you must use a pointer to the lock structure (i.e., NAME
- begins with a `*'), because its storage size will not be known outside
- of libc. */
-#define __libc_lock_define(CLASS,NAME) \
- CLASS __libc_lock_t NAME;
-
-/* Define an initialized lock variable NAME with storage class CLASS. */
-#define _LIBC_LOCK_INITIALIZER MUTEX_INITIALIZER
-#define __libc_lock_define_initialized(CLASS,NAME) \
- CLASS __libc_lock_t NAME = _LIBC_LOCK_INITIALIZER;
-
-/* Initialize the named lock variable, leaving it in a consistent, unlocked
- state. */
-#define __libc_lock_init(NAME) __mutex_init (&(NAME))
-
-/* Finalize the named lock variable, which must be locked. It cannot be
- used again until __libc_lock_init is called again on it. This must be
- called on a lock variable before the containing storage is reused. */
-#define __libc_lock_fini(NAME) __mutex_unlock (&(NAME))
-#define __libc_lock_fini_recursive(NAME) __mutex_unlock (&(NAME).mutex)
-#define __rtld_lock_fini_recursive(NAME) __mutex_unlock (&(NAME).mutex)
-
-
-/* Lock the named lock variable. */
-#define __libc_lock_lock(NAME) __mutex_lock (&(NAME))
-
-/* Lock the named lock variable. */
-#define __libc_lock_trylock(NAME) (!__mutex_trylock (&(NAME)))
-
-/* Unlock the named lock variable. */
-#define __libc_lock_unlock(NAME) __mutex_unlock (&(NAME))
-
-
-#define __libc_lock_define_recursive(CLASS,NAME) \
- CLASS __libc_lock_recursive_t NAME;
-#define _LIBC_LOCK_RECURSIVE_INITIALIZER { MUTEX_INITIALIZER, 0, 0 }
-#define __libc_lock_define_initialized_recursive(CLASS,NAME) \
- CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER;
-
-#define __rtld_lock_define_recursive(CLASS,NAME) \
- __libc_lock_define_recursive (CLASS, NAME)
-#define _RTLD_LOCK_RECURSIVE_INITIALIZER \
- _LIBC_LOCK_RECURSIVE_INITIALIZER
-#define __rtld_lock_define_initialized_recursive(CLASS,NAME) \
- __libc_lock_define_initialized_recursive (CLASS, NAME)
-
-#define __libc_lock_init_recursive(NAME) \
- ({ __libc_lock_recursive_t *const __lock = &(NAME); \
- __lock->owner = 0; mutex_init (&__lock->mutex); })
-
-#define __libc_lock_trylock_recursive(NAME) \
- ({ __libc_lock_recursive_t *const __lock = &(NAME); \
- void *__self = __libc_lock_owner_self (); \
- __mutex_trylock (&__lock->mutex) \
- ? (__lock->owner = __self, __lock->count = 1, 0) \
- : __lock->owner == __self ? (++__lock->count, 0) : 1; })
-
-#define __libc_lock_lock_recursive(NAME) \
- ({ __libc_lock_recursive_t *const __lock = &(NAME); \
- void *__self = __libc_lock_owner_self (); \
- if (__mutex_trylock (&__lock->mutex) \
- || (__lock->owner != __self \
- && (__mutex_lock (&__lock->mutex), 1))) \
- __lock->owner = __self, __lock->count = 1; \
- else \
- ++__lock->count; \
- })
-#define __libc_lock_unlock_recursive(NAME) \
- ({ __libc_lock_recursive_t *const __lock = &(NAME); \
- if (--__lock->count == 0) \
- { \
- __lock->owner = 0; \
- __mutex_unlock (&__lock->mutex); \
- } \
- })
-
-
-#define __rtld_lock_initialize(NAME) \
- (void) ((NAME) = (__rtld_lock_recursive_t) _RTLD_LOCK_RECURSIVE_INITIALIZER)
-#define __rtld_lock_trylock_recursive(NAME) \
- __libc_lock_trylock_recursive (NAME)
-#define __rtld_lock_lock_recursive(NAME) \
- __libc_lock_lock_recursive(NAME)
-#define __rtld_lock_unlock_recursive(NAME) \
- __libc_lock_unlock_recursive (NAME)
-
-
-/* XXX for now */
-#define __libc_rwlock_define __libc_lock_define
-#define __libc_rwlock_define_initialized __libc_lock_define_initialized
-#define __libc_rwlock_init __libc_lock_init
-#define __libc_rwlock_fini __libc_lock_fini
-#define __libc_rwlock_rdlock __libc_lock_lock
-#define __libc_rwlock_wrlock __libc_lock_lock
-#define __libc_rwlock_tryrdlock __libc_lock_trylock
-#define __libc_rwlock_trywrlock __libc_lock_trylock
-#define __libc_rwlock_unlock __libc_lock_unlock
-
-
-/* Start a critical region with a cleanup function */
-#define __libc_cleanup_region_start(DOIT, FCT, ARG) \
-{ \
- typeof (***(FCT)) *__save_FCT = (DOIT) ? (FCT) : 0; \
- typeof (ARG) __save_ARG = ARG; \
- /* close brace is in __libc_cleanup_region_end below. */
-
-/* End a critical region started with __libc_cleanup_region_start. */
-#define __libc_cleanup_region_end(DOIT) \
- if ((DOIT) && __save_FCT != 0) \
- (*__save_FCT)(__save_ARG); \
-}
-
-/* Sometimes we have to exit the block in the middle. */
-#define __libc_cleanup_end(DOIT) \
- if ((DOIT) && __save_FCT != 0) \
- (*__save_FCT)(__save_ARG); \
-
-#define __libc_cleanup_push(fct, arg) __libc_cleanup_region_start (1, fct, arg)
-#define __libc_cleanup_pop(execute) __libc_cleanup_region_end (execute)
-
-#if (_CTHREADS_ - 0)
-
-/* Use mutexes as once control variables. */
-
-struct __libc_once
- {
- __libc_lock_t lock;
- int done;
- };
-
-#define __libc_once_define(CLASS,NAME) \
- CLASS struct __libc_once NAME = { MUTEX_INITIALIZER, 0 }
-
-/* Call handler iff the first call. */
-#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \
- do { \
- __libc_lock_lock (ONCE_CONTROL.lock); \
- if (!ONCE_CONTROL.done) \
- (INIT_FUNCTION) (); \
- ONCE_CONTROL.done = 1; \
- __libc_lock_unlock (ONCE_CONTROL.lock); \
- } while (0)
-
-/* Get once control variable. */
-#define __libc_once_get(ONCE_CONTROL) ((ONCE_CONTROL).done != 0)
-
-#ifdef _LIBC
-/* We need portable names for some functions. E.g., when they are
- used as argument to __libc_cleanup_region_start. */
-#define __libc_mutex_unlock __mutex_unlock
-#endif
-
-/* Type for key of thread specific data. */
-typedef cthread_key_t __libc_key_t;
-
-#define __libc_key_create(KEY,DEST) cthread_keycreate (KEY)
-#define __libc_setspecific(KEY,VAL) cthread_setspecific (KEY, VAL)
-void *__libc_getspecific (__libc_key_t key);
-
-#endif /* _CTHREADS_ */
-
-/* Hide the definitions which are only supposed to be used inside libc in
- a separate file. This file is not present in the installation! */
-#ifdef _LIBC
-# include <libc-lockP.h>
-#endif
-
-#endif /* libc-lock.h */
diff --git a/sysdeps/mach/hurd/libc-start.h b/sysdeps/mach/hurd/libc-start.h
new file mode 100644
index 0000000000..f7e39935ce
--- /dev/null
+++ b/sysdeps/mach/hurd/libc-start.h
@@ -0,0 +1,31 @@
+/* Hurd definitions for libc main startup.
+ Copyright (C) 2017-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _LIBC_START_H
+#define _LIBC_START_H
+
+#ifndef SHARED
+/* By default we perform STT_GNU_IFUNC resolution *before* TLS
+ initialization, and this means you cannot, without machine
+ knowledge, access TLS from an IFUNC resolver. */
+#define ARCH_SETUP_IREL() apply_irel ()
+#define ARCH_SETUP_TLS()
+#define ARCH_APPLY_IREL()
+#endif /* ! SHARED */
+
+#endif /* _LIBC_START_H */
diff --git a/sysdeps/mach/hurd/libhurduser.abilist b/sysdeps/mach/hurd/libhurduser.abilist
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/sysdeps/mach/hurd/libhurduser.abilist
diff --git a/sysdeps/mach/hurd/link.c b/sysdeps/mach/hurd/link.c
index 04d160407f..f50d63cb1a 100644
--- a/sysdeps/mach/hurd/link.c
+++ b/sysdeps/mach/hurd/link.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/linkat.c b/sysdeps/mach/hurd/linkat.c
index 52371599df..e2e427cb4d 100644
--- a/sysdeps/mach/hurd/linkat.c
+++ b/sysdeps/mach/hurd/linkat.c
@@ -1,5 +1,5 @@
/* Make a link between file names relative to open directories. Hurd version.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
diff --git a/sysdeps/mach/hurd/listen.c b/sysdeps/mach/hurd/listen.c
index a2869129c7..2b2cf23eb6 100644
--- a/sysdeps/mach/hurd/listen.c
+++ b/sysdeps/mach/hurd/listen.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
diff --git a/sysdeps/mach/hurd/listxattr.c b/sysdeps/mach/hurd/listxattr.c
index 69080defdc..c1af8072c1 100644
--- a/sysdeps/mach/hurd/listxattr.c
+++ b/sysdeps/mach/hurd/listxattr.c
@@ -1,5 +1,5 @@
/* Access to extended attributes on files. Hurd version.
- Copyright (C) 2005-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005-2018 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
diff --git a/sysdeps/mach/hurd/llistxattr.c b/sysdeps/mach/hurd/llistxattr.c
index 54f6e0de13..0b3e848c7d 100644
--- a/sysdeps/mach/hurd/llistxattr.c
+++ b/sysdeps/mach/hurd/llistxattr.c
@@ -1,5 +1,5 @@
/* Access to extended attributes on files. Hurd version.
- Copyright (C) 2005-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005-2018 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
diff --git a/sysdeps/mach/hurd/lremovexattr.c b/sysdeps/mach/hurd/lremovexattr.c
index 3e7fceb9e5..a6fa830d4a 100644
--- a/sysdeps/mach/hurd/lremovexattr.c
+++ b/sysdeps/mach/hurd/lremovexattr.c
@@ -1,5 +1,5 @@
/* Access to extended attributes on files. Hurd version.
- Copyright (C) 2005-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005-2018 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
diff --git a/sysdeps/mach/hurd/lseek.c b/sysdeps/mach/hurd/lseek.c
index 25e648bc8e..0a4077268a 100644
--- a/sysdeps/mach/hurd/lseek.c
+++ b/sysdeps/mach/hurd/lseek.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -17,12 +17,22 @@
#include <unistd.h>
#include <sys/types.h>
+#include <errno.h>
/* Seek to OFFSET on FD, starting from WHENCE. */
off_t
__libc_lseek (int fd, off_t offset, int whence)
{
- return __libc_lseek64 (fd, (off64_t) offset, whence);
+ off64_t res64 = __libc_lseek64 (fd, (off64_t) offset, whence);
+ off_t res = (off_t) res64;
+
+ if (sizeof res != sizeof res64 && res != res64)
+ {
+ __set_errno (EOVERFLOW);
+ return (off_t) -1;
+ }
+
+ return res;
}
weak_alias (__libc_lseek, __lseek)
diff --git a/sysdeps/mach/hurd/lseek64.c b/sysdeps/mach/hurd/lseek64.c
index 4f112e6c2a..d058ab36ff 100644
--- a/sysdeps/mach/hurd/lseek64.c
+++ b/sysdeps/mach/hurd/lseek64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2018 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
diff --git a/sysdeps/mach/hurd/lsetxattr.c b/sysdeps/mach/hurd/lsetxattr.c
index 38d5156e42..95a2899a09 100644
--- a/sysdeps/mach/hurd/lsetxattr.c
+++ b/sysdeps/mach/hurd/lsetxattr.c
@@ -1,5 +1,5 @@
/* Access to extended attributes on files. Hurd version.
- Copyright (C) 2004-2016 Free Software Foundation, Inc.
+ Copyright (C) 2004-2018 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
diff --git a/sysdeps/mach/hurd/lutimes.c b/sysdeps/mach/hurd/lutimes.c
index d39e4e7271..375ab3feb3 100644
--- a/sysdeps/mach/hurd/lutimes.c
+++ b/sysdeps/mach/hurd/lutimes.c
@@ -1,5 +1,5 @@
/* lutimes -- change access and modification times of a symlink. Hurd version.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 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
@@ -22,33 +22,22 @@
#include <hurd.h>
#include <fcntl.h>
+#include "utime-helper.c"
+
/* Change the access time of FILE to TVP[0] and
the modification time of FILE to TVP[1]. */
int
__lutimes (const char *file, const struct timeval tvp[2])
{
- union tv
- {
- struct timeval tv;
- time_value_t tvt;
- };
- const union tv *u = (const union tv *) tvp;
- union tv nulltv[2];
error_t err;
file_t port;
- if (tvp == NULL)
- {
- /* Setting the number of microseconds to `-1' tells the
- underlying filesystems to use the current time. */
- nulltv[0].tvt.microseconds = nulltv[1].tvt.microseconds = -1;
- u = nulltv;
- }
-
port = __file_name_lookup (file, O_NOLINK, 0);
if (port == MACH_PORT_NULL)
return -1;
- err = __file_utimes (port, u[0].tvt, u[1].tvt);
+
+ err = hurd_futimes (port, tvp);
+
__mach_port_deallocate (__mach_task_self (), port);
if (err)
return __hurd_fail (err);
diff --git a/sysdeps/mach/hurd/lxstat.c b/sysdeps/mach/hurd/lxstat.c
index 4173782bd4..ea69f78b2b 100644
--- a/sysdeps/mach/hurd/lxstat.c
+++ b/sysdeps/mach/hurd/lxstat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
diff --git a/sysdeps/mach/hurd/lxstat64.c b/sysdeps/mach/hurd/lxstat64.c
index fffea88edc..e060d2c1f6 100644
--- a/sysdeps/mach/hurd/lxstat64.c
+++ b/sysdeps/mach/hurd/lxstat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2018 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
diff --git a/sysdeps/mach/hurd/malloc-machine.h b/sysdeps/mach/hurd/malloc-machine.h
index 515f3ff151..36a7d11dc5 100644
--- a/sysdeps/mach/hurd/malloc-machine.h
+++ b/sysdeps/mach/hurd/malloc-machine.h
@@ -1,6 +1,6 @@
/* Basic platform-independent macro definitions for mutexes,
thread-specific data and parameters for malloc.
- Copyright (C) 2003-2016 Free Software Foundation, Inc.
+ Copyright (C) 2003-2018 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
@@ -20,38 +20,9 @@
#ifndef _MALLOC_MACHINE_H
#define _MALLOC_MACHINE_H
-#undef thread_atfork_static
-
#include <atomic.h>
#include <libc-lock.h>
-/* Assume hurd, with cthreads */
-
-/* Cthreads `mutex_t' is a pointer to a mutex, and malloc wants just the
- mutex itself. */
-#undef mutex_t
-#define mutex_t struct mutex
-
-#undef mutex_init
-#define mutex_init(m) ({ __mutex_init(m); 0; })
-
-#undef mutex_lock
-#define mutex_lock(m) ({ __mutex_lock(m); 0; })
-
-#undef mutex_unlock
-#define mutex_unlock(m) ({ __mutex_unlock(m); 0; })
-
-#define mutex_trylock(m) (!__mutex_trylock(m))
-
-#define thread_atfork(prepare, parent, child) do {} while(0)
-#define thread_atfork_static(prepare, parent, child) \
- text_set_element(_hurd_fork_prepare_hook, prepare); \
- text_set_element(_hurd_fork_parent_hook, parent); \
- text_set_element(_hurd_fork_child_hook, child);
-
-/* No we're *not* using pthreads. */
-#define __pthread_initialize ((void (*)(void))0)
-
/* madvise is a stub on Hurd, so don't bother calling it. */
#include <sys/mman.h>
diff --git a/sysdeps/mach/hurd/mig-reply.c b/sysdeps/mach/hurd/mig-reply.c
index 5aa04a8389..8350354500 100644
--- a/sysdeps/mach/hurd/mig-reply.c
+++ b/sysdeps/mach/hurd/mig-reply.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 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
@@ -16,6 +16,7 @@
<http://www.gnu.org/licenses/>. */
#include <mach.h>
+#include <mach/mig_support.h>
#include <hurd/threadvar.h>
/* These functions are called by MiG-generated code. */
@@ -34,6 +35,7 @@ __mig_get_reply_port (void)
return __hurd_local_reply_port;
}
weak_alias (__mig_get_reply_port, mig_get_reply_port)
+libc_hidden_def (__mig_get_reply_port)
/* Called by MiG to deallocate the reply port. */
void
@@ -47,6 +49,7 @@ __mig_dealloc_reply_port (mach_port_t arg)
MACH_PORT_RIGHT_RECEIVE, -1);
}
weak_alias (__mig_dealloc_reply_port, mig_dealloc_reply_port)
+libc_hidden_def (__mig_dealloc_reply_port)
/* Called by mig interfaces when done with a port. Used to provide the
same interface as needed when a custom allocator is used. */
@@ -66,3 +69,4 @@ __mig_init (void *stack)
/* Do nothing. */
}
weak_alias (__mig_init, mig_init)
+libc_hidden_def (__mig_init)
diff --git a/sysdeps/mach/hurd/mkdir.c b/sysdeps/mach/hurd/mkdir.c
index fe7692dbd3..fa01aabde0 100644
--- a/sysdeps/mach/hurd/mkdir.c
+++ b/sysdeps/mach/hurd/mkdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -40,4 +40,5 @@ __mkdir (const char *file_name, mode_t mode)
return 0;
}
+libc_hidden_def (__mkdir)
weak_alias (__mkdir, mkdir)
diff --git a/sysdeps/mach/hurd/mkdirat.c b/sysdeps/mach/hurd/mkdirat.c
index 3a178ef9b2..f214e08cab 100644
--- a/sysdeps/mach/hurd/mkdirat.c
+++ b/sysdeps/mach/hurd/mkdirat.c
@@ -1,5 +1,5 @@
/* Create a directory named relative to another open directory. Hurd version.
- Copyright (C) 1991-2016 Free Software Foundation, Inc.
+ Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/mlock.c b/sysdeps/mach/hurd/mlock.c
index c8fdaeb9d8..28a33be24f 100644
--- a/sysdeps/mach/hurd/mlock.c
+++ b/sysdeps/mach/hurd/mlock.c
@@ -1,5 +1,5 @@
/* mlock -- guarantee pages are resident in memory. Mach/Hurd version.
- Copyright (C) 2001-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2018 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
diff --git a/sysdeps/mach/hurd/mlockall.c b/sysdeps/mach/hurd/mlockall.c
new file mode 100644
index 0000000000..6fa944b21f
--- /dev/null
+++ b/sysdeps/mach/hurd/mlockall.c
@@ -0,0 +1,42 @@
+/* mlockall -- lock in core all the pages in this process. Hurd version.
+ Copyright (C) 2001-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <errno.h>
+#include <hurd.h>
+#include <mach/mach_host.h>
+
+/* Cause all currently mapped pages of the process to be memory resident
+ until unlocked by a call to the `munlockall', until the process exits,
+ or until the process calls `execve'. */
+
+int
+mlockall (int flags)
+{
+ mach_port_t host;
+ error_t err;
+
+ err = __get_privileged_ports (&host, NULL);
+ if (err)
+ return __hurd_fail (err);
+
+ err = __vm_wire_all (host, __mach_task_self (), flags);
+ __mach_port_deallocate (__mach_task_self (), host);
+ return err ? __hurd_fail (err) : 0;
+}
diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c
index c62955875b..e388ac9783 100644
--- a/sysdeps/mach/hurd/mmap.c
+++ b/sysdeps/mach/hurd/mmap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 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
@@ -26,12 +26,12 @@
is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
set in FLAGS, the mapping will be at ADDR exactly (which must be
page-aligned); otherwise the system chooses a convenient nearby address.
- The return value is the actual mapping address chosen or (__ptr_t) -1
+ The return value is the actual mapping address chosen or (void *) -1
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-__ptr_t
-__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
+void *
+__mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
{
error_t err;
vm_prot_t vmprot;
@@ -42,7 +42,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
/* ADDR and OFFSET must be page-aligned. */
if ((mapaddr & (__vm_page_size - 1)) || (offset & (__vm_page_size - 1)))
- return (__ptr_t) (long int) __hurd_fail (EINVAL);
+ return (void *) (long int) __hurd_fail (EINVAL);
if ((flags & (MAP_TYPE|MAP_INHERIT)) == MAP_ANON
&& prot == (PROT_READ|PROT_WRITE)) /* cf VM_PROT_DEFAULT */
@@ -64,7 +64,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
err = __vm_allocate (__mach_task_self (), &mapaddr, len, 1);
}
- return err ? (__ptr_t) (long int) __hurd_fail (err) : (__ptr_t) mapaddr;
+ return err ? (void *) (long int) __hurd_fail (err) : (void *) mapaddr;
}
vmprot = VM_PROT_NONE;
@@ -78,7 +78,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
switch (flags & MAP_TYPE)
{
default:
- return (__ptr_t) (long int) __hurd_fail (EINVAL);
+ return (void *) (long int) __hurd_fail (EINVAL);
case MAP_ANON:
memobj = MACH_PORT_NULL;
@@ -92,7 +92,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
{
if (err == MIG_BAD_ID || err == EOPNOTSUPP || err == ENOSYS)
err = ENODEV; /* File descriptor doesn't support mmap. */
- return (__ptr_t) (long int) __hurd_dfail (fd, err);
+ return (void *) (long int) __hurd_dfail (fd, err);
}
switch (prot & (PROT_READ|PROT_WRITE))
{
@@ -129,7 +129,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
else
{
__mach_port_deallocate (__mach_task_self (), wobj);
- return (__ptr_t) (long int) __hurd_fail (EACCES);
+ return (void *) (long int) __hurd_fail (EACCES);
}
break;
default:
@@ -180,9 +180,10 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
__mach_port_deallocate (__mach_task_self (), memobj);
if (err)
- return (__ptr_t) (long int) __hurd_fail (err);
+ return (void *) (long int) __hurd_fail (err);
- return (__ptr_t) mapaddr;
+ return (void *) mapaddr;
}
+libc_hidden_def (__mmap)
weak_alias (__mmap, mmap)
diff --git a/sysdeps/mach/hurd/mmap64.c b/sysdeps/mach/hurd/mmap64.c
index 42d777ce93..19133ceca5 100644
--- a/sysdeps/mach/hurd/mmap64.c
+++ b/sysdeps/mach/hurd/mmap64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2018 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
@@ -28,8 +28,8 @@
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-__ptr_t
-__mmap64 (__ptr_t addr, size_t len, int prot, int flags, int fd,
+void *
+__mmap64 (void *addr, size_t len, int prot, int flags, int fd,
__off64_t offset)
{
vm_offset_t small_offset = (vm_offset_t) offset;
@@ -44,4 +44,5 @@ __mmap64 (__ptr_t addr, size_t len, int prot, int flags, int fd,
return __mmap (addr, len, prot, flags, fd, small_offset);
}
+libc_hidden_def (__mmap64)
weak_alias (__mmap64, mmap64)
diff --git a/sysdeps/mach/hurd/munlock.c b/sysdeps/mach/hurd/munlock.c
index f3b418a964..3ef4dbb175 100644
--- a/sysdeps/mach/hurd/munlock.c
+++ b/sysdeps/mach/hurd/munlock.c
@@ -1,5 +1,5 @@
/* munlock -- undo the effects of prior mlock calls. Mach/Hurd version.
- Copyright (C) 2001-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2018 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
diff --git a/sysdeps/mach/hurd/munlockall.c b/sysdeps/mach/hurd/munlockall.c
new file mode 100644
index 0000000000..615b77f034
--- /dev/null
+++ b/sysdeps/mach/hurd/munlockall.c
@@ -0,0 +1,40 @@
+/* munlockall -- undo the effects of all prior mlock calls. Hurd version.
+ Copyright (C) 2001-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <errno.h>
+#include <hurd.h>
+#include <mach/mach_host.h>
+
+/* Undo the effects of all prior mlock calls in this process. */
+
+int
+munlockall (void)
+{
+ mach_port_t host;
+ error_t err;
+
+ err = __get_privileged_ports (&host, NULL);
+ if (err)
+ return __hurd_fail (err);
+
+ err = __vm_wire_all (host, __mach_task_self (), VM_WIRE_NONE);
+ __mach_port_deallocate (__mach_task_self (), host);
+ return err ? __hurd_fail (err) : 0;
+}
diff --git a/sysdeps/mach/hurd/net/ethernet.h b/sysdeps/mach/hurd/net/ethernet.h
index 404311e7a2..31f15cbe0f 100644
--- a/sysdeps/mach/hurd/net/ethernet.h
+++ b/sysdeps/mach/hurd/net/ethernet.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2018 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
@@ -23,6 +23,7 @@
#include <sys/cdefs.h>
#include <sys/types.h>
+#include <stdint.h>
#include <net/if_ether.h> /* IEEE 802.3 Ethernet constants */
__BEGIN_DECLS
@@ -31,15 +32,15 @@ __BEGIN_DECLS
systems. */
struct ether_addr
{
- u_int8_t ether_addr_octet[ETH_ALEN];
+ uint8_t ether_addr_octet[ETH_ALEN];
};
/* 10Mb/s ethernet header */
struct ether_header
{
- u_int8_t ether_dhost[ETH_ALEN]; /* destination eth addr */
- u_int8_t ether_shost[ETH_ALEN]; /* source ether addr */
- u_int16_t ether_type; /* packet type ID field */
+ uint8_t ether_dhost[ETH_ALEN]; /* destination eth addr */
+ uint8_t ether_shost[ETH_ALEN]; /* source ether addr */
+ uint16_t ether_type; /* packet type ID field */
};
/* Ethernet protocol ID's */
diff --git a/sysdeps/mach/hurd/net/if_arp.h b/sysdeps/mach/hurd/net/if_arp.h
index 7ed5550a73..01c8b62a99 100644
--- a/sysdeps/mach/hurd/net/if_arp.h
+++ b/sysdeps/mach/hurd/net/if_arp.h
@@ -1,5 +1,5 @@
/* Definitions for Address Resolution Protocol.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -26,6 +26,7 @@
#include <sys/types.h>
#include <sys/socket.h>
+#include <stdint.h>
__BEGIN_DECLS
@@ -132,7 +133,7 @@ struct arpreq
struct arpd_request
{
unsigned short int req; /* Request type. */
- u_int32_t ip; /* IP address of entry. */
+ uint32_t ip; /* IP address of entry. */
unsigned long int dev; /* Device entry is tied to. */
unsigned long int stamp;
unsigned long int updated;
diff --git a/sysdeps/mach/hurd/net/if_ether.h b/sysdeps/mach/hurd/net/if_ether.h
index d205522856..d499b1d6ed 100644
--- a/sysdeps/mach/hurd/net/if_ether.h
+++ b/sysdeps/mach/hurd/net/if_ether.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2018 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
diff --git a/sysdeps/mach/hurd/net/if_ppp.h b/sysdeps/mach/hurd/net/if_ppp.h
deleted file mode 100644
index 1b1c3ea6eb..0000000000
--- a/sysdeps/mach/hurd/net/if_ppp.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/* From: if_ppp.h,v 1.3 1995/06/12 11:36:50 paulus Exp */
-
-/*
- * if_ppp.h - Point-to-Point Protocol definitions.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
- * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-/*
- * ==FILEVERSION 960926==
- *
- * NOTE TO MAINTAINERS:
- * If you modify this file at all, please set the above date.
- * if_ppp.h is shipped with a PPP distribution as well as with the kernel;
- * if everyone increases the FILEVERSION number above, then scripts
- * can do the right thing when deciding whether to install a new if_ppp.h
- * file. Don't change the format of that line otherwise, so the
- * installation script can recognize it.
- */
-
-
-#ifndef __NET_IF_PPP_H
-#define __NET_IF_PPP_H 1
-
-#include <sys/types.h>
-#include <sys/cdefs.h>
-
-#include <net/if.h>
-#include <sys/ioctl.h>
-#include <net/ppp_defs.h>
-
-__BEGIN_DECLS
-
-/*
- * Packet sizes
- */
-
-#define PPP_MTU 1500 /* Default MTU (size of Info field) */
-#define PPP_MAXMRU 65000 /* Largest MRU we allow */
-#define PPP_VERSION "2.2.0"
-#define PPP_MAGIC 0x5002 /* Magic value for the ppp structure */
-#define PROTO_IPX 0x002b /* protocol numbers */
-#define PROTO_DNA_RT 0x0027 /* DNA Routing */
-
-
-/*
- * Bit definitions for flags.
- */
-
-#define SC_COMP_PROT 0x00000001 /* protocol compression (output) */
-#define SC_COMP_AC 0x00000002 /* header compression (output) */
-#define SC_COMP_TCP 0x00000004 /* TCP (VJ) compression (output) */
-#define SC_NO_TCP_CCID 0x00000008 /* disable VJ connection-id comp. */
-#define SC_REJ_COMP_AC 0x00000010 /* reject adrs/ctrl comp. on input */
-#define SC_REJ_COMP_TCP 0x00000020 /* reject TCP (VJ) comp. on input */
-#define SC_CCP_OPEN 0x00000040 /* Look at CCP packets */
-#define SC_CCP_UP 0x00000080 /* May send/recv compressed packets */
-#define SC_ENABLE_IP 0x00000100 /* IP packets may be exchanged */
-#define SC_COMP_RUN 0x00001000 /* compressor has been inited */
-#define SC_DECOMP_RUN 0x00002000 /* decompressor has been inited */
-#define SC_DEBUG 0x00010000 /* enable debug messages */
-#define SC_LOG_INPKT 0x00020000 /* log contents of good pkts recvd */
-#define SC_LOG_OUTPKT 0x00040000 /* log contents of pkts sent */
-#define SC_LOG_RAWIN 0x00080000 /* log all chars received */
-#define SC_LOG_FLUSH 0x00100000 /* log all chars flushed */
-#define SC_MASK 0x0fE0ffff /* bits that user can change */
-
-/* state bits */
-#define SC_ESCAPED 0x80000000 /* saw a PPP_ESCAPE */
-#define SC_FLUSH 0x40000000 /* flush input until next PPP_FLAG */
-#define SC_VJ_RESET 0x20000000 /* Need to reset the VJ decompressor */
-#define SC_XMIT_BUSY 0x10000000 /* ppp_write_wakeup is active */
-#define SC_RCV_ODDP 0x08000000 /* have rcvd char with odd parity */
-#define SC_RCV_EVNP 0x04000000 /* have rcvd char with even parity */
-#define SC_RCV_B7_1 0x02000000 /* have rcvd char with bit 7 = 1 */
-#define SC_RCV_B7_0 0x01000000 /* have rcvd char with bit 7 = 0 */
-#define SC_DC_FERROR 0x00800000 /* fatal decomp error detected */
-#define SC_DC_ERROR 0x00400000 /* non-fatal decomp error detected */
-
-/*
- * Ioctl definitions.
- */
-
-struct npioctl {
- int protocol; /* PPP protocol, e.g. PPP_IP */
- enum NPmode mode;
-};
-
-/* Structure describing a CCP configuration option, for PPPIOCSCOMPRESS */
-struct ppp_option_data {
- u_int8_t *ptr;
- u_int32_t length;
- int transmit;
-};
-
-struct ifpppstatsreq {
- struct ifreq b;
- struct ppp_stats stats; /* statistic information */
-};
-
-struct ifpppcstatsreq {
- struct ifreq b;
- struct ppp_comp_stats stats;
-};
-
-#define ifr__name b.ifr_ifrn.ifrn_name
-#define stats_ptr b.ifr_ifru.ifru_data
-
-/*
- * Ioctl definitions.
- */
-
-#define PPPIOCGFLAGS _IOR('t', 90, int) /* get configuration flags */
-#define PPPIOCSFLAGS _IOW('t', 89, int) /* set configuration flags */
-#define PPPIOCGASYNCMAP _IOR('t', 88, int) /* get async map */
-#define PPPIOCSASYNCMAP _IOW('t', 87, int) /* set async map */
-#define PPPIOCGUNIT _IOR('t', 86, int) /* get ppp unit number */
-#define PPPIOCGRASYNCMAP _IOR('t', 85, int) /* get receive async map */
-#define PPPIOCSRASYNCMAP _IOW('t', 84, int) /* set receive async map */
-#define PPPIOCGMRU _IOR('t', 83, int) /* get max receive unit */
-#define PPPIOCSMRU _IOW('t', 82, int) /* set max receive unit */
-#define PPPIOCSMAXCID _IOW('t', 81, int) /* set VJ max slot ID */
-#define PPPIOCGXASYNCMAP _IOR('t', 80, ext_accm) /* get extended ACCM */
-#define PPPIOCSXASYNCMAP _IOW('t', 79, ext_accm) /* set extended ACCM */
-#define PPPIOCXFERUNIT _IO('t', 78) /* transfer PPP unit */
-#define PPPIOCSCOMPRESS _IOW('t', 77, struct ppp_option_data)
-#define PPPIOCGNPMODE _IOWR('t', 76, struct npioctl) /* get NP mode */
-#define PPPIOCSNPMODE _IOW('t', 75, struct npioctl) /* set NP mode */
-#define PPPIOCGDEBUG _IOR('t', 65, int) /* Read debug level */
-#define PPPIOCSDEBUG _IOW('t', 64, int) /* Set debug level */
-#define PPPIOCGIDLE _IOR('t', 63, struct ppp_idle) /* get idle time */
-
-#define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0)
-#define SIOCGPPPVER (SIOCDEVPRIVATE + 1) /* NEVER change this!! */
-#define SIOCGPPPCSTATS (SIOCDEVPRIVATE + 2)
-
-#if !defined(ifr_mtu)
-#define ifr_mtu ifr_ifru.ifru_metric
-#endif
-
-__END_DECLS
-
-#endif /* net/if_ppp.h */
diff --git a/sysdeps/mach/hurd/net/route.h b/sysdeps/mach/hurd/net/route.h
index a596ce18e3..c47944316f 100644
--- a/sysdeps/mach/hurd/net/route.h
+++ b/sysdeps/mach/hurd/net/route.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2016 Free Software Foundation, Inc..
+/* Copyright (C) 1997-2018 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
@@ -55,12 +55,12 @@ struct in6_rtmsg
struct in6_addr rtmsg_dst;
struct in6_addr rtmsg_src;
struct in6_addr rtmsg_gateway;
- u_int32_t rtmsg_type;
- u_int16_t rtmsg_dst_len;
- u_int16_t rtmsg_src_len;
- u_int32_t rtmsg_metric;
+ uint32_t rtmsg_type;
+ uint16_t rtmsg_dst_len;
+ uint16_t rtmsg_src_len;
+ uint32_t rtmsg_metric;
unsigned long int rtmsg_info;
- u_int32_t rtmsg_flags;
+ uint32_t rtmsg_flags;
int rtmsg_ifindex;
};
@@ -109,7 +109,7 @@ struct in6_rtmsg
#define RTF_NAT 0x08000000
#define RTF_ADDRCLASSMASK 0xF8000000
-#define RT_ADDRCLASS(flags) ((__u_int32_t) flags >> 23)
+#define RT_ADDRCLASS(flags) ((uint32_t) flags >> 23)
#define RT_TOS(tos) ((tos) & IPTOS_TOS_MASK)
diff --git a/sysdeps/mach/hurd/not-errno.h b/sysdeps/mach/hurd/not-errno.h
new file mode 100644
index 0000000000..838a5abc69
--- /dev/null
+++ b/sysdeps/mach/hurd/not-errno.h
@@ -0,0 +1,21 @@
+/* Syscall wrapper that do not set errno. Generic version.
+ Copyright (C) 2017-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* The __access_noerrno stub mustn't be hidden in ld.so on Hurd since it needs
+ to be preempted by __access_noerrno from libc.so after bootstrap. */
+extern __typeof (__access) __access_noerrno;
diff --git a/sysdeps/mach/hurd/open.c b/sysdeps/mach/hurd/open.c
index 5b98fb9f4d..8acdd3d418 100644
--- a/sysdeps/mach/hurd/open.c
+++ b/sysdeps/mach/hurd/open.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
diff --git a/sysdeps/mach/hurd/openat.c b/sysdeps/mach/hurd/openat.c
index 974ff3fa15..3534f256bc 100644
--- a/sysdeps/mach/hurd/openat.c
+++ b/sysdeps/mach/hurd/openat.c
@@ -1,5 +1,5 @@
/* openat -- Open a file named relative to an open directory. Hurd version.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
@@ -29,7 +29,7 @@
the directory associated with FD. If O_CREAT or O_TMPFILE is in OFLAG, a
third argument is the file protection. */
int
-__openat (int fd, const char *file, int oflag)
+__openat (int fd, const char *file, int oflag, ...)
{
mode_t mode;
io_t port;
diff --git a/sysdeps/mach/hurd/opendir.c b/sysdeps/mach/hurd/opendir.c
index a62af6ffcd..bda138e439 100644
--- a/sysdeps/mach/hurd/opendir.c
+++ b/sysdeps/mach/hurd/opendir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
@@ -69,7 +69,6 @@ _hurd_fd_opendir (struct hurd_fd *d)
DIR *
-internal_function
__opendirat (int dfd, const char *name)
{
if (name[0] == '\0')
@@ -84,9 +83,9 @@ __opendirat (int dfd, const char *name)
int fd;
#if IS_IN (rtld)
assert (dfd == AT_FDCWD);
- fd = open_not_cancel_2 (name, flags);
+ fd = __open_nocancel (name, flags);
#else
- fd = openat_not_cancel_3 (dfd, name, flags);
+ fd = __openat_nocancel (dfd, name, flags);
#endif
if (fd < 0)
return NULL;
diff --git a/sysdeps/mach/hurd/pathconf.c b/sysdeps/mach/hurd/pathconf.c
index 7a0ac04158..62099a6c05 100644
--- a/sysdeps/mach/hurd/pathconf.c
+++ b/sysdeps/mach/hurd/pathconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/pipe.c b/sysdeps/mach/hurd/pipe.c
index 364c856a59..9e67ef7c84 100644
--- a/sysdeps/mach/hurd/pipe.c
+++ b/sysdeps/mach/hurd/pipe.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
@@ -15,9 +15,6 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <errno.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
#include <unistd.h>
/* Create a one-way communication channel (pipe).
@@ -28,23 +25,7 @@
int
__pipe (int fds[2])
{
- int save_errno = errno;
- int result;
-
- /* The magic S_IFIFO protocol tells the pflocal server to create
- sockets which report themselves as FIFOs, as POSIX requires for
- pipes. */
- result = __socketpair (PF_LOCAL, SOCK_STREAM, S_IFIFO, fds);
- if (result == -1 && errno == EPROTONOSUPPORT)
- {
- /* We contacted an "old" pflocal server that doesn't support the
- magic S_IFIFO protocol.
- FIXME: Remove this junk somewhere in the future. */
- __set_errno (save_errno);
- return __socketpair (PF_LOCAL, SOCK_STREAM, 0, fds);
- }
-
- return result;
+ return __pipe2 (fds, 0);
}
libc_hidden_def (__pipe)
weak_alias (__pipe, pipe)
diff --git a/sysdeps/mach/hurd/pipe2.c b/sysdeps/mach/hurd/pipe2.c
new file mode 100644
index 0000000000..288d4b8c67
--- /dev/null
+++ b/sysdeps/mach/hurd/pipe2.c
@@ -0,0 +1,59 @@
+/* Copyright (C) 1992-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <fcntl-internal.h>
+#include <hurd.h>
+
+/* Create a one-way communication channel (pipe).
+ Actually the channel is two-way on the Hurd.
+ If successful, two file descriptors are stored in FDS;
+ bytes written on FDS[1] can be read from FDS[0].
+ Apply FLAGS to the new file descriptors.
+ Returns 0 if successful, -1 if not. */
+int
+__pipe2 (int fds[2], int flags)
+{
+ int save_errno = errno;
+ int result;
+
+ if (flags & ~(O_CLOEXEC | O_NONBLOCK))
+ return __hurd_fail (EINVAL);
+
+ flags = o_to_sock_flags (flags);
+
+ /* The magic S_IFIFO protocol tells the pflocal server to create
+ sockets which report themselves as FIFOs, as POSIX requires for
+ pipes. */
+ result = __socketpair (PF_LOCAL, SOCK_STREAM | flags, S_IFIFO, fds);
+ if (result == -1 && errno == EPROTONOSUPPORT)
+ {
+ /* We contacted an "old" pflocal server that doesn't support the
+ magic S_IFIFO protocol.
+ FIXME: Remove this junk somewhere in the future. */
+ __set_errno (save_errno);
+ return __socketpair (PF_LOCAL, SOCK_STREAM | flags, 0, fds);
+ }
+
+ return result;
+}
+weak_alias (__pipe2, pipe2)
diff --git a/sysdeps/mach/hurd/poll.c b/sysdeps/mach/hurd/poll.c
index 837c88a75a..50d0ad7290 100644
--- a/sysdeps/mach/hurd/poll.c
+++ b/sysdeps/mach/hurd/poll.c
@@ -1,5 +1,5 @@
/* poll file descriptors. Hurd version.
- Copyright (C) 1998-2016 Free Software Foundation, Inc.
+ Copyright (C) 1998-2018 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
diff --git a/sysdeps/mach/hurd/ppoll.c b/sysdeps/mach/hurd/ppoll.c
index e8e75b282b..615fc0814c 100644
--- a/sysdeps/mach/hurd/ppoll.c
+++ b/sysdeps/mach/hurd/ppoll.c
@@ -1,5 +1,5 @@
/* poll file descriptors. Hurd version.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
diff --git a/sysdeps/mach/hurd/pread.c b/sysdeps/mach/hurd/pread.c
index f4bdd34194..63a90aa4df 100644
--- a/sysdeps/mach/hurd/pread.c
+++ b/sysdeps/mach/hurd/pread.c
@@ -1,6 +1,6 @@
/* Read block from given position in file without changing file pointer.
Hurd version.
- Copyright (C) 1999-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 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
diff --git a/sysdeps/mach/hurd/pread64.c b/sysdeps/mach/hurd/pread64.c
index 6ce8f72529..1a6ec06acd 100644
--- a/sysdeps/mach/hurd/pread64.c
+++ b/sysdeps/mach/hurd/pread64.c
@@ -1,6 +1,6 @@
/* Read block from given position in file without changing file pointer.
Hurd version.
- Copyright (C) 2001-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2018 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
@@ -34,5 +34,6 @@ __libc_pread64 (int fd, void *buf, size_t nbytes, off64_t offset)
#ifndef __libc_pread64
weak_alias (__libc_pread64, __pread64)
+libc_hidden_weak (__pread64)
weak_alias (__libc_pread64, pread64)
#endif
diff --git a/sysdeps/mach/hurd/profil.c b/sysdeps/mach/hurd/profil.c
index 708ce1d4cd..c2c2f9f119 100644
--- a/sysdeps/mach/hurd/profil.c
+++ b/sysdeps/mach/hurd/profil.c
@@ -1,5 +1,5 @@
/* Low-level statistical profiling support function. Mach/Hurd version.
- Copyright (C) 1995-2016 Free Software Foundation, Inc.
+ Copyright (C) 1995-2018 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
@@ -40,7 +40,7 @@ static mach_msg_timeout_t collector_timeout; /* ms between collections. */
static int profile_tick;
/* Reply port used by profiler thread */
-static mach_port_t profil_reply_port;
+static mach_port_t profil_reply_port = MACH_PORT_NULL;
/* Forwards */
static kern_return_t profil_task_get_sampled_pcs (mach_port_t,
@@ -63,13 +63,15 @@ update_waiter (u_short *sample_buffer, size_t size, size_t offset, u_int scale)
if (profile_thread == MACH_PORT_NULL)
{
+ if (profil_reply_port == MACH_PORT_NULL)
+ profil_reply_port = __mach_reply_port ();
/* Set up the profiling collector thread. */
err = __thread_create (__mach_task_self (), &profile_thread);
if (! err)
err = __mach_setup_thread (__mach_task_self (), profile_thread,
&profile_waiter, NULL, NULL);
if (! err)
- err = __mach_setup_tls (profile_thread);
+ err = __mach_setup_tls(profile_thread);
}
else
err = 0;
@@ -102,7 +104,7 @@ update_waiter (u_short *sample_buffer, size_t size, size_t offset, u_int scale)
int
__profile_frequency (void)
{
- return profile_tick;
+ return 1000000 / profile_tick;
}
libc_hidden_def (__profile_frequency)
@@ -138,6 +140,8 @@ __profil (u_short *sample_buffer, size_t size, size_t offset, u_int scale)
}
weak_alias (__profil, profil)
+static volatile error_t special_profil_failure;
+
/* Fetch PC samples. This function must be very careful not to depend
on Hurd TLS variables. We arrange that by using a special
stub arranged for at the end of this file. */
@@ -154,14 +158,13 @@ fetch_samples (void)
pc_samples, &nsamples);
if (err)
{
- static error_t special_profil_failure;
- static volatile int a, b, c;
+ static volatile int a, b;
special_profil_failure = err;
a = 1;
b = 0;
while (1)
- c = a / b;
+ a = a / b;
}
for (i = 0; i < nsamples; ++i)
@@ -184,7 +187,6 @@ profile_waiter (void)
mach_msg_header_t msg;
mach_port_t timeout_reply_port;
- profil_reply_port = __mach_reply_port ();
timeout_reply_port = __mach_reply_port ();
while (1)
diff --git a/sysdeps/mach/hurd/pselect.c b/sysdeps/mach/hurd/pselect.c
index d3a10690dc..1d469c025a 100644
--- a/sysdeps/mach/hurd/pselect.c
+++ b/sysdeps/mach/hurd/pselect.c
@@ -1,5 +1,5 @@
/* pselect for Hurd.
- Copyright (C) 1998-2016 Free Software Foundation, Inc.
+ Copyright (C) 1998-2018 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
diff --git a/sysdeps/mach/hurd/ptrace.c b/sysdeps/mach/hurd/ptrace.c
index 4e9fa26ab1..d0268a3f98 100644
--- a/sysdeps/mach/hurd/ptrace.c
+++ b/sysdeps/mach/hurd/ptrace.c
@@ -1,5 +1,5 @@
/* Process tracing interface `ptrace' for GNU Hurd.
- Copyright (C) 1991-2016 Free Software Foundation, Inc.
+ Copyright (C) 1991-2018 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
@@ -155,7 +155,7 @@ ptrace (enum __ptrace_request request, ... )
va_end (ap);
/* SIGKILL always just terminates the task,
so normal kill is just the same when traced. */
- return kill (pid, SIGKILL);
+ return __kill (pid, SIGKILL);
case PTRACE_SINGLESTEP:
/* This is a machine-dependent kernel RPC on
diff --git a/sysdeps/mach/hurd/ptsname.c b/sysdeps/mach/hurd/ptsname.c
index 2978394eb5..5c1dc6e981 100644
--- a/sysdeps/mach/hurd/ptsname.c
+++ b/sysdeps/mach/hurd/ptsname.c
@@ -1,5 +1,5 @@
/* ptsname -- return the name of a pty slave given an FD to the pty master
- Copyright (C) 1999-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 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
@@ -18,6 +18,7 @@
#include <errno.h>
#include <string.h>
+#include <sys/stat.h>
#include <hurd.h>
#include <hurd/fd.h>
#include <hurd/term.h>
@@ -38,11 +39,9 @@ ptsname (int fd)
}
-/* Store at most BUFLEN characters of the pathname of the slave pseudo
- terminal associated with the master FD is open on in BUF.
- Return 0 on success, otherwise an error number. */
+/* We don't need STP, but fill it for conformity with the Linux version... */
int
-__ptsname_r (int fd, char *buf, size_t buflen)
+__ptsname_internal (int fd, char *buf, size_t buflen, struct stat64 *stp)
{
string_t peername;
size_t len;
@@ -58,7 +57,23 @@ __ptsname_r (int fd, char *buf, size_t buflen)
return ERANGE;
}
+ if (stp)
+ {
+ if (__xstat64 (_STAT_VER, peername, stp) < 0)
+ return errno;
+ }
+
memcpy (buf, peername, len);
return 0;
}
+
+
+/* Store at most BUFLEN characters of the pathname of the slave pseudo
+ terminal associated with the master FD is open on in BUF.
+ Return 0 on success, otherwise an error number. */
+int
+__ptsname_r (int fd, char *buf, size_t buflen)
+{
+ return __ptsname_internal (fd, buf, buflen, NULL);
+}
weak_alias (__ptsname_r, ptsname_r)
diff --git a/sysdeps/mach/hurd/pwrite.c b/sysdeps/mach/hurd/pwrite.c
index a0da13307b..80be158489 100644
--- a/sysdeps/mach/hurd/pwrite.c
+++ b/sysdeps/mach/hurd/pwrite.c
@@ -1,6 +1,6 @@
/* Write block at given position in file without changing file pointer.
Hurd version.
- Copyright (C) 1999-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 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
diff --git a/sysdeps/mach/hurd/pwrite64.c b/sysdeps/mach/hurd/pwrite64.c
index 8f282da958..bfa6b02c14 100644
--- a/sysdeps/mach/hurd/pwrite64.c
+++ b/sysdeps/mach/hurd/pwrite64.c
@@ -1,6 +1,6 @@
/* Write block to given position in file without changing file pointer.
Hurd version.
- Copyright (C) 2001-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2018 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
diff --git a/sysdeps/mach/hurd/read.c b/sysdeps/mach/hurd/read.c
index e636ad447f..20a4b979f6 100644
--- a/sysdeps/mach/hurd/read.c
+++ b/sysdeps/mach/hurd/read.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
@@ -30,3 +30,4 @@ libc_hidden_def (__libc_read)
weak_alias (__libc_read, __read)
libc_hidden_weak (__read)
weak_alias (__libc_read, read)
+libc_hidden_weak (read)
diff --git a/sysdeps/mach/hurd/readdir.c b/sysdeps/mach/hurd/readdir.c
index 7352a37435..16f608cf5a 100644
--- a/sysdeps/mach/hurd/readdir.c
+++ b/sysdeps/mach/hurd/readdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/readdir64.c b/sysdeps/mach/hurd/readdir64.c
index 74296680a6..f28d8603ab 100644
--- a/sysdeps/mach/hurd/readdir64.c
+++ b/sysdeps/mach/hurd/readdir64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2018 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
@@ -98,4 +98,5 @@ __readdir64 (DIR *dirp)
return dp;
}
+libc_hidden_def (__readdir64)
weak_alias (__readdir64, readdir64)
diff --git a/sysdeps/mach/hurd/readdir64_r.c b/sysdeps/mach/hurd/readdir64_r.c
index e98ada1cd1..eb39833c71 100644
--- a/sysdeps/mach/hurd/readdir64_r.c
+++ b/sysdeps/mach/hurd/readdir64_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2018 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
diff --git a/sysdeps/mach/hurd/readdir_r.c b/sysdeps/mach/hurd/readdir_r.c
index 479be702a8..4b34434170 100644
--- a/sysdeps/mach/hurd/readdir_r.c
+++ b/sysdeps/mach/hurd/readdir_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/readlink.c b/sysdeps/mach/hurd/readlink.c
index 41bcb43922..e1368d8fd0 100644
--- a/sysdeps/mach/hurd/readlink.c
+++ b/sysdeps/mach/hurd/readlink.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/readlinkat.c b/sysdeps/mach/hurd/readlinkat.c
index 0f414aed9d..e601c6b619 100644
--- a/sysdeps/mach/hurd/readlinkat.c
+++ b/sysdeps/mach/hurd/readlinkat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/reboot.c b/sysdeps/mach/hurd/reboot.c
index 73d2ad7ad4..beeb9bfcbc 100644
--- a/sysdeps/mach/hurd/reboot.c
+++ b/sysdeps/mach/hurd/reboot.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
@@ -18,6 +18,7 @@
#include <errno.h>
#include <unistd.h>
#include <hurd.h>
+#include <hurd/paths.h>
#include <hurd/startup.h>
#include <sys/reboot.h>
@@ -33,8 +34,8 @@ reboot (int howto)
if (err)
return __hurd_fail (EPERM);
- err = __USEPORT (PROC, __proc_getmsgport (port, 1, &init));
- if (!err)
+ init = __file_name_lookup (_SERVERS_STARTUP, 0, 0);
+ if (init != MACH_PORT_NULL)
{
err = __startup_reboot (init, hostpriv, howto);
__mach_port_deallocate (__mach_task_self (), init);
diff --git a/sysdeps/mach/hurd/recv.c b/sysdeps/mach/hurd/recv.c
index 1534228c0a..0bc5ce4bfc 100644
--- a/sysdeps/mach/hurd/recv.c
+++ b/sysdeps/mach/hurd/recv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 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
@@ -37,12 +37,16 @@ __recv (int fd, void *buf, size_t n, int flags)
char *cdata = NULL;
mach_msg_type_number_t clen = 0;
- if (err = HURD_DPORT_USE (fd, __socket_recv (port, &addrport,
+ err = HURD_DPORT_USE (fd, __socket_recv (port, &addrport,
flags, &bufp, &nread,
&ports, &nports,
&cdata, &clen,
&flags,
- n)))
+ n));
+ if (err == MIG_BAD_ID || err == EOPNOTSUPP)
+ /* The file did not grok the socket protocol. */
+ err = ENOTSOCK;
+ if (err)
return __hurd_sockfail (fd, flags, err);
__mach_port_deallocate (__mach_task_self (), addrport);
diff --git a/sysdeps/mach/hurd/recvfrom.c b/sysdeps/mach/hurd/recvfrom.c
index fc4690fcfd..5d71a21b98 100644
--- a/sysdeps/mach/hurd/recvfrom.c
+++ b/sysdeps/mach/hurd/recvfrom.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 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
diff --git a/sysdeps/mach/hurd/recvmsg.c b/sysdeps/mach/hurd/recvmsg.c
index 770a42e05e..770ca7187b 100644
--- a/sysdeps/mach/hurd/recvmsg.c
+++ b/sysdeps/mach/hurd/recvmsg.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2018 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
@@ -64,7 +64,7 @@ __libc_recvmsg (int fd, struct msghdr *message, int flags)
&message->msg_flags, amount)))
return __hurd_sockfail (fd, flags, err);
- if (message->msg_name != NULL)
+ if (message->msg_name != NULL && aport != MACH_PORT_NULL)
{
char *buf = message->msg_name;
mach_msg_type_number_t buflen = message->msg_namelen;
@@ -98,6 +98,8 @@ __libc_recvmsg (int fd, struct msghdr *message, int flags)
if (buflen > 0)
((struct sockaddr *) message->msg_name)->sa_family = type;
}
+ else if (message->msg_name != NULL)
+ message->msg_namelen = 0;
__mach_port_deallocate (__mach_task_self (), aport);
diff --git a/sysdeps/mach/hurd/removexattr.c b/sysdeps/mach/hurd/removexattr.c
index 60310fa20f..6fdb88c3e9 100644
--- a/sysdeps/mach/hurd/removexattr.c
+++ b/sysdeps/mach/hurd/removexattr.c
@@ -1,5 +1,5 @@
/* Access to extended attributes on files. Hurd version.
- Copyright (C) 2005-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005-2018 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
diff --git a/sysdeps/mach/hurd/rename.c b/sysdeps/mach/hurd/rename.c
index b2761800d5..ea3ffa3792 100644
--- a/sysdeps/mach/hurd/rename.c
+++ b/sysdeps/mach/hurd/rename.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/renameat.c b/sysdeps/mach/hurd/renameat.c
index 75fece2dd4..7985763f73 100644
--- a/sysdeps/mach/hurd/renameat.c
+++ b/sysdeps/mach/hurd/renameat.c
@@ -1,5 +1,5 @@
/* Rename a file using relative source and destination names. Hurd version.
- Copyright (C) 1991-2016 Free Software Foundation, Inc.
+ Copyright (C) 1991-2018 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
@@ -22,7 +22,7 @@
/* Rename the file OLD relative to OLDFD to NEW relative to NEWFD. */
int
-renameat (int oldfd, const char *old, int newfd, const char *new)
+__renameat (int oldfd, const char *old, int newfd, const char *new)
{
error_t err;
file_t olddir, newdir;
@@ -45,3 +45,5 @@ renameat (int oldfd, const char *old, int newfd, const char *new)
return __hurd_fail (err);
return 0;
}
+libc_hidden_def (__renameat)
+weak_alias (__renameat, renameat)
diff --git a/sysdeps/mach/hurd/revoke.c b/sysdeps/mach/hurd/revoke.c
index 4681eca351..5b1495a238 100644
--- a/sysdeps/mach/hurd/revoke.c
+++ b/sysdeps/mach/hurd/revoke.c
@@ -1,5 +1,5 @@
/* Revoke the access of all descriptors currently open on a file. Hurd version
- Copyright (C) 1999-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 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
@@ -21,7 +21,7 @@
#include <hurd.h>
int
-revoke (const char *file_name)
+__revoke (const char *file_name)
{
error_t err;
file_t file = __file_name_lookup (file_name, 0, 0);
@@ -36,3 +36,5 @@ revoke (const char *file_name)
return __hurd_fail (err);
return 0;
}
+
+weak_alias (__revoke, revoke)
diff --git a/sysdeps/mach/hurd/rewinddir.c b/sysdeps/mach/hurd/rewinddir.c
index 95a816485b..4e8864f9ea 100644
--- a/sysdeps/mach/hurd/rewinddir.c
+++ b/sysdeps/mach/hurd/rewinddir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 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
@@ -24,7 +24,7 @@
void
__rewinddir (DIR *dirp)
{
- seekdir (dirp, (off_t) 0L);
+ __seekdir (dirp, (off_t) 0L);
}
libc_hidden_def (__rewinddir)
weak_alias (__rewinddir, rewinddir)
diff --git a/sysdeps/mach/hurd/rmdir.c b/sysdeps/mach/hurd/rmdir.c
index 58875ee819..1ad10fbb68 100644
--- a/sysdeps/mach/hurd/rmdir.c
+++ b/sysdeps/mach/hurd/rmdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/sbrk.c b/sysdeps/mach/hurd/sbrk.c
index b3409a9dd1..2736342734 100644
--- a/sysdeps/mach/hurd/sbrk.c
+++ b/sysdeps/mach/hurd/sbrk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/seekdir.c b/sysdeps/mach/hurd/seekdir.c
index 1e527d1125..a7b9222452 100644
--- a/sysdeps/mach/hurd/seekdir.c
+++ b/sysdeps/mach/hurd/seekdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
@@ -22,9 +22,8 @@
#include "dirstream.h"
/* Seek to position POS in DIRP. */
-/* XXX should be __seekdir ? */
void
-seekdir (DIR *dirp, long int pos)
+__seekdir (DIR *dirp, long int pos)
{
__libc_lock_lock (dirp->__lock);
/* Change our entry index pointer to POS and discard any data already
@@ -35,3 +34,5 @@ seekdir (DIR *dirp, long int pos)
dirp->__size = 0;
__libc_lock_unlock (dirp->__lock);
}
+
+weak_alias (__seekdir, seekdir)
diff --git a/sysdeps/mach/hurd/select.c b/sysdeps/mach/hurd/select.c
index b81b82435d..bcf8fbf8f7 100644
--- a/sysdeps/mach/hurd/select.c
+++ b/sysdeps/mach/hurd/select.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/send.c b/sysdeps/mach/hurd/send.c
index cc7d2a8b86..c7dc907129 100644
--- a/sysdeps/mach/hurd/send.c
+++ b/sysdeps/mach/hurd/send.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 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
@@ -33,6 +33,10 @@ __send (int fd, const void *buf, size_t n, int flags)
NULL, MACH_MSG_TYPE_COPY_SEND, 0,
NULL, 0, &wrote));
+ if (err == MIG_BAD_ID || err == EOPNOTSUPP)
+ /* The file did not grok the socket protocol. */
+ err = ENOTSOCK;
+
return err ? __hurd_sockfail (fd, flags, err) : wrote;
}
libc_hidden_def (__send)
diff --git a/sysdeps/mach/hurd/sendfile.c b/sysdeps/mach/hurd/sendfile.c
index 33bfe2d48e..4df66b56d7 100644
--- a/sysdeps/mach/hurd/sendfile.c
+++ b/sysdeps/mach/hurd/sendfile.c
@@ -1,5 +1,5 @@
/* sendfile -- copy data directly from one file descriptor to another
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 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
@@ -25,11 +25,11 @@ ssize_t
sendfile (int out_fd, int in_fd, off_t *offset, size_t count)
{
if (offset == NULL || sizeof (off_t) == sizeof (off64_t))
- return sendfile64 (out_fd, in_fd, (off64_t *) offset, count);
+ return __sendfile64 (out_fd, in_fd, (off64_t *) offset, count);
else
{
off64_t ofs = *offset;
- ssize_t ret = sendfile64 (out_fd, in_fd, &ofs, count);
+ ssize_t ret = __sendfile64 (out_fd, in_fd, &ofs, count);
*offset = ofs;
return ret;
}
diff --git a/sysdeps/mach/hurd/sendfile64.c b/sysdeps/mach/hurd/sendfile64.c
index 99412706a9..ea4e96da90 100644
--- a/sysdeps/mach/hurd/sendfile64.c
+++ b/sysdeps/mach/hurd/sendfile64.c
@@ -1,5 +1,5 @@
/* sendfile -- copy data directly from one file descriptor to another
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 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
@@ -24,7 +24,7 @@
/* Send COUNT bytes from file associated with IN_FD starting at OFFSET to
descriptor OUT_FD. */
ssize_t
-sendfile64 (int out_fd, int in_fd, off64_t *offset, size_t count)
+__sendfile64 (int out_fd, int in_fd, off64_t *offset, size_t count)
{
/* We just do a vanilla io_read followed by a vanilla io_write here.
In theory the IN_FD filesystem can return us out-of-line data that
@@ -47,7 +47,7 @@ sendfile64 (int out_fd, int in_fd, off64_t *offset, size_t count)
return 0;
err = HURD_DPORT_USE (out_fd, __io_write (port, data, datalen,
(off_t) -1, &nwrote));
- munmap (data, datalen);
+ __munmap (data, datalen);
if (err == 0)
{
if (offset)
@@ -57,3 +57,4 @@ sendfile64 (int out_fd, int in_fd, off64_t *offset, size_t count)
}
return __hurd_fail (err);
}
+strong_alias (__sendfile64, sendfile64)
diff --git a/sysdeps/mach/hurd/sendmsg.c b/sysdeps/mach/hurd/sendmsg.c
index ce40764992..d12f4a1e90 100644
--- a/sysdeps/mach/hurd/sendmsg.c
+++ b/sysdeps/mach/hurd/sendmsg.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2018 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
diff --git a/sysdeps/mach/hurd/sendto.c b/sysdeps/mach/hurd/sendto.c
index 7570246cf6..46cabbb9cf 100644
--- a/sysdeps/mach/hurd/sendto.c
+++ b/sysdeps/mach/hurd/sendto.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 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
diff --git a/sysdeps/mach/hurd/setdomain.c b/sysdeps/mach/hurd/setdomain.c
index 8cd19bd25f..f78e8626c1 100644
--- a/sysdeps/mach/hurd/setdomain.c
+++ b/sysdeps/mach/hurd/setdomain.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2018 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
diff --git a/sysdeps/mach/hurd/setegid.c b/sysdeps/mach/hurd/setegid.c
index 9057135222..c5e8cf622f 100644
--- a/sysdeps/mach/hurd/setegid.c
+++ b/sysdeps/mach/hurd/setegid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/seteuid.c b/sysdeps/mach/hurd/seteuid.c
index 3e16aba175..d6001960a8 100644
--- a/sysdeps/mach/hurd/seteuid.c
+++ b/sysdeps/mach/hurd/seteuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/setgid.c b/sysdeps/mach/hurd/setgid.c
index 3bd1ac9f0a..faac055f71 100644
--- a/sysdeps/mach/hurd/setgid.c
+++ b/sysdeps/mach/hurd/setgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/setgroups.c b/sysdeps/mach/hurd/setgroups.c
index 23ae4f570e..cdfa869fc2 100644
--- a/sysdeps/mach/hurd/setgroups.c
+++ b/sysdeps/mach/hurd/setgroups.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/sethostid.c b/sysdeps/mach/hurd/sethostid.c
index 5f0620312b..90c816884b 100644
--- a/sysdeps/mach/hurd/sethostid.c
+++ b/sysdeps/mach/hurd/sethostid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/sethostname.c b/sysdeps/mach/hurd/sethostname.c
index cbb507fd0b..2771afc2f6 100644
--- a/sysdeps/mach/hurd/sethostname.c
+++ b/sysdeps/mach/hurd/sethostname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/setitimer.c b/sysdeps/mach/hurd/setitimer.c
index 48346e2eab..f5dfb7da84 100644
--- a/sysdeps/mach/hurd/setitimer.c
+++ b/sysdeps/mach/hurd/setitimer.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 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
@@ -226,7 +226,7 @@ setitimer_locked (const struct itimerval *new, struct itimerval *old,
&timer_thread,
&_hurd_itimer_thread_stack_base,
&_hurd_itimer_thread_stack_size))
- || (err = __mach_setup_tls (_hurd_itimer_thread)))
+ || (err = __mach_setup_tls(_hurd_itimer_thread)))
{
__thread_terminate (_hurd_itimer_thread);
_hurd_itimer_thread = MACH_PORT_NULL;
diff --git a/sysdeps/mach/hurd/setlogin.c b/sysdeps/mach/hurd/setlogin.c
index 30717157a9..bb12e81a52 100644
--- a/sysdeps/mach/hurd/setlogin.c
+++ b/sysdeps/mach/hurd/setlogin.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/setpgid.c b/sysdeps/mach/hurd/setpgid.c
index 8579efb9b1..98b1341cfa 100644
--- a/sysdeps/mach/hurd/setpgid.c
+++ b/sysdeps/mach/hurd/setpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
@@ -19,6 +19,7 @@
#include <unistd.h>
#include <hurd.h>
#include <hurd/port.h>
+#include <lowlevellock.h>
/* Set the process group ID of the process matching PID to PGID.
If PID is zero, the current process's process group ID is set.
@@ -38,14 +39,7 @@ __setpgid (pid_t pid, pid_t pgid)
/* Synchronize with the signal thread to make sure we have
received and processed proc_newids before returning to the user. */
while (_hurd_pids_changed_stamp == stamp)
- {
-#ifdef noteven
- /* XXX we have no need for a mutex, but cthreads demands one. */
- __condition_wait (&_hurd_pids_changed_sync, NULL);
-#else
- __swtch_pri(0);
-#endif
- }
+ lll_wait (&_hurd_pids_changed_stamp, stamp, 0);
return 0;
diff --git a/sysdeps/mach/hurd/setpriority.c b/sysdeps/mach/hurd/setpriority.c
index 23f4c282f0..a9c263491d 100644
--- a/sysdeps/mach/hurd/setpriority.c
+++ b/sysdeps/mach/hurd/setpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 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
diff --git a/sysdeps/mach/hurd/setregid.c b/sysdeps/mach/hurd/setregid.c
index 24797f3968..45953474b7 100644
--- a/sysdeps/mach/hurd/setregid.c
+++ b/sysdeps/mach/hurd/setregid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/setresgid.c b/sysdeps/mach/hurd/setresgid.c
index 256fac4a20..d09935d8b0 100644
--- a/sysdeps/mach/hurd/setresgid.c
+++ b/sysdeps/mach/hurd/setresgid.c
@@ -1,5 +1,5 @@
/* setresgid -- set real group ID, effective group ID, and saved-set group ID
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 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
diff --git a/sysdeps/mach/hurd/setresuid.c b/sysdeps/mach/hurd/setresuid.c
index 7d33e205ac..3ed7dfd021 100644
--- a/sysdeps/mach/hurd/setresuid.c
+++ b/sysdeps/mach/hurd/setresuid.c
@@ -1,5 +1,5 @@
/* setresuid -- set real user ID, effective user ID, and saved-set user ID
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 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
diff --git a/sysdeps/mach/hurd/setreuid.c b/sysdeps/mach/hurd/setreuid.c
index e4e05f6e4c..12548b375b 100644
--- a/sysdeps/mach/hurd/setreuid.c
+++ b/sysdeps/mach/hurd/setreuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/setrlimit.c b/sysdeps/mach/hurd/setrlimit.c
index 2e73910652..8866f05935 100644
--- a/sysdeps/mach/hurd/setrlimit.c
+++ b/sysdeps/mach/hurd/setrlimit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -53,4 +53,5 @@ __setrlimit (enum __rlimit_resource resource, const struct rlimit *rlimits)
return 0;
}
+libc_hidden_def (__setrlimit)
weak_alias (__setrlimit, setrlimit)
diff --git a/sysdeps/mach/hurd/setsid.c b/sysdeps/mach/hurd/setsid.c
index c66466686f..7b989361d1 100644
--- a/sysdeps/mach/hurd/setsid.c
+++ b/sysdeps/mach/hurd/setsid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
@@ -21,6 +21,7 @@
#include <hurd/port.h>
#include <hurd/fd.h>
#include <hurd/ioctl.h>
+#include <lowlevellock.h>
/* Create a new session with the calling process as its leader.
The process group IDs of the session and the calling process
@@ -55,14 +56,7 @@ __setsid (void)
returned by `getpgrp ()' in other threads) has been updated before
we return. */
while (_hurd_pids_changed_stamp == stamp)
- {
-#ifdef noteven
- /* XXX we have no need for a mutex, but cthreads demands one. */
- __condition_wait (&_hurd_pids_changed_sync, NULL);
-#else
- __swtch_pri (0);
-#endif
- }
+ lll_wait (&_hurd_pids_changed_stamp, stamp, 0);
}
HURD_CRITICAL_END;
diff --git a/sysdeps/mach/hurd/setsockopt.c b/sysdeps/mach/hurd/setsockopt.c
index 70c1ee70b9..c837a7c9e9 100644
--- a/sysdeps/mach/hurd/setsockopt.c
+++ b/sysdeps/mach/hurd/setsockopt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
diff --git a/sysdeps/mach/hurd/settimeofday.c b/sysdeps/mach/hurd/settimeofday.c
index 3380e19b02..a29c488ed7 100644
--- a/sysdeps/mach/hurd/settimeofday.c
+++ b/sysdeps/mach/hurd/settimeofday.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/setuid.c b/sysdeps/mach/hurd/setuid.c
index 6fca89c288..e3c0120c98 100644
--- a/sysdeps/mach/hurd/setuid.c
+++ b/sysdeps/mach/hurd/setuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/setxattr.c b/sysdeps/mach/hurd/setxattr.c
index 5cb2a8eee3..ea23652190 100644
--- a/sysdeps/mach/hurd/setxattr.c
+++ b/sysdeps/mach/hurd/setxattr.c
@@ -1,5 +1,5 @@
/* Access to extended attributes on files. Hurd version.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
diff --git a/sysdeps/mach/hurd/shutdown.c b/sysdeps/mach/hurd/shutdown.c
index 8f87e91353..484820f275 100644
--- a/sysdeps/mach/hurd/shutdown.c
+++ b/sysdeps/mach/hurd/shutdown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
diff --git a/sysdeps/mach/hurd/sigaction.c b/sysdeps/mach/hurd/sigaction.c
index 3ff9d183f0..5f010064c9 100644
--- a/sysdeps/mach/hurd/sigaction.c
+++ b/sysdeps/mach/hurd/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/sysdeps/mach/hurd/sigaltstack.c b/sysdeps/mach/hurd/sigaltstack.c
index 316540a935..44b019aaf2 100644
--- a/sysdeps/mach/hurd/sigaltstack.c
+++ b/sysdeps/mach/hurd/sigaltstack.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
@@ -22,16 +22,16 @@
/* Run signals handlers on the stack specified by SS (if not NULL).
If OSS is not NULL, it is filled in with the old signal stack status. */
int
-__sigaltstack (const struct sigaltstack *argss, struct sigaltstack *oss)
+__sigaltstack (const stack_t *argss, stack_t *oss)
{
struct hurd_sigstate *s;
- struct sigaltstack ss, old;
+ stack_t ss, old;
/* Fault before taking any locks. */
if (argss != NULL)
ss = *argss;
if (oss != NULL)
- *(volatile struct sigaltstack *) oss = *oss;
+ *(volatile stack_t *) oss = *oss;
s = _hurd_self_sigstate ();
__spin_lock (&s->lock);
@@ -57,4 +57,5 @@ __sigaltstack (const struct sigaltstack *argss, struct sigaltstack *oss)
return 0;
}
+libc_hidden_def (__sigaltstack)
weak_alias (__sigaltstack, sigaltstack)
diff --git a/sysdeps/mach/hurd/siglist.h b/sysdeps/mach/hurd/siglist.h
index c45171603c..193ca6dec2 100644
--- a/sysdeps/mach/hurd/siglist.h
+++ b/sysdeps/mach/hurd/siglist.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2018 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
diff --git a/sysdeps/mach/hurd/sigpending.c b/sysdeps/mach/hurd/sigpending.c
index ef855329c6..ea41ddc427 100644
--- a/sysdeps/mach/hurd/sigpending.c
+++ b/sysdeps/mach/hurd/sigpending.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/sigprocmask.c b/sysdeps/mach/hurd/sigprocmask.c
index 9168224b0c..e2587afcbc 100644
--- a/sysdeps/mach/hurd/sigprocmask.c
+++ b/sysdeps/mach/hurd/sigprocmask.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -80,4 +80,5 @@ __sigprocmask (int how, const sigset_t *set, sigset_t *oset)
return 0;
}
+libc_hidden_def (__sigprocmask)
weak_alias (__sigprocmask, sigprocmask)
diff --git a/sysdeps/mach/hurd/sigstack.c b/sysdeps/mach/hurd/sigstack.c
index 4bce41365e..d87d220e39 100644
--- a/sysdeps/mach/hurd/sigstack.c
+++ b/sysdeps/mach/hurd/sigstack.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
@@ -24,7 +24,7 @@
int
sigstack (struct sigstack *ss, struct sigstack *oss)
{
- struct sigaltstack as, oas;
+ stack_t as, oas;
as.ss_sp = ss->ss_sp;
as.ss_size = 0;
diff --git a/sysdeps/mach/hurd/sigsuspend.c b/sysdeps/mach/hurd/sigsuspend.c
index bafac7e94d..7da3897722 100644
--- a/sysdeps/mach/hurd/sigsuspend.c
+++ b/sysdeps/mach/hurd/sigsuspend.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -79,5 +79,4 @@ __sigsuspend (const sigset_t *set)
return -1;
}
libc_hidden_def (__sigsuspend)
-strong_alias (__sigsuspend, sigsuspend_not_cancel)
weak_alias (__sigsuspend, sigsuspend)
diff --git a/sysdeps/mach/hurd/sigwait.c b/sysdeps/mach/hurd/sigwait.c
index ab10913f3a..ce17cce895 100644
--- a/sysdeps/mach/hurd/sigwait.c
+++ b/sysdeps/mach/hurd/sigwait.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 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
diff --git a/sysdeps/mach/hurd/socket.c b/sysdeps/mach/hurd/socket.c
index 34c66a8481..43f2c3b2b5 100644
--- a/sysdeps/mach/hurd/socket.c
+++ b/sysdeps/mach/hurd/socket.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
@@ -21,6 +21,7 @@
#include <hurd/socket.h>
#include <hurd/fd.h>
#include <fcntl.h>
+#include <fcntl-internal.h>
/* Create a new socket of type TYPE in domain DOMAIN, using
protocol PROTOCOL. If PROTOCOL is zero, one is chosen automatically.
@@ -30,6 +31,11 @@ __socket (int domain, int type, int protocol)
{
error_t err;
socket_t sock, server;
+ int flags = sock_to_o_flags (type & ~SOCK_TYPE_MASK);
+ type &= SOCK_TYPE_MASK;
+
+ if (flags & ~(O_CLOEXEC | O_NONBLOCK))
+ return __hurd_fail (EINVAL);
/* Find the socket server for DOMAIN. */
server = _hurd_socket_server (domain, 0);
@@ -55,10 +61,17 @@ __socket (int domain, int type, int protocol)
|| err == MIG_BAD_ID || err == EOPNOTSUPP)
err = EAFNOSUPPORT;
+ if (! err)
+ {
+ if (flags & O_NONBLOCK)
+ err = __io_set_some_openmodes (sock, O_NONBLOCK);
+ /* TODO: do we need special ERR massaging after the previous call? */
+ }
+
if (err)
return __hurd_fail (err);
- return _hurd_intern_fd (sock, O_IGNORE_CTTY, 1);
+ return _hurd_intern_fd (sock, O_IGNORE_CTTY | flags, 1);
}
libc_hidden_def (__socket)
diff --git a/sysdeps/mach/hurd/socketpair.c b/sysdeps/mach/hurd/socketpair.c
index 0b0d4e9417..6dce208157 100644
--- a/sysdeps/mach/hurd/socketpair.c
+++ b/sysdeps/mach/hurd/socketpair.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
@@ -17,6 +17,7 @@
#include <errno.h>
#include <fcntl.h>
+#include <fcntl-internal.h>
#include <sys/socket.h>
#include <unistd.h>
@@ -34,6 +35,11 @@ __socketpair (int domain, int type, int protocol, int fds[2])
error_t err;
socket_t server, sock1, sock2;
int d1, d2;
+ int flags = sock_to_o_flags (type & ~SOCK_TYPE_MASK);
+ type &= SOCK_TYPE_MASK;
+
+ if (flags & ~(O_CLOEXEC | O_NONBLOCK))
+ return __hurd_fail (EINVAL);
if (fds == NULL)
return __hurd_fail (EINVAL);
@@ -56,6 +62,14 @@ __socketpair (int domain, int type, int protocol, int fds[2])
return -1;
err = __socket_create (server, type, protocol, &sock1);
}
+ /* TODO: do we need special ERR massaging here, like it is done in
+ __socket? */
+ if (! err)
+ {
+ if (flags & O_NONBLOCK)
+ err = __io_set_some_openmodes (sock1, O_NONBLOCK);
+ /* TODO: do we need special ERR massaging after the previous call? */
+ }
if (err)
return __hurd_fail (err);
if (err = __socket_create (server, type, protocol, &sock2))
@@ -63,7 +77,12 @@ __socketpair (int domain, int type, int protocol, int fds[2])
__mach_port_deallocate (__mach_task_self (), sock1);
return __hurd_fail (err);
}
- if (err = __socket_connect2 (sock1, sock2))
+ if (flags & O_NONBLOCK)
+ err = __io_set_some_openmodes (sock2, O_NONBLOCK);
+ /* TODO: do we need special ERR massaging after the previous call? */
+ if (! err)
+ err = __socket_connect2 (sock1, sock2);
+ if (err)
{
__mach_port_deallocate (__mach_task_self (), sock1);
__mach_port_deallocate (__mach_task_self (), sock2);
@@ -72,17 +91,17 @@ __socketpair (int domain, int type, int protocol, int fds[2])
/* Put the sockets into file descriptors. */
- d1 = _hurd_intern_fd (sock1, O_IGNORE_CTTY, 1);
+ d1 = _hurd_intern_fd (sock1, O_IGNORE_CTTY | flags, 1);
if (d1 < 0)
{
__mach_port_deallocate (__mach_task_self (), sock2);
return -1;
}
- d2 = _hurd_intern_fd (sock2, O_IGNORE_CTTY, 1);
+ d2 = _hurd_intern_fd (sock2, O_IGNORE_CTTY | flags, 1);
if (d2 < 0)
{
err = errno;
- (void) close (d1);
+ (void) __close (d1);
return __hurd_fail (err);
}
diff --git a/sysdeps/mach/hurd/spawni.c b/sysdeps/mach/hurd/spawni.c
index 328a4bb13f..9351c13e56 100644
--- a/sysdeps/mach/hurd/spawni.c
+++ b/sysdeps/mach/hurd/spawni.c
@@ -1,5 +1,5 @@
/* spawn a new process running an executable. Hurd version.
- Copyright (C) 2001-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2018 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
@@ -22,6 +22,7 @@
#include <spawn.h>
#include <stdlib.h>
#include <string.h>
+#include <stdio.h>
#include <unistd.h>
#include <hurd.h>
#include <hurd/signal.h>
@@ -44,6 +45,9 @@ __spawni (pid_t *pid, const char *file,
{
pid_t new_pid;
char *path, *p, *name;
+ char *concat_name = NULL;
+ const char *relpath, *abspath;
+ int res;
size_t len;
size_t pathlen;
short int flags;
@@ -59,14 +63,14 @@ __spawni (pid_t *pid, const char *file,
that remains visible after an exec is registration with the proc
server, and the inheritance of various values and ports. All those
inherited values and ports are what get collected up and passed in the
- file_exec RPC by an exec call. So we do the proc server registration
- here, following the model of fork (see fork.c). We then collect up
- the inherited values and ports from this (parent) process following
- the model of exec (see hurd/hurdexec.c), modify or replace each value
- that fork would (plus the specific changes demanded by ATTRP and
- FILE_ACTIONS), and make the file_exec RPC on the requested executable
- file with the child process's task port rather than our own. This
- should be indistinguishable from the fork + exec implementation,
+ file_exec_paths RPC by an exec call. So we do the proc server
+ registration here, following the model of fork (see fork.c). We then
+ collect up the inherited values and ports from this (parent) process
+ following the model of exec (see hurd/hurdexec.c), modify or replace each
+ value that fork would (plus the specific changes demanded by ATTRP and
+ FILE_ACTIONS), and make the file_exec_paths RPC on the requested
+ executable file with the child process's task port rather than our own.
+ This should be indistinguishable from the fork + exec implementation,
except that all errors will be detected here (in the parent process)
and return proper errno codes rather than the child dying with 127.
@@ -281,6 +285,9 @@ __spawni (pid_t *pid, const char *file,
}
#endif
+ if (!err && (flags & POSIX_SPAWN_SETSID) != 0)
+ err = __proc_setsid (proc);
+
/* Set the process group ID. */
if (!err && (flags & POSIX_SPAWN_SETPGROUP) != 0)
err = __proc_setpgrp (proc, new_pid, attrp->__pgrp);
@@ -544,7 +551,7 @@ __spawni (pid_t *pid, const char *file,
if ((xflags & SPAWN_XFLAGS_USE_PATH) == 0 || strchr (file, '/') != NULL)
/* The FILE parameter is actually a path. */
- err = child_lookup (file, O_EXEC, 0, &execfile);
+ err = child_lookup (relpath = file, O_EXEC, 0, &execfile);
else
{
/* We have to search for FILE on the path. */
@@ -605,6 +612,7 @@ __spawni (pid_t *pid, const char *file,
}
// We only get here when we are done looking for the file.
+ relpath = startp;
break;
}
while (*p++ != '\0');
@@ -612,6 +620,26 @@ __spawni (pid_t *pid, const char *file,
if (err)
goto out;
+ if (relpath[0] == '/')
+ {
+ /* Already an absolute path */
+ abspath = relpath;
+ }
+ else
+ {
+ /* Relative path */
+ char *cwd = __getcwd (NULL, 0);
+ if (cwd == NULL)
+ goto out;
+
+ res = __asprintf (&concat_name, "%s/%s", cwd, relpath);
+ free (cwd);
+ if (res == -1)
+ goto out;
+
+ abspath = concat_name;
+ }
+
/* Almost there! */
{
mach_port_t ports[_hurd_nports];
@@ -621,14 +649,28 @@ __spawni (pid_t *pid, const char *file,
inline error_t exec (file_t file)
{
- return __file_exec (file, task,
- (__sigismember (&_hurdsig_traced, SIGKILL)
- ? EXEC_SIGTRAP : 0),
- args, argslen, env, envlen,
- dtable, MACH_MSG_TYPE_COPY_SEND, dtablesize,
- ports, MACH_MSG_TYPE_COPY_SEND, _hurd_nports,
- ints, INIT_INT_MAX,
- NULL, 0, NULL, 0);
+ error_t err = __file_exec_paths
+ (file, task,
+ __sigismember (&_hurdsig_traced, SIGKILL) ? EXEC_SIGTRAP : 0,
+ relpath, abspath, args, argslen, env, envlen,
+ dtable, MACH_MSG_TYPE_COPY_SEND, dtablesize,
+ ports, MACH_MSG_TYPE_COPY_SEND, _hurd_nports,
+ ints, INIT_INT_MAX,
+ NULL, 0, NULL, 0);
+
+ /* Fallback for backwards compatibility. This can just be removed
+ when __file_exec goes away. */
+ if (err == MIG_BAD_ID)
+ return __file_exec (file, task,
+ (__sigismember (&_hurdsig_traced, SIGKILL)
+ ? EXEC_SIGTRAP : 0),
+ args, argslen, env, envlen,
+ dtable, MACH_MSG_TYPE_COPY_SEND, dtablesize,
+ ports, MACH_MSG_TYPE_COPY_SEND, _hurd_nports,
+ ints, INIT_INT_MAX,
+ NULL, 0, NULL, 0);
+
+ return err;
}
/* Now we are out of things that can fail before the file_exec RPC,
@@ -747,6 +789,8 @@ __spawni (pid_t *pid, const char *file,
_hurd_port_free (dtable_cells[i], &ulink_dtable[i], dtable[i]);
}
+ free (concat_name);
+
if (err)
/* This hack canonicalizes the error code that we return. */
err = (__hurd_fail (err), errno);
diff --git a/sysdeps/mach/hurd/statfs.c b/sysdeps/mach/hurd/statfs.c
index 2bb4702d13..b64eae5182 100644
--- a/sysdeps/mach/hurd/statfs.c
+++ b/sysdeps/mach/hurd/statfs.c
@@ -1,5 +1,5 @@
/* statfs -- Return information about the filesystem on which FILE resides.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 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
diff --git a/sysdeps/mach/hurd/statfs64.c b/sysdeps/mach/hurd/statfs64.c
index cf60fee0f6..1697079fc3 100644
--- a/sysdeps/mach/hurd/statfs64.c
+++ b/sysdeps/mach/hurd/statfs64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2018 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
diff --git a/sysdeps/mach/hurd/statfsconv.c b/sysdeps/mach/hurd/statfsconv.c
index c32f4355e2..4a699d10a6 100644
--- a/sysdeps/mach/hurd/statfsconv.c
+++ b/sysdeps/mach/hurd/statfsconv.c
@@ -1,5 +1,5 @@
/* Convert between `struct statfs' format, and `struct statfs64' format.
- Copyright (C) 2001-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2018 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
diff --git a/sysdeps/mach/hurd/statvfs.c b/sysdeps/mach/hurd/statvfs.c
index 5b0fe163cf..92e197806d 100644
--- a/sysdeps/mach/hurd/statvfs.c
+++ b/sysdeps/mach/hurd/statvfs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2018 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
diff --git a/sysdeps/mach/hurd/statvfs64.c b/sysdeps/mach/hurd/statvfs64.c
index 18e6b8e0a5..f6dd8feda8 100644
--- a/sysdeps/mach/hurd/statvfs64.c
+++ b/sysdeps/mach/hurd/statvfs64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2018 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
diff --git a/sysdeps/mach/hurd/symlink.c b/sysdeps/mach/hurd/symlink.c
index 5aca56033e..d8a31ec458 100644
--- a/sysdeps/mach/hurd/symlink.c
+++ b/sysdeps/mach/hurd/symlink.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/symlinkat.c b/sysdeps/mach/hurd/symlinkat.c
index be9c65fdfb..4c4eaaaee7 100644
--- a/sysdeps/mach/hurd/symlinkat.c
+++ b/sysdeps/mach/hurd/symlinkat.c
@@ -1,5 +1,5 @@
/* Create a symbolic link named relative to an open directory. Hurd version.
- Copyright (C) 1991-2016 Free Software Foundation, Inc.
+ Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/sync.c b/sysdeps/mach/hurd/sync.c
index 4d9fb6c853..ed5709ca34 100644
--- a/sysdeps/mach/hurd/sync.c
+++ b/sysdeps/mach/hurd/sync.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/syncfs.c b/sysdeps/mach/hurd/syncfs.c
index 0b65f22220..eb57f5dfed 100644
--- a/sysdeps/mach/hurd/syncfs.c
+++ b/sysdeps/mach/hurd/syncfs.c
@@ -1,6 +1,6 @@
/* Make all changes done to all files on the file system associated
with FD actually appear on disk.
- Copyright (C) 2012-2016 Free Software Foundation, Inc.
+ Copyright (C) 2012-2018 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
diff --git a/sysdeps/mach/hurd/sysconf.c b/sysdeps/mach/hurd/sysconf.c
index 5c8220516e..b9d837a83f 100644
--- a/sysdeps/mach/hurd/sysconf.c
+++ b/sysdeps/mach/hurd/sysconf.c
@@ -1,5 +1,5 @@
/* Return values of system parameters. Hurd version.
- Copyright (C) 2012-2016 Free Software Foundation, Inc.
+ Copyright (C) 2012-2018 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
diff --git a/sysdeps/mach/hurd/sysdep-cancel.h b/sysdeps/mach/hurd/sysdep-cancel.h
new file mode 100644
index 0000000000..ec55c7330f
--- /dev/null
+++ b/sysdeps/mach/hurd/sysdep-cancel.h
@@ -0,0 +1,9 @@
+#include <sysdep.h>
+
+/* Always multi-thread (since there's at least the sig handler), but no
+ handling enabled. */
+#define SINGLE_THREAD_P (0)
+#define RTLD_SINGLE_THREAD_P (0)
+#define LIBC_CANCEL_ASYNC() 0 /* Just a dummy value. */
+#define LIBC_CANCEL_RESET(val) ((void)(val)) /* Nothing, but evaluate it. */
+#define LIBC_CANCEL_HANDLED() /* Nothing. */
diff --git a/sysdeps/mach/hurd/telldir.c b/sysdeps/mach/hurd/telldir.c
index 8a53d3aa75..5ff62f359f 100644
--- a/sysdeps/mach/hurd/telldir.c
+++ b/sysdeps/mach/hurd/telldir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
diff --git a/sysdeps/mach/hurd/times.c b/sysdeps/mach/hurd/times.c
index 27f510f1ef..246280115a 100644
--- a/sysdeps/mach/hurd/times.c
+++ b/sysdeps/mach/hurd/times.c
@@ -1,5 +1,5 @@
/* Return CPU and real time used by process and its children. Hurd version.
- Copyright (C) 2001-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2018 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
diff --git a/sysdeps/mach/hurd/tls.h b/sysdeps/mach/hurd/tls.h
index 67ed17d00d..67c657b655 100644
--- a/sysdeps/mach/hurd/tls.h
+++ b/sysdeps/mach/hurd/tls.h
@@ -1,5 +1,5 @@
/* Definitions for thread-local data handling. Hurd version.
- Copyright (C) 2003-2016 Free Software Foundation, Inc.
+ Copyright (C) 2003-2018 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
@@ -27,6 +27,7 @@
# include <sysdep.h>
# include <mach/mig_errors.h>
# include <mach.h>
+# include <atomic.h>
/* This is the size of the initial TCB. */
@@ -51,6 +52,26 @@
# define GET_DTV(descr) \
(((tcbhead_t *) (descr))->dtv)
+/* Global scope switch support. */
+#define THREAD_GSCOPE_IN_TCB 0
+#define THREAD_GSCOPE_GLOBAL
+#define THREAD_GSCOPE_SET_FLAG() \
+ atomic_exchange_and_add_acq (&GL(dl_thread_gscope_count), 1)
+#define THREAD_GSCOPE_RESET_FLAG() \
+ do \
+ if (atomic_exchange_and_add_rel (&GL(dl_thread_gscope_count), -1) == 1) \
+ lll_wake (&GL(dl_thread_gscope_count), 0); \
+ while (0)
+#define THREAD_GSCOPE_WAIT() \
+ do \
+ { \
+ int count; \
+ atomic_write_barrier (); \
+ while ((count = GL(dl_thread_gscope_count))) \
+ lll_wait (&GL(dl_thread_gscope_count), count, 0); \
+ } \
+ while (0)
+
#endif /* !ASSEMBLER */
diff --git a/sysdeps/mach/hurd/tmpfile.c b/sysdeps/mach/hurd/tmpfile.c
index 5e09f8a36d..488bb6ae2b 100644
--- a/sysdeps/mach/hurd/tmpfile.c
+++ b/sysdeps/mach/hurd/tmpfile.c
@@ -1,5 +1,5 @@
/* Open a stdio stream on an anonymous temporary file. Hurd version.
- Copyright (C) 2001-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2018 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
diff --git a/sysdeps/mach/hurd/truncate.c b/sysdeps/mach/hurd/truncate.c
index 5039a474b0..e3fc452511 100644
--- a/sysdeps/mach/hurd/truncate.c
+++ b/sysdeps/mach/hurd/truncate.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/truncate64.c b/sysdeps/mach/hurd/truncate64.c
new file mode 100644
index 0000000000..0d30a1cc01
--- /dev/null
+++ b/sysdeps/mach/hurd/truncate64.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1991-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <hurd.h>
+
+/* Truncate FILE_NAME to LENGTH bytes. */
+int
+__truncate64 (const char *file_name, off64_t length)
+{
+ error_t err;
+ file_t file = __file_name_lookup (file_name, O_WRITE, 0);
+
+ if (file == MACH_PORT_NULL)
+ return -1;
+
+ err = __file_set_size (file, length);
+ __mach_port_deallocate (__mach_task_self (), file);
+
+ if (err)
+ return __hurd_fail (err);
+ return 0;
+}
+
+weak_alias (__truncate64, truncate64)
diff --git a/sysdeps/mach/hurd/ttyname.c b/sysdeps/mach/hurd/ttyname.c
index 73944e9e3d..f500095650 100644
--- a/sysdeps/mach/hurd/ttyname.c
+++ b/sysdeps/mach/hurd/ttyname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 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
diff --git a/sysdeps/mach/hurd/ttyname_r.c b/sysdeps/mach/hurd/ttyname_r.c
index 1e984a3f66..b307080b6d 100644
--- a/sysdeps/mach/hurd/ttyname_r.c
+++ b/sysdeps/mach/hurd/ttyname_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 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
diff --git a/sysdeps/mach/hurd/umask.c b/sysdeps/mach/hurd/umask.c
index b1e81dcaab..420e35a5fc 100644
--- a/sysdeps/mach/hurd/umask.c
+++ b/sysdeps/mach/hurd/umask.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/uname.c b/sysdeps/mach/hurd/uname.c
index e62ce8eea1..2d5323e32d 100644
--- a/sysdeps/mach/hurd/uname.c
+++ b/sysdeps/mach/hurd/uname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
diff --git a/sysdeps/mach/hurd/unlink.c b/sysdeps/mach/hurd/unlink.c
index 30e34efde5..6376fefd57 100644
--- a/sysdeps/mach/hurd/unlink.c
+++ b/sysdeps/mach/hurd/unlink.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/unlinkat.c b/sysdeps/mach/hurd/unlinkat.c
index 8d6fa7cc29..f20a0f20a0 100644
--- a/sysdeps/mach/hurd/unlinkat.c
+++ b/sysdeps/mach/hurd/unlinkat.c
@@ -1,5 +1,5 @@
/* unlinkat -- Remove a name relative to an open directory. Hurd version.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 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
diff --git a/sysdeps/mach/hurd/utime-helper.c b/sysdeps/mach/hurd/utime-helper.c
new file mode 100644
index 0000000000..6aed3316a7
--- /dev/null
+++ b/sysdeps/mach/hurd/utime-helper.c
@@ -0,0 +1,154 @@
+/* Helpers for utimes/utimens conversions.
+ Copyright (C) 2015-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <hurd/hurd_types.h>
+#include <stddef.h>
+#include <sys/time.h>
+
+/* Initializes atime/mtime timespec structures from an array of timeval. */
+static inline void
+utime_ts_from_tval (const struct timeval tvp[2],
+ struct timespec *atime, struct timespec *mtime)
+{
+ if (tvp == NULL)
+ {
+ /* Setting the number of nanoseconds to UTIME_NOW tells the
+ underlying filesystems to use the current time. */
+ atime->tv_sec = 0;
+ atime->tv_nsec = UTIME_NOW;
+ mtime->tv_sec = 0;
+ mtime->tv_nsec = UTIME_NOW;
+ }
+ else
+ {
+ TIMEVAL_TO_TIMESPEC (&tvp[0], atime);
+ TIMEVAL_TO_TIMESPEC (&tvp[1], mtime);
+ }
+}
+
+/* Initializes atime/mtime time_value_t structures from an array of timeval. */
+static inline void
+utime_tvalue_from_tval (const struct timeval tvp[2],
+ time_value_t *atime, time_value_t *mtime)
+{
+ if (tvp == NULL)
+ /* Setting the number of microseconds to `-1' tells the
+ underlying filesystems to use the current time. */
+ atime->microseconds = mtime->microseconds = -1;
+ else
+ {
+ atime->seconds = tvp[0].tv_sec;
+ atime->microseconds = tvp[0].tv_usec;
+ mtime->seconds = tvp[1].tv_sec;
+ mtime->microseconds = tvp[1].tv_usec;
+ }
+}
+
+/* Changes the access time of the file behind PORT using a timeval array. */
+static inline error_t
+hurd_futimes (const file_t port, const struct timeval tvp[2])
+{
+ error_t err;
+ struct timespec atime, mtime;
+
+ utime_ts_from_tval (tvp, &atime, &mtime);
+
+ err = __file_utimens (port, atime, mtime);
+
+ if (err == MIG_BAD_ID || err == EOPNOTSUPP)
+ {
+ time_value_t atim, mtim;
+
+ utime_tvalue_from_tval (tvp, &atim, &mtim);
+
+ err = __file_utimes (port, atim, mtim);
+ }
+
+ return err;
+}
+
+/* Initializes atime/mtime timespec structures from an array of timespec. */
+static inline void
+utime_ts_from_tspec (const struct timespec tsp[2],
+ struct timespec *atime, struct timespec *mtime)
+{
+ if (tsp == NULL)
+ {
+ /* Setting the number of nanoseconds to UTIME_NOW tells the
+ underlying filesystems to use the current time. */
+ atime->tv_sec = 0;
+ atime->tv_nsec = UTIME_NOW;
+ mtime->tv_sec = 0;
+ mtime->tv_nsec = UTIME_NOW;
+ }
+ else
+ {
+ *atime = tsp[0];
+ *mtime = tsp[1];
+ }
+}
+
+/* Initializes atime/mtime time_value_t structures from an array of timespec. */
+static inline void
+utime_tvalue_from_tspec (const struct timespec tsp[2],
+ time_value_t *atime, time_value_t *mtime)
+{
+ if (tsp == NULL)
+ /* Setting the number of microseconds to `-1' tells the
+ underlying filesystems to use the current time. */
+ atime->microseconds = mtime->microseconds = -1;
+ else
+ {
+ if (tsp[0].tv_nsec == UTIME_NOW)
+ atime->microseconds = -1;
+ else if (tsp[0].tv_nsec == UTIME_OMIT)
+ atime->microseconds = -2;
+ else
+ TIMESPEC_TO_TIME_VALUE (atime, &(tsp[0]));
+ if (tsp[1].tv_nsec == UTIME_NOW)
+ mtime->microseconds = -1;
+ else if (tsp[1].tv_nsec == UTIME_OMIT)
+ mtime->microseconds = -2;
+ else
+ TIMESPEC_TO_TIME_VALUE (mtime, &(tsp[1]));
+ }
+}
+
+/* Changes the access time of the file behind PORT using a timespec array. */
+static inline error_t
+hurd_futimens (const file_t port, const struct timespec tsp[2])
+{
+ error_t err;
+ struct timespec atime, mtime;
+
+ utime_ts_from_tspec (tsp, &atime, &mtime);
+
+ err = __file_utimens (port, atime, mtime);
+
+ if (err == MIG_BAD_ID || err == EOPNOTSUPP)
+ {
+ time_value_t atim, mtim;
+
+ utime_tvalue_from_tspec (tsp, &atim, &mtim);
+
+ err = __file_utimes (port, atim, mtim);
+ }
+
+ return err;
+}
diff --git a/sysdeps/mach/hurd/utimensat.c b/sysdeps/mach/hurd/utimensat.c
new file mode 100644
index 0000000000..ac9bc534c8
--- /dev/null
+++ b/sysdeps/mach/hurd/utimensat.c
@@ -0,0 +1,46 @@
+/* Change access and modification times of open file. Hurd version.
+ Copyright (C) 1991-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sys/time.h>
+#include <errno.h>
+#include <stddef.h>
+#include <hurd.h>
+#include <hurd/fd.h>
+
+#include "utime-helper.c"
+
+/* Change the access time of FILE to TSP[0] and
+ the modification time of FILE to TSP[1]. */
+int
+utimensat (int fd, const char *file, const struct timespec tsp[2],
+ int flags)
+{
+ error_t err;
+ file_t port;
+
+ port = __file_name_lookup_at (fd, flags, file, 0, 0);
+ if (port == MACH_PORT_NULL)
+ return -1;
+
+ err = hurd_futimens (port, tsp);
+
+ __mach_port_deallocate (__mach_task_self (), port);
+ if (err)
+ return __hurd_fail (err);
+ return 0;
+}
diff --git a/sysdeps/mach/hurd/utimes.c b/sysdeps/mach/hurd/utimes.c
index 121b456232..bdf4d79790 100644
--- a/sysdeps/mach/hurd/utimes.c
+++ b/sysdeps/mach/hurd/utimes.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* utimes -- change access and modification times of file. Hurd version.
+ Copyright (C) 1991-2018 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
@@ -20,33 +21,22 @@
#include <stddef.h>
#include <hurd.h>
+#include "utime-helper.c"
+
/* Change the access time of FILE to TVP[0] and
the modification time of FILE to TVP[1]. */
int
__utimes (const char *file, const struct timeval tvp[2])
{
- union tv
- {
- struct timeval tv;
- time_value_t tvt;
- };
- const union tv *u = (const union tv *) tvp;
- union tv nulltv[2];
error_t err;
file_t port;
- if (tvp == NULL)
- {
- /* Setting the number of microseconds to `-1' tells the
- underlying filesystems to use the current time. */
- nulltv[0].tvt.microseconds = nulltv[1].tvt.microseconds = -1;
- u = nulltv;
- }
-
port = __file_name_lookup (file, 0, 0);
if (port == MACH_PORT_NULL)
return -1;
- err = __file_utimes (port, u[0].tvt, u[1].tvt);
+
+ err = hurd_futimes (port, tvp);
+
__mach_port_deallocate (__mach_task_self (), port);
if (err)
return __hurd_fail (err);
diff --git a/sysdeps/mach/hurd/wait4.c b/sysdeps/mach/hurd/wait4.c
index 3bc9fa83fb..a72bcee145 100644
--- a/sysdeps/mach/hurd/wait4.c
+++ b/sysdeps/mach/hurd/wait4.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
@@ -22,8 +22,7 @@
#include <hurd/port.h>
pid_t
-__wait4 (pid_t pid, __WAIT_STATUS_DEFN stat_loc, int options,
- struct rusage *usage)
+__wait4 (pid_t pid, int *stat_loc, int options, struct rusage *usage)
{
pid_t dead;
error_t err;
diff --git a/sysdeps/mach/hurd/write.c b/sysdeps/mach/hurd/write.c
index 4f9deecdab..3cf748be9d 100644
--- a/sysdeps/mach/hurd/write.c
+++ b/sysdeps/mach/hurd/write.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
@@ -30,3 +30,4 @@ libc_hidden_def (__libc_write)
weak_alias (__libc_write, __write)
libc_hidden_weak (__write)
weak_alias (__libc_write, write)
+libc_hidden_weak (write)
diff --git a/sysdeps/mach/hurd/x86/dl-sysdep.c b/sysdeps/mach/hurd/x86/dl-sysdep.c
new file mode 100644
index 0000000000..abb488cde9
--- /dev/null
+++ b/sysdeps/mach/hurd/x86/dl-sysdep.c
@@ -0,0 +1,21 @@
+/* Operating system support for run-time dynamic linker. X86 version.
+ Copyright (C) 2017-2018 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <sysdeps/x86/cpu-tunables.c>
+#include <sysdeps/mach/hurd/dl-sysdep.c>
diff --git a/sysdeps/mach/hurd/xmknod.c b/sysdeps/mach/hurd/xmknod.c
index fc9d5ce550..d6b8adce9b 100644
--- a/sysdeps/mach/hurd/xmknod.c
+++ b/sysdeps/mach/hurd/xmknod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 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
diff --git a/sysdeps/mach/hurd/xmknodat.c b/sysdeps/mach/hurd/xmknodat.c
index 514b79a29b..e4e866c4f4 100644
--- a/sysdeps/mach/hurd/xmknodat.c
+++ b/sysdeps/mach/hurd/xmknodat.c
@@ -1,5 +1,5 @@
/* Create a device file relative to an open directory. Hurd version.
- Copyright (C) 1991-2016 Free Software Foundation, Inc.
+ Copyright (C) 1991-2018 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
@@ -25,6 +25,7 @@
#include <_itoa.h>
#include <string.h>
#include <sys/types.h>
+#include <sys/sysmacros.h>
/* Create a device file named PATH relative to FD, with permission and
special bits MODE and device number DEV (which can be constructed
@@ -80,9 +81,9 @@ __xmknodat (int vers, int fd, const char *path, mode_t mode, dev_t *dev)
bp = buf + sizeof (buf);
*--bp = '\0';
- bp = _itoa (minor (*dev), bp, 10, 0);
+ bp = _itoa (__gnu_dev_minor (*dev), bp, 10, 0);
*--bp = '\0';
- bp = _itoa (major (*dev), bp, 10, 0);
+ bp = _itoa (__gnu_dev_major (*dev), bp, 10, 0);
memcpy (bp - len, translator, len);
translator = bp - len;
len = buf + sizeof (buf) - translator;
diff --git a/sysdeps/mach/hurd/xstat.c b/sysdeps/mach/hurd/xstat.c
index 9828a33c60..46314706f3 100644
--- a/sysdeps/mach/hurd/xstat.c
+++ b/sysdeps/mach/hurd/xstat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2018 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
diff --git a/sysdeps/mach/hurd/xstat64.c b/sysdeps/mach/hurd/xstat64.c
index 9ea2b49ecc..f3a8ddc6e7 100644
--- a/sysdeps/mach/hurd/xstat64.c
+++ b/sysdeps/mach/hurd/xstat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2018 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
diff --git a/sysdeps/mach/hurd/xstatconv.c b/sysdeps/mach/hurd/xstatconv.c
index 37feaa20e3..1aa8aff317 100644
--- a/sysdeps/mach/hurd/xstatconv.c
+++ b/sysdeps/mach/hurd/xstatconv.c
@@ -1,5 +1,5 @@
/* Convert between `struct stat' format, and `struct stat64' format.
- Copyright (C) 2000-2016 Free Software Foundation, Inc.
+ Copyright (C) 2000-2018 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