diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_CLOSE_RANGE.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_CLOSE_RANGE.h new file mode 100644 index 0000000..2444e52 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_CLOSE_RANGE.h @@ -0,0 +1,14 @@ +// HAVE_CLOSE_RANGE : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_CLOSE_RANGE + +/* Since FreeBSD 12.2 (based on their online manual pages) and glibc 2.34. + */ +#if BUILD2_AUTOCONF_FREEBSD_PREREQ(12, 2) || \ + BUILD2_AUTOCONF_GLIBC_PREREQ(2, 34) +# define HAVE_CLOSE_RANGE 1 +#endif