On Nov 21 13:24, Jon Turney wrote:
> Since we now require w32api-headers >= 13 for the
> AllocConsoleWithOptions() prototype and flags, add a configure-time
> check for that, as I've mused about a couple of times before.
>
> This maybe gives a more obvious diagnosis of the problem than 'not
> declared' errors, and is perhaps more self-documenting about our
> expectations here.
>
> After this, most of the other conditionals on __MINGW64_VERSION_MAJOR
> can probably be removed.
> ---
> winsup/configure.ac | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/winsup/configure.ac b/winsup/configure.ac
> index e7ac814b1..05b5a9897 100644
> --- a/winsup/configure.ac
> +++ b/winsup/configure.ac
> @@ -57,6 +57,23 @@ AC_CHECK_TOOL(RANLIB, ranlib, ranlib)
> AC_CHECK_TOOL(STRIP, strip, strip)
> AC_CHECK_TOOL(WINDRES, windres, windres)
>
> +required_w32api_version=13
> +AC_MSG_CHECKING([w32api-headers version])
> +AC_COMPILE_IFELSE([
> + AC_LANG_SOURCE([[
> + #include <_mingw.h>
> +
> + #if __MINGW64_VERSION_MAJOR < $required_w32api_version
> + #error "w32api-headers version >= $required_w32api_version required"
> + #endif
> + ]])
> +],[
> + AC_MSG_RESULT([yes])
> +],[
> + AC_MSG_RESULT([no, >= $required_w32api_version required])
> + AC_MSG_ERROR([required w32api-headers version not met])
> +])
> +
> AC_ARG_ENABLE(debugging,
> [AS_HELP_STRING([--enable-debugging],[Build a cygwin DLL which has more
> consistency checking for debugging])],
> [case "${enableval}" in
> --
> 2.51.0
:+1:
Do you have removing the __MINGW64_VERSION_MAJOR conditionals in the loop
as well?
Thanks,
Corinna