From 728c7bfddb49d009ff0d449fc74f20f46dacf310 Mon Sep 17 00:00:00 2001 From: Francois Kritzinger Date: Wed, 14 Sep 2022 11:30:12 +0200 Subject: [PATCH] Update HAVE_AFUNIX_H to use BUILD2_AUTOCONF_MINGW_PREREQ --- .../libbuild2/autoconf/checks/HAVE_AFUNIX_H.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_AFUNIX_H.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_AFUNIX_H.h index a02827e..a7466d6 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_AFUNIX_H.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_AFUNIX_H.h @@ -1,20 +1,16 @@ -// HAVE_AFUNIX_H +// HAVE_AFUNIX_H : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif #undef HAVE_AFUNIX_H -/* Note that __MINGW32_*_VERSION seems to be frozen and so cannot be used - * for this check. Which means this header is never available on 32-bit - * MinGW. - */ - #ifdef _MSC_VER # include # if defined(WDK_NTDDI_VERSION) && WDK_NTDDI_VERSION >= NTDDI_WIN10_19H1 # define HAVE_AFUNIX_H 1 # endif -#elif defined(__MINGW64__) -# include -# if defined(__MINGW64_MAJOR_VERSION) && __MINGW64_MAJOR_VERSION >= 11 -# define HAVE_AFUNIX_H 1 -# endif +#elif BUILD2_AUTOCONF_MINGW_PREREQ(11, 0) +# define HAVE_AFUNIX_H 1 #endif