glibc/sysdeps/unix/sysv/linux/bits
Florian Weimer aaacde11f2 Reduce <limits.h> pollution due to dynamic PTHREAD_STACK_MIN
<limits.h> used to be a header file with no declarations.
GCC's libgomp includes it in a #pragma GCC visibility hidden block.
Including <unistd.h> from <limits.h> (indirectly) declares everything
in <unistd.h> with hidden visibility, resulting in linker failures.

This commit avoids C declarations in assembler mode and only declares
__sysconf in <limits.h> (and not the entire contents of <unistd.h>).
The __sysconf symbol is already part of the ABI.  PTHREAD_STACK_MIN
is no longer defined for __USE_DYNAMIC_STACK_SIZE && __ASSEMBLER__
because there is no possible definition.

Additionally, PTHREAD_STACK_MIN is now defined by <pthread.h> for
__USE_MISC because this is what developers expect based on the macro
name.  It also helps to avoid libgomp linker failures in GCC because
libgomp includes <pthread.h> before its visibility hacks.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2021-07-12 18:43:32 +02:00
..
types y2038: Use a common definition for shmid_ds 2021-06-15 10:42:11 -03:00
a.out.h
dirent.h
dirent_ext.h
epoll.h
errno.h
eventfd.h
fcntl-linux.h
fcntl.h
in.h
initspin.h
inotify.h
ioctl-types.h
ioctls.h
ipc-perm.h
ipc.h
local_lim.h Reduce <limits.h> pollution due to dynamic PTHREAD_STACK_MIN 2021-07-12 18:43:32 +02:00
mman-linux.h
mman-map-flags-generic.h
mman-shared.h
mman.h
mqueue.h
msq.h y2038: Add support for 64-bit time on legacy ABIs 2021-06-15 10:42:11 -03:00
param.h
poll.h
posix_opt.h
procfs-extra.h
procfs-id.h
procfs-prregset.h
procfs.h
pthread_stack_min-dynamic.h Reduce <limits.h> pollution due to dynamic PTHREAD_STACK_MIN 2021-07-12 18:43:32 +02:00
pthread_stack_min.h Define PTHREAD_STACK_MIN to sysconf(_SC_THREAD_STACK_MIN) 2021-07-09 15:10:35 -07:00
ptrace-shared.h
resource.h
sched.h
sem.h y2038: Add support for 64-bit time on legacy ABIs 2021-06-15 10:42:11 -03:00
semaphore.h
shm.h y2038: Add support for 64-bit time on legacy ABIs 2021-06-15 10:42:11 -03:00
shmlba.h
sigaction.h
sigcontext.h
sigevent-consts.h
siginfo-arch.h
siginfo-consts-arch.h
siginfo-consts.h
signal_ext.h
signalfd.h
signum-arch.h
sigstack.h
sigstksz.h Define PTHREAD_STACK_MIN to sysconf(_SC_THREAD_STACK_MIN) 2021-07-09 15:10:35 -07:00
socket-constants.h y2038: Add __USE_TIME_BITS64 support for socket-constants.h 2021-06-15 10:42:11 -03:00
socket.h
socket_type.h
ss_flags.h
stat.h
statfs.h
statvfs.h
statx.h
struct_stat.h y2038: Use a common definition for stat 2021-06-15 10:42:11 -03:00
struct_stat_time64_helper.h y2038: Use a common definition for stat 2021-06-15 10:42:11 -03:00
termios-baud.h
termios-c_cc.h
termios-c_cflag.h
termios-c_iflag.h
termios-c_lflag.h
termios-c_oflag.h
termios-misc.h
termios-struct.h
termios-tcflow.h
termios.h
time.h y2038: Add support for 64-bit time on legacy ABIs 2021-06-15 10:42:11 -03:00
timerfd.h
timex.h
uio-ext.h
uio_lim.h
unistd_ext.h linux: Add close_range 2021-07-08 14:08:13 -03:00
utsname.h
waitflags.h