[PATCH] conform: add ISO23 data for stddef.h, stdlib.h
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Mon Nov 23 13:00:59 GMT 2026
C23 also moved strfromd, strfromf and strfroml from TS 18661-1 into
<stdlib.h>, and glibc declares them for C23. They pass on x86_64 with:
#if defined ISO23
function int strfromd (char*, size_t, const char*, double)
function int strfromf (char*, size_t, const char*, float)
function int strfroml (char*, size_t, const char*, long double)
#endif
The rest of the patch is fine.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
On 21/10/26 08:28, Andreas Schwab wrote:
>
> ---
> conform/data/stddef.h-data | 6 ++++++
> conform/data/stdlib.h-data | 16 ++++++++++++++++
> 2 files changed, 22 insertions(+)
>
> diff --git a/conform/data/stddef.h-data b/conform/data/stddef.h-data
> index e9b8fe89ee..fb30d4d99c 100644
> --- a/conform/data/stddef.h-data
> +++ b/conform/data/stddef.h-data
> @@ -10,6 +10,12 @@ type size_t
> type max_align_t
> #endif
>
> +#if defined ISO23
> +type nullptr_t
> +
> +macro unreachable
> +#endif
> +
> #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23
> allow *_t
> #endif
> diff --git a/conform/data/stdlib.h-data b/conform/data/stdlib.h-data
> index 1c4ba97762..10b5e72d6a 100644
> --- a/conform/data/stdlib.h-data
> +++ b/conform/data/stdlib.h-data
> @@ -11,12 +11,18 @@ macro-int-constant EXIT_SUCCESS == 0
> macro-constant NULL == 0
> macro-int-constant RAND_MAX >= 32767
> macro MB_CUR_MAX
> +#if defined ISO23
> +macro ONCE_FLAG_INIT
> +#endif
>
> #if defined ISO99 || defined ISO11 || defined ISO23 || defined XOPEN2K || defined XOPEN2K8 || defined XOPEN2K24 || defined POSIX2008 || defined POSIX2024
> type lldiv_t
> element lldiv_t {long long} quot
> element lldiv_t {long long} rem
> #endif
> +#if defined ISO23
> +type once_flag
> +#endif
> type size_t
> type wchar_t
>
> @@ -54,6 +60,9 @@ function {long int} atol (const char*)
> function {long long} atoll (const char*)
> #endif
> function {void*} bsearch (const void*, const void*, size_t, size_t, int(*)(const void*, const void*))
> +#if defined ISO23
> +function void call_once (once_flag*, void (*)(void))
> +#endif
> function {void*} calloc (size_t, size_t)
> function div_t div (int, int)
> #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX && !defined POSIX2008 && !defined POSIX2024
> @@ -70,6 +79,10 @@ function void exit (int)
> function {char*} fcvt (double, int, int*, int*)
> #endif
> function void free (void*)
> +#if defined ISO23
> +function void free_aligned_sized (void*, size_t, size_t)
> +function void free_sized (void*, size_t)
> +#endif
> #if defined XPG42 || defined UNIX98 || defined XOPEN2K
> function {char*} gcvt (double, int, char*)
> #endif
> @@ -103,6 +116,9 @@ function {void*} malloc (size_t)
> function int mblen (const char*, size_t)
> function size_t mbstowcs (wchar_t*, const char*, size_t)
> function int mbtowc (wchar_t*, const char*, size_t)
> +#if defined ISO23
> +function size_t memalignment (const void*)
> +#endif
> #if defined XOPEN2K8 || defined XOPEN2K24 || defined POSIX2008 || defined POSIX2024
> function {char*} mkdtemp (char*)
> #endif
More information about the Libc-alpha
mailing list