summaryrefslogtreecommitdiff
path: root/hurd
AgeCommit message (Collapse)Author
2018-12-27fix mergeSamuel Thibault
2018-12-27fix mergeSamuel Thibault
2018-12-27Merge branch 't/ONSTACK' into refs/top-bases/tschwinge/Roger_WhittakerSamuel Thibault
2018-12-27Merge branch 't/hurdsig-SA_SIGINFO' into ↵Samuel Thibault
refs/top-bases/tschwinge/Roger_Whittaker
2018-12-27Merge branch 't/tls-threadvar' into refs/top-bases/tschwinge/Roger_WhittakerSamuel Thibault
2018-12-27Merge branch 't/tls' into refs/top-bases/tschwinge/Roger_WhittakerSamuel Thibault
2018-12-27Merge branch 't/hurdsig-global-dispositions' into refs/top-bases/t/ONSTACKSamuel Thibault
2018-12-27Merge branch 't/tls-threadvar' into refs/top-bases/t/ONSTACKSamuel Thibault
2018-12-27Merge commit 'refs/top-bases/t/hurdsig-SA_SIGINFO' into t/hurdsig-SA_SIGINFOSamuel Thibault
2018-12-27Merge commit 'refs/top-bases/t/hurdsig-global-dispositions' into ↵Samuel Thibault
t/hurdsig-global-dispositions
2018-12-27Merge commit 'refs/top-bases/t/hurdsig-fixes' into t/hurdsig-fixesSamuel Thibault
2018-08-01hurd: Fix exec usage of mach_setup_threadSamuel Thibault
Exec needs that mach_setup_thread does *not* set up TLS since it works on another task, so we have to split this into mach_setup_tls. * mach/mach.h (__mach_setup_tls, mach_setup_tls): Add prototypes. * mach/setup-thread.c (__mach_setup_thread): Move TLS setup to... (__mach_setup_tls): ... new function. (mach_setup_tls): New alias. * hurd/hurdsig.c (_hurdsig_init): Call __mach_setup_tls after __mach_setup_thread. * sysdeps/mach/hurd/profil.c (update_waiter): Likewise. * sysdeps/mach/hurd/setitimer.c (setitimer_locked): Likewise. * mach/Versions [libc] (mach_setup_tls): Add symbol. * sysdeps/mach/hurd/i386/libc.abilist (mach_setup_tls): Likewise.
2018-06-01Merge branch 't/thread-linkspace' into refs/top-bases/tschwinge/Roger_WhittakerSamuel Thibault
2018-06-01Merge branch 't/extern_inline' into refs/top-bases/tschwinge/Roger_WhittakerSamuel Thibault
2018-06-01Include pthreadP.h for __cthread_forkSamuel Thibault
2018-06-01fix typoSamuel Thibault
2018-04-04hurd: Silence warningSamuel Thibault
* hurd/hurdsig.c (interrupted_reply_port_location): Use DIAG_IGNORE_NEEDS_COMMENT to silence warning with GCC 6 and before.
2018-04-03Revert parts of "hurd: Avoid more libc.so local PLTs"Samuel Thibault
This reverts parts of commit 82dbf555a4d41690f63b94ccb4db4bf43d873aa0.
2018-04-03hurd: Avoid more libc.so local PLTsSamuel Thibault
* hurd/catch-signal.c (__hurd_catch_signal): Call __libc_siglongjmp instead if siglongjmp. (hurd_safe_memmove): Call __libc_longjmp instead of longjmp. * hurd/hurdfault.c (faulted): Call __libc_longjmp instead of longjmp. * include/setjmp.h (__libc_siglongjmp, __libc_longjmp): New hidden prototypes. * libio/iolibio.h (_IO_puts): New hidden prototype. * libio/ioputs.c (_IO_puts): New hidden def. * setjmp/longjmp.c (__libc_longjmp, __libc_siglongjmp): New hidden defs. * sysdeps/mach/hurd/sigwait.c (__sigwait): Call __libc_longjmp instead of longjmp.
2018-04-02hurd: Avoid more libc.so PLTsSamuel Thibault
* sysdeps/hurd/include/hurd/signal.h (_hurd_raise_signal): Add hidden prototype. * hurd/hurd-raise.c (_hurd_raise_signal): Add hidden def. * hurd/Makefile ($(inlines:%=$(objpfx)%.c): Define _HEADER_H_HIDDEN_DEF macro. * sysdeps/hurd/include/hurd/fd.h (_hurd_fd_error, _hurd_fd_error_signal): Add hidden prototype. [_HURD_FD_H_HIDDEN_DEF] (_hurd_fd_error, _hurd_fd_error_signal): Add hidden def.
2018-04-02hurd: Avoid some libc.so PLTsSamuel Thibault
* hurd/catch-signal.c (hurd_catch_signal): Rename to __hurd_catch_signal. (hurd_catch_signal): New strong alias. (hurd_safe_memset, hurd_safe_copyout, hurd_safe_copyin): Call __hurd_catch_signal instead of hurd_catch_signal. * hurd/exc2signal.c (_hurd_exception2signal): Add hidden def. * hurd/hurdexec.c (_hurd_init): Add hidden def. * hurd/hurdinit.c (_hurd_init): Add hidden def. * hurd/hurdsig.c: Include <mach/mig_support.h>. (_hurd_thread_sigstate): Add hidden def. (_hurd_internal_post_signal): Use __mutex_unlock instead of mutex_unlock. * hurd/intern-fd.c (_hurd_intern_fd): Add hidden def. * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): Add hidden def. * hurd/path-lookup.c (hurd_file_name_path_lookup): Rename to __hurd_file_name_path_lookup. (hurd_file_name_path_lookup): New strong alias. (file_name_path_lookup): Call __hurd_file_name_path_lookup instead of hurd_file_name_path_lookup. * mach/errstring.c (mach_error_type): Add hidden def. * mach/msg-destroy.c (__mach_msg_destroy): Add hidden def. * mach/mutex-init.c (__mutex_init): Add hidden def. * mach/spin-lock.c (__spin_lock_locked, __spin_lock, __spin_unlock, __spin_try_lock, __mutex_lock, __mutex_trylock): Add hidden defs. * mach/spin-solid.c (__spin_lock_solid): Add hidden def. * sysdeps/mach/hurd/getcwd.c (_hurd_canonicalize_directory_name_internal): Rename to __hurd_canonicalize_directory_name_internal. (_hurd_canonicalize_directory_name_internal): New strong alias. (__canonicalize_directory_name_internal, __getcwd): Call __hurd_canonicalize_directory_name_internal instead of _hurd_canonicalize_directory_name_internal. * sysdeps/mach/hurd/mig-reply.c: Include <mach/mig_support.h>. (__mig_get_reply_port, __mig_dealloc_reply_port, __mig_init): Add hidden defs. * sysdeps/hurd/include/hurd.h: New file. * sysdeps/hurd/include/hurd/fd.h: New file. * sysdeps/hurd/include/hurd/signal.h: New file. * sysdeps/mach/include/lock-intern.h: New file. * sysdeps/mach/include/mach.h: New file. * sysdeps/mach/include/mach/mig_support.h: New file. * sysdeps/mach/include/mach_error.h: New file.
2018-04-02hurd: Avoid some PLTs in libc and librtSamuel Thibault
* hurd/hurdauth.c (_S_msg_add_auth): Call __vm_allocate and __vm_deallocate instead of vm_allocate and vm_deallocate. * hurd/hurdmsg.c (_S_msg_set_env_variable): Call __setenv instead of setenv. * hurd/hurdprio.c (_hurd_priority_which_map): Call __geteuid instead of geteuid. * hurd/path-lookup.c (file_name_path_scan): Call __strdup instead of strdup. * hurd/siginfo.c: Include <libioP.h>. (_hurd_siginfo_handler): Call _IO_puts instead of puts. * hurd/xattr.c (_hurd_xattr_get, _hurd_xattr_set): Call __munmap instead of munmap. * io/fts.c (fts_build): Call __dirfd instead of dirfd. * mach/devstream.c: Include <libioP.h>. (dealloc_ref): Call __mach_port_deallocate instead of mach_port_deallocate. (mach_open_devstream): Call _IO_fopencookie instead of fopencookie. Call __mach_port_deallocate instead of mach_port_deallocate. * stdlib/canonicalize.c (__realpath): Call __pathconf instead of pathconf. * sysdeps/mach/hurd/ifreq.c (__ifreq): Call __munmap instead of munmap. * sysdeps/mach/hurd/ifreq.h (__if_freereq): Likewise. * sysdeps/mach/hurd/ptrace.c (ptrace): Call __kill instead of kill. * sysdeps/mach/hurd/sendfile64.c (sendfile64): Call __munmap instead of munmap. * sysdeps/mach/hurd/socketpair.c (__socketpair): Call __close instead of close. * sysdeps/posix/clock_getres.c (realtime_getres): Call __sysconf instead of sysconf. * sysdeps/pthread/timer_gettime.c (timer_gettime): Call __clock_gettime instead of clock_gettime. * sysdeps/pthread/timer_routines.c (thread_func): Likewise. * sysdeps/pthread/timer_settime.c (timer_settime): Likewise. * sysdeps/unix/bsd/gtty.c (gtty): Call __ioctl instead of ioctl. * sysdeps/unix/bsd/stty.c (stty): Likewise. * sysdeps/unix/bsd/tcflow.c (tcflow): Call __tcgetattr instead of tcgetattr. * sysdeps/unix/clock_nanosleep.c (__clock_nanosleep): Call __clock_gettime and __nanosleep instead of clock_gettime and nanosleep.
2018-03-20hurd: Code style fixesSamuel Thibault
No code change.
2018-03-19hurd: Fix build with latest htlSamuel Thibault
* hurd/hurdsig.c: Include <pthreadP.h> instead of <pthread.h>.
2018-03-18hurd: Fix O_DIRECTORY | O_NOFOLLOWSamuel Thibault
Appending / to the path to be looked up would make us always follow a final symlink, even with O_NOTRANS (since the final resolution is after the '/'). In the O_DIRECTORY | O_NOFOLLOW case, we thus have to really open the node and stat it, which we already do anyway, and check for directory type. * hurd/hurdlookup.c (__hurd_file_name_lookup): Do not append '/' to path when flags contains O_NOFOLLOW. * hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Return ENOTDIR if flags contains O_DIRECTORY and the result is a directory.
2018-03-18hurd: Fix O_NOFOLLOWSamuel Thibault
The error code documented by POSIX for opening a symlink with O_NOFOLLOW is ELOOP. Also, if the translator does not expose symlink as a symlink translator but as a S_IFLNK file, O_NOFOLLOW needs to return ELOOP too. * hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Return ELOOP when opening a symlink with O_NOFOLLOW.
2018-03-18hurd: Fix copyright yearsSamuel Thibault
2018-03-18hurd: Reimplement libc locks using mach's gsyncAgustina Arzille
* hurd/Makefile (routines): Add hurdlock. * hurd/Versions (GLIBC_PRIVATE): Added new entry to export the above interface. (HURD_CTHREADS_0.3): Remove __libc_getspecific. * hurd/hurdpid.c: Include <lowlevellock.h> (_S_msg_proc_newids): Use lll_wait to synchronize. * hurd/hurdsig.c: (reauth_proc): Use __mutex_lock and __mutex_unlock. * hurd/setauth.c: Include <hurdlock.h>, use integer for synchronization. * mach/Makefile (lock-headers): Remove machine-lock.h. * mach/lock-intern.h: Include <lowlevellock.h> instead of <machine-lock.h>. (__spin_lock_t): New type. (__SPIN_LOCK_INITIALIZER): New macro. (__spin_lock, __spin_unlock, __spin_try_lock, __spin_lock_locked, __mutex_init, __mutex_lock_solid, __mutex_unlock_solid, __mutex_lock, __mutex_unlock, __mutex_trylock): Use lll to implement locks. * mach/mutex-init.c: Include <lowlevellock.h> instead of <cthreads.h>. (__mutex_init): Initialize with lll. * manual/errno.texi (EOWNERDEAD, ENOTRECOVERABLE): New errno values. * sysdeps/mach/Makefile: Add libmachuser as dependencies for libs needing lll. * sysdeps/mach/hurd/bits/errno.h: Regenerate. * sysdeps/mach/hurd/cthreads.c (__libc_getspecific): Remove function. * sysdeps/mach/hurd/bits/libc-lock.h: Remove file. * sysdeps/mach/hurd/setpgid.c: Include <lowlevellock.h>. (__setpgid): Use lll for synchronization. * sysdeps/mach/hurd/setsid.c: Likewise with __setsid. * sysdeps/mach/bits/libc-lock.h: Include <tls.h> and <lowlevellock.h> instead of <cthreads.h>. (_IO_lock_inexpensive): New macro (__libc_lock_recursive_t, __rtld_lock_recursive_t): New structures. (__libc_lock_self0): New declaration. (__libc_lock_owner_self): New macro. (__libc_key_t): Remove type. (_LIBC_LOCK_INITIALIZER): New macro. (__libc_lock_define_initialized, __libc_lock_init, __libc_lock_fini, __libc_lock_fini_recursive, __rtld_lock_fini_recursive, __libc_lock_lock, __libc_lock_trylock, __libc_lock_unlock, __libc_lock_define_initialized_recursive, __rtld_lock_define_initialized_recursive, __libc_lock_init_recursive, __libc_lock_trylock_recursive, __libc_lock_lock_recursive, __libc_lock_unlock_recursive, __rtld_lock_initialize, __rtld_lock_trylock_recursive, __rtld_lock_lock_recursive, __rtld_lock_unlock_recursive __libc_once_define, __libc_mutex_unlock): Reimplement with lll. (__libc_lock_define_recursive, __rtld_lock_define_recursive, _LIBC_LOCK_RECURSIVE_INITIALIZER, _RTLD_LOCK_RECURSIVE_INITIALIZER): New macros. Include <libc-lockP.h> to reimplement libc_key* with pthread_key*. * hurd/hurdlock.c: New file. * hurd/hurdlock.h: New file. * mach/lowlevellock.h: New file
2018-03-18hurd: Fix coding styleSamuel Thibault
2018-03-17hurd: Fix link cthread/pthread symbol exposition.Samuel Thibault
* hurd/Versions (HURD_CTHREADS_0.3): Rename weak refs cthread_fork, cthread_detach, pthread_getattr_np, pthread_attr_getstack, cthread_keycreate, cthread_getspecific, cthread_setspecific to __cthread_fork, __cthread_detach, __pthread_getattr_np, __pthread_attr_getstack, __cthread_keycreate, __cthread_getspecific, __cthread_setspecific. * hurd/hurdsig.c (_hurdsig_init): Use __cthread_fork, __cthread_detach, __pthread_getattr_np, __pthread_attr_getstack, __cthread_t instead of cthread_fork, cthread_detach, pthread_getattr_np, pthread_attr_getstack. * sysdeps/mach/hurd/cthreads.c (cthread_keycreate): Rename to __cthread_keycreate. (cthread_getspecific): Rename to __cthread_getspecific. (cthread_setspecific): Rename to __cthread_setspecific. (__libc_getspecific): Use __cthread_getspecific instead of cthread_getspecific. * sysdeps/mach/hurd/libc-lock.h (__libc_key_create): Use __cthread_keycreate instead of cthread_keycreate. (__libc_setspecific): Use __cthread_setspecific instead of cthread_setspecific. * sysdeps/mach/libc-lock.h (__libc_key_create, __libc_setspecific): Likewise.
2018-03-17hurd: Replace threadvars with TLSSamuel Thibault
This gets rid of a lot of kludge and gets closer to other ports. * hurd/Makefile (headers): Remove threadvar.h. (inline-headers): Remove threadvar.h. * hurd/Versions (GLIBC_2.0: Remove __hurd_sigthread_stack_base, __hurd_sigthread_stack_end, __hurd_sigthread_variables, __hurd_threadvar_max, __hurd_errno_location. (HURD_CTHREADS_0.3): Add pthread_getattr_np, pthread_attr_getstack. * hurd/hurd/signal.h: Do not include <hurd/threadvar.h>. (_hurd_self_sigstate): Use THREAD_SELF to get _hurd_sigstate. (_HURD_SIGNAL_H_EXTERN_INLINE): Use THREAD_SELF to get _hurd_sigstate, unless TLS is not initialized yet, in which case we do not need a critical section yet anyway. * hurd/hurd/threadvar.h: Include <tls.h>, do not include <machine-sp.h>. (__hurd_sigthread_variables, __hurd_threadvar_max): Remove variables declarations. (__hurd_threadvar_index): Remove enum. (_HURD_THREADVAR_H_EXTERN_INLINE): Remove macro. (__hurd_threadvar_location_from_sp,__hurd_threadvar_location): Remove inlines. (__hurd_reply_port0): New variable declaration. (__hurd_local_reply_port): New macro. * hurd/hurdsig.c (__hurd_sigthread_variables): Remove variable. (interrupted_reply_port_location): Add thread_t parameter. Use it with THREAD_TCB to access thread-local variables. (_hurdsig_abort_rpcs): Pass ss->thread to interrupted_reply_port_location. (_hurd_internal_post_signal): Likewise. (_hurdsig_init): Use presence of cthread_fork instead of __hurd_threadvar_stack_mask to start signal thread by hand. Remove signal thread threadvar initialization. * hurd/hurdstartup.c: Do not include <hurd/threadvar.h> * hurd/sigunwind.c: Include <hurd/threadvar.h> (_hurdsig_longjmp_from_handler): Use __hurd_local_reply_port instead of threadvar. * sysdeps/mach/hurd/Versions (libc.GLIBC_PRIVATE): Add __libc_lock_self0. (ld.GLIBC_2.0): Remove __hurd_sigthread_stack_base, __hurd_sigthread_stack_end, __hurd_sigthread_variables. (ld.GLIBC_PRIVATE): Add __libc_lock_self0. * sysdeps/mach/hurd/cthreads.c: Add __libc_lock_self0. * sysdeps/mach/hurd/dl-sysdep.c (errno, __hurd_sigthread_stack_base, __hurd_sigthread_stack_end, __hurd_sigthread_variables, threadvars, __hurd_threadvar_stack_offset, __hurd_threadvar_stack_mask): Do not define variables. * sysdeps/mach/hurd/errno-loc.c: Do not include <errno.h> and <hurd/threadvar.h>. [IS_IN(rtld)] (rtld_errno): New variable. [IS_IN(rtld)] (__errno_location): New weak function. [!IS_IN(rtld)]: Include "../../../csu/errno-loc.c". * sysdeps/mach/hurd/errno.c: Remove file. * sysdeps/mach/hurd/fork.c: Include <hurd/threadvar.h> (__fork): Remove THREADVAR_SPACE macro and its use. * sysdeps/mach/hurd/i386/init-first.c (__hurd_threadvar_max): Remove variable. (init): Do not initialize threadvar. * sysdeps/mach/hurd/i386/libc.abilist (__hurd_threadvar_max): Remove symbol. * sysdeps/mach/hurd/i386/sigreturn.c (__sigreturn): Use __hurd_local_reply_port instead of threadvar. * sysdeps/mach/hurd/i386/tls.h (tcbhead_t): Add reply_port and _hurd_sigstate fields. (HURD_DESC_TLS, __LIBC_NO_TLS, THREAD_TCB): New macro. * sysdeps/mach/hurd/i386/trampoline.c: Remove outdated comment. * sysdeps/mach/hurd/libc-lock.h: Do not include <hurd/threadvar.h>. (__libc_lock_owner_self): Use &__libc_lock_self0 and THREAD_SELF instead of threadvar. * sysdeps/mach/hurd/libc-tsd.h: Remove file. * sysdeps/mach/hurd/mig-reply.c (GETPORT, reply_port): Remove macros. (use_threadvar, global_reply_port): Remove variables. (__hurd_reply_port0): New variable. (__mig_get_reply_port): Use __hurd_local_reply_port and __hurd_reply_port0 instead of threadvar. (__mig_dealloc_reply_port): Likewise. (__mig_init): Do not initialize threadvar. * sysdeps/mach/hurd/profil.c: Fix comment.
2018-03-17hurd: Fix getting signal thread stack layout for forkSamuel Thibault
* hurd/hurdsig.c: Include <pthread.h>. (_hurdsig_init): Call pthread_getattr_np and pthread_attr_getstack to get the signal thread stack layout.
2018-03-17hurd: add TLS supportSamuel Thibault
* sysdeps/generic/thread_state.h (MACHINE_NEW_THREAD_STATE_FLAVOR): Define macro. * sysdeps/mach/thread_state.h (MACHINE_THREAD_STATE_FIX_NEW): New macro. * sysdeps/mach/i386/thread_state.h (MACHINE_NEW_THREAD_STATE_FLAVOR): New macro, defined to i386_THREAD_STATE. (MACHINE_THREAD_STATE_FLAVOR): Define to i386_REGS_SEGS_STATE instead of i386_THREAD_STATE. (MACHINE_THREAD_STATE_FIX_NEW): New macro, reads segments. * sysdeps/mach/hurd/i386/trampoline.c (_hurd_setup_sighandler): Use i386_REGS_SEGS_STATE instead of i386_THREAD_STATE. * sysdeps/mach/hurd/i386/tls.h (TCB_ALIGNMENT, HURD_SEL_LDT): New macros. (_hurd_tls_fork): Add original thread parameter, Duplicate existing LDT descriptor instead of creating a new one. (_hurd_tls_new): New function, creates a new descriptor and updates tcb. * mach/setup-thread.c: Include <ldsodefs.h>. (__mach_setup_thread): Call _dl_allocate_tls, pass MACHINE_NEW_THREAD_STATE_FLAVOR to __thread_set_state instead of MACHINE_THREAD_STATE_FLAVOR, before getting MACHINE_THREAD_STATE_FLAVOR, calling _hurd_tls_new, and setting MACHINE_THREAD_STATE_FLAVOR with the result. * hurd/hurdfault.c (_hurdsig_fault_init): Call MACHINE_THREAD_STATE_FIX_NEW. * sysdeps/mach/hurd/fork.c (__fork): Call _hurd_tls_fork for sigthread too. Add original thread parameter.
2018-03-05hurd: Fix includability of <hurd/signal.h> in all standardsSamuel Thibault
* bits/sigaction.h: Add include guard. * sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/hppa/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/ia64/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/s390/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/tile/bits/sigaction.h: Likewise. * hurd/hurd/signal.h: Include <bits/sigaction.h>.
2018-03-04Merge commit 'refs/top-bases/t/thread-linkspace' into t/thread-linkspaceSamuel Thibault
2018-03-04Merge branch 't/tls-threadvar' into refs/top-bases/t/ONSTACKSamuel Thibault
2018-03-04Merge branch 't/tls-threadvar' into refs/top-bases/tschwinge/Roger_WhittakerSamuel Thibault
2018-03-04Separate out error_t definitionSamuel Thibault
so interfaces needing it can get it. * stdlib/errno.h (error_t): Move definition to... * bits/types/error_t.h: ... new header. * stdlib/Makefile (headers): Add bits/types/error_t.h. * sysdeps/mach/hurd/bits/errno.h (error_t): Move definition to... * sysdeps/mach/hurd/bits/types/error_t.h: ... new header. * sysdeps/mach/hurd/errnos.awk (error_t): Likewise. * hurd/hurd.h: Include <bits/types/error_t.h> * hurd/hurd/fd.h: Include <bits/types/error_t.h> * hurd/hurd/id.h: Include <errno.h> and <bits/types/error_t.h> * hurd/hurd/lookup.h: Include <errno.h> and <bits/types/error_t.h> * hurd/hurd/resource.h: Include <bits/types/error_t.h> * hurd/hurd/signal.h: Include <bits/types/error_t.h> * hurd/hurd/sigpreempt.h: Include <bits/types/error_t.h>
2018-03-04hurd: Make almost all hurd headers includable in all standardsSamuel Thibault
* hurd/hurd.h: Include <bits/types/sigset_t.h> * hurd/hurd/fd.h: Include <sys/select.h> and <bits/types/sigset_t.h> (_hurd_fd_read, _hurd_fd_write): Use __loff_t instead of loff_t. * hurd/hurd/signal.h: Include <bits/types/stack_t.h> and <bits/types/sigset_t.h>. [!defined __USE_GNU]: Do not #error out. (struct hurd_sigstate): Use _NSIG instead of NSIG. * hurd/hurd/sigpreempt.h (__need_size_t): Define. Include <stddef.h> and <bits/types/sigset_t.h> (struct hurd_signal_preemptor, hurd_catch_signal): Use __sighandler_t instead of sighandler_t.
2018-03-04hurd: Avoid using ino64_t and loff_t in headersSamuel Thibault
* mach/Machrules ($(patsubst %,$(objpfx)%.h,$(user-interfaces)): Process mig output through $(migheaderpipe). * hurd/Makefile (migheaderpipe): Define variable.
2018-03-04hurd: fix header conformitySamuel Thibault
* hurd/hurd/fd.h (_hurd_fd_error): Fix struct initializer to be trivial, for C++ conformity.
2018-03-04hurd: avoid including hurd/signal.h when not neededSamuel Thibault
thus making <hurd/port.h> and <hurd/userlink.h> includable without _GNU_SOURCE. * hurd/hurd/port.h: Do not include <hurd/signal.h>. * hurd/hurd/userlink.h [!defined __USE_EXTERN_INLINES || !defined _LIBC || !IS_IN (libc)]: Do not include <hurd/signal.h>.
2018-03-04Don't distribute threadvar.h any moreSamuel Thibault
It's not useful to userland any more, and now needs glibc's tls.h
2018-03-03hurd: Add missing includesSamuel Thibault
* hurd/hurd/id.h: Include <hurd/hurd_types.h> * hurd/hurd/ioctl.h: Include <mach/port.h> * hurd/hurd/lookup.h: Include <hurd/hurd_types.h>
2018-02-27Merge branch 't/extern_inline' into refs/top-bases/tschwinge/Roger_WhittakerSamuel Thibault
2018-02-21Mechanically remove _IO_ name aliases for types and constants.Zack Weinberg
This patch mechanically removes all remaining uses, and the definitions, of the following libio name aliases: name replaced with ---- ------------- _IO_FILE FILE _IO_fpos_t __fpos_t _IO_fpos64_t __fpos64_t _IO_size_t size_t _IO_ssize_t ssize_t or __ssize_t _IO_off_t off_t _IO_off64_t off64_t _IO_pid_t pid_t _IO_uid_t uid_t _IO_wint_t wint_t _IO_va_list va_list or __gnuc_va_list _IO_BUFSIZ BUFSIZ _IO_cookie_io_functions_t cookie_io_functions_t __io_read_fn cookie_read_function_t __io_write_fn cookie_write_function_t __io_seek_fn cookie_seek_function_t __io_close_fn cookie_close_function_t I used __fpos_t and __fpos64_t instead of fpos_t and fpos64_t because the definitions of fpos_t and fpos64_t depend on the largefile mode. I used __ssize_t and __gnuc_va_list in a handful of headers where namespace cleanliness might be relevant even though they're internal-use-only. In all other cases, I used the public-namespace name. There are a tiny handful of places where I left a use of 'struct _IO_FILE' alone, because it was being used together with 'struct _IO_FILE_plus' or 'struct _IO_FILE_complete' in the same arithmetic expression. Because this patch was almost entirely done with search and replace, I may have introduced indentation botches. I did proofread the diff, but I may have missed something. The ChangeLog below calls out all of the places where this was not a pure search-and-replace change. Installed stripped libraries and executables are unchanged by this patch, except that some assertions in vfscanf.c change line numbers. * libio/libio.h (_IO_FILE): Delete; all uses changed to FILE. (_IO_fpos_t): Delete; all uses changed to __fpos_t. (_IO_fpos64_t): Delete; all uses changed to __fpos64_t. (_IO_size_t): Delete; all uses changed to size_t. (_IO_ssize_t): Delete; all uses changed to ssize_t or __ssize_t. (_IO_off_t): Delete; all uses changed to off_t. (_IO_off64_t): Delete; all uses changed to off64_t. (_IO_pid_t): Delete; all uses changed to pid_t. (_IO_uid_t): Delete; all uses changed to uid_t. (_IO_wint_t): Delete; all uses changed to wint_t. (_IO_va_list): Delete; all uses changed to va_list or __gnuc_va_list. (_IO_BUFSIZ): Delete; all uses changed to BUFSIZ. (_IO_cookie_io_functions_t): Delete; all uses changed to cookie_io_functions_t. (__io_read_fn): Delete; all uses changed to cookie_read_function_t. (__io_write_fn): Delete; all uses changed to cookie_write_function_t. (__io_seek_fn): Delete; all uses changed to cookie_seek_function_t. (__io_close_fn): Delete: all uses changed to cookie_close_function_t. * libio/iofopncook.c: Remove unnecessary forward declarations. * libio/iolibio.h: Correct outdated commentary. * malloc/malloc.c (__malloc_stats): Remove unnecessary casts. * stdio-common/fxprintf.c (__fxprintf_nocancel): Remove unnecessary casts. * stdio-common/getline.c: Use _IO_getdelim directly. Don't redefine ssize_t. * stdio-common/printf_fp.c, stdio_common/printf_fphex.c * stdio-common/printf_size.c: Don't redefine size_t or FILE. Remove outdated comments. * stdio-common/vfscanf.c: Don't redefine va_list.
2018-01-29hurd: Fix preprocessor indentationSamuel Thibault
2018-01-29hurd: Add expected ABI listsSamuel Thibault
* hurd/Versions: Fix version when _hurd_exec_paths was added. * mach/Versions: Fix version when __mach_host_self_ was added. * sysdeps/mach/hurd/i386/ld.abilist: New file. * sysdeps/mach/hurd/i386/libBrokenLocale.abilist: New file. * sysdeps/mach/hurd/i386/libanl.abilist: New file. * sysdeps/mach/hurd/i386/libc.abilist: New file. * sysdeps/mach/hurd/i386/libcrypt.abilist: New file. * sysdeps/mach/hurd/i386/libdl.abilist: New file. * sysdeps/mach/hurd/i386/libm.abilist: New file. * sysdeps/mach/hurd/i386/libnsl.abilist: New file. * sysdeps/mach/hurd/i386/libresolv.abilist: New file. * sysdeps/mach/hurd/i386/librt.abilist: New file. * sysdeps/mach/hurd/i386/libutil.abilist: New file.
2018-01-28hurd: Include <sigsetops.h> from hurd/hurd/signal.hSamuel Thibault
* hurd/hurd/signal.h [__USE_EXTERN_INLINES][_LIBC][IS_IN(libc) || IS_IN(libpthread)]: Include <sigsetops.h>.
2018-01-28hurd: fix typoSamuel Thibault