glibc/bits
Joseph Myers a7ddbf456d Add once_flag, ONCE_FLAG_INIT and call_once to stdlib.h for C23
C23 adds once_flag, ONCE_FLAG_INIT and call_once to stdlib.h (in C11
they were only in threads.h, in C23 they are in both headers; this
change came from N2840).  Implement this change, with a
bits/types/once_flag.h header for the common type and initializer
definitions.

Note that there's an omnibus bug (bug 33001) that covers more than
just these missing definitions.

This doesn't seem a significant enough feature to be worth mentioning
in NEWS.

ISO C is not concerned with whether functions are in libc or
libpthread, but POSIX links this to what header they are declared in,
so functions declared in stdlib.h are supposed to be in libc.
However, the current edition of POSIX is based on C17; hopefully Hurd
glibc will have completed the merge of libpthread into libc (in
particular, moving call_once) well before a future edition of POSIX
based on C23 (or a later version of ISO C) is released.

Tested for x86_64 and x86.
2025-10-01 15:15:15 +00:00
..
types Add once_flag, ONCE_FLAG_INIT and call_once to stdlib.h for C23 2025-10-01 15:15:15 +00:00
atomic_wide_counter.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
byteswap.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
confname.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dirent.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dirent_ext.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl_find_object.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dlfcn.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
elfclass.h
endian.h
environments.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
errno.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fcntl.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fenv.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
floatn-common.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
floatn.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
flt-eval-method.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fp-fast.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fp-logb.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
hwcap.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
in.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
indirect-return.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
ioctl-types.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
ioctls.h
ipc.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
ipctypes.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
iscanonical.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
libc-header-start.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
libm-simd-decl-stubs.h AArch64: Implement AdvSIMD and SVE log10p1(f) routines 2025-09-27 12:45:59 +00:00
link.h
link_lavcurrent.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
local_lim.h
long-double.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math-vector.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
mathdef.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
mman.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
mman_ext.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
mqueue.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
msq.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
netdb.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
param.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
poll.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
posix_opt.h
pthreadtypes.h
resource.h hurd: Fix RLIM_INFINITY on 64b 2025-09-22 02:30:14 +02:00
sched.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
select.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sem.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
setjmp.h
shm.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sigaction.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sigcontext.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sigevent-consts.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
siginfo-consts.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
signal_ext.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
signum-arch.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
signum-generic.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sigstack.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sigstksz.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sigthread.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sockaddr.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
socket.h bits/socket.h: Update to recent BSD definition 2025-01-01 22:11:13 +01:00
spawn_ext.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
ss_flags.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
stat.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
statfs.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
statvfs.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
stdint-intn.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
stdint-least.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
stdint-uintn.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
stdlib-bsearch.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
syslog-path.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sysmacros.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
termios-baud.h termios: SPEED_MAX and BAUD_MAX constants 2025-07-20 17:17:41 +02:00
termios.h termios: unify the naming of the termios speed fields 2025-06-17 09:11:38 -03:00
time.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
time64.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
timesize.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
typesizes.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
uintn-identity.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
uio-ext.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
uio_lim.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
unistd_ext.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
utmp.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
utsname.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
waitflags.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
waitstatus.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wchar.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wordsize.h login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-04-19 14:38:17 +02:00