logo

utils-std

Collection of commonly available Unix tools
commit: dd9801d7c154beeca3be1f265ed4fae1192215fc
parent 315487350be34049154f71a6f4997664d1603922
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon,  8 Jul 2024 16:33:27 +0200

configure: Add test for _POSIX_VERSION 202405L

Diffstat:

Mconfigure4++++
Aconfigure.d/posix_2024.h11+++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/configure b/configure @@ -227,6 +227,10 @@ if ! check_conftest configure.d/reallocarray.c; then target_filter="${target_filter} -e cmd/tr." fi +if check_conftest configure.d/posix_2024.h; then + CFLAGS="${CFLAGS} -DHAS_POSIX_2024" +fi + echo ## Configuration write diff --git a/configure.d/posix_2024.h b/configure.d/posix_2024.h @@ -0,0 +1,11 @@ +// utils-std: Collection of commonly available Unix tools +// SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me> +// SPDX-License-Identifier: MPL-2.0 + +#define _POSIX_C_SOURCE 202405L + +#include <unistd.h> + +#if _POSIX_VERSION < 202405L +#error _POSIX_VERSION < 202405L +#endif