[FFmpeg-devel] [PATCH 2/2] Require compilers to support C17.
Diederick C. Niehorster
dcnieho at gmail.com
Tue Feb 6 08:50:50 EET 2024
On Mon, Feb 5, 2024 at 8:59 PM Anton Khirnov <anton at khirnov.net> wrote:
> diff --git a/configure b/configure
> index f72533b7d2..1bb9e23f19 100755
> --- a/configure
> +++ b/configure
> @@ -5517,21 +5517,20 @@ if test "$?" != 0; then
> die "C compiler test failed."
> fi
>
> -add_cppflags -D_ISOC99_SOURCE
> +add_cppflags -D_ISOC11_SOURCE
Not an expert, should this be D_ISOC17_SOURCE? A google shows this
doesn't exist, so i guess i'm wrong. Some comment may be helpful here
> add_cxxflags -D__STDC_CONSTANT_MACROS
> check_cxxflags -std=c++11 || check_cxxflags -std=c++0x
>
> -# some compilers silently accept -std=c11, so we also need to check that the
> +# some compilers silently accept -std=c17, so we also need to check that the
> # version macro is defined properly
> -test_cflags_cc -std=c11 ctype.h "__STDC_VERSION__ >= 201112L" &&
> - add_cflags -std=c11 ||
> - check_cflags -std=c99
> +test_cflags_cc -std=c17 ctype.h "__STDC_VERSION__ >= 201710L" &&
> + add_cflags -std=c17 || die "Compiler lacks C17 support"
>
> check_cppflags -D_FILE_OFFSET_BITS=64
> check_cppflags -D_LARGEFILE_SOURCE
>
> -add_host_cppflags -D_ISOC99_SOURCE
> -check_host_cflags -std=c99
> +add_host_cppflags -D_ISOC11_SOURCE
> +check_host_cflags -std=c17
idem
More information about the ffmpeg-devel
mailing list