This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=f320bc0f8fb92d33c3252f61c4e7eb3fcf9401b9 commit f320bc0f8fb92d33c3252f61c4e7eb3fcf9401b9 (HEAD -> main) Author: Guillem Jover <[email protected]> AuthorDate: Thu Jul 25 04:23:08 2024 +0200 build: Use pre-defined macros to check C/C++ conformance requirements In addition to the features we might explicitly check for, also use the pre-defined macros that carry the language standard version currently in use. --- m4/dpkg-compiler.m4 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/m4/dpkg-compiler.m4 b/m4/dpkg-compiler.m4 index 86cf30f09..eca878014 100644 --- a/m4/dpkg-compiler.m4 +++ b/m4/dpkg-compiler.m4 @@ -253,6 +253,10 @@ AC_DEFUN([DPKG_TRY_C99], [ /* Magic __func__ variable. */ printf("%s", __func__); + +#if __STDC_VERSION__ < 199901L +#error "Requires C99" +#endif ]]) ], [$1], [$2])dnl ])# DPKG_TRY_C99 @@ -300,6 +304,10 @@ AC_DEFUN([DPKG_TRY_CXX11], [ ]], [[ // Null pointer keyword. void *ptr = nullptr; + +#if __cplusplus < 201103L +#error "Requires C++11" +#endif ]]) ], [$1], [$2]) AC_LANG_POP([C++])dnl -- Dpkg.Org's dpkg

