From c504aa31a4a4e6f56b768f56be25fc69bff43741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fred=20Helmesj=C3=B6?= Date: Thu, 1 Sep 2022 10:07:44 +0200 Subject: [PATCH] Add HAVE_DECL_CTL_KERN, HAVE_DECL_KERN_ARND (GH PR #38) --- .../autoconf/checks/HAVE_DECL_CTL_KERN.h | 18 ++++++++++++++++++ .../autoconf/checks/HAVE_DECL_KERN_ARND.h | 13 +++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_DECL_CTL_KERN.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_DECL_KERN_ARND.h diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_DECL_CTL_KERN.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_DECL_CTL_KERN.h new file mode 100644 index 0000000..d385029 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_DECL_CTL_KERN.h @@ -0,0 +1,18 @@ +// HAVE_DECL_CTL_KERN : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_DECL_CTL_KERN +/* Since 4.4BSD (OpenBSD 2.1-6.2, FreeBSD, NetBSD, Mac OS X 10.7), + * <= glibc 2.31. + * NOTE: Appears to have been available parallel to sysctl() + */ +#if (BUILD2_AUTOCONF_OPENBSD_PREREQ(199706) && !BUILD2_AUTOCONF_OPENBSD_PREREQ(201804)) || \ + BUILD2_AUTOCONF_FREEBSD_PREREQ(2, 3) || \ + BUILD2_AUTOCONF_NETBSD_PREREQ(2, 0) || \ + BUILD2_AUTOCONF_MACOS_PREREQ(10, 7) || \ + !BUILD2_AUTOCONF_GLIBC_PREREQ(2, 32) +# define HAVE_DECL_CTL_KERN 1 +#endif diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_DECL_KERN_ARND.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_DECL_KERN_ARND.h new file mode 100644 index 0000000..9c70547 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_DECL_KERN_ARND.h @@ -0,0 +1,13 @@ +// HAVE_DECL_KERN_ARND : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_DECL_KERN_ARND +/* OpenBSD 2.6-6.0. + * NOTE: Only mentioned in OpenBSD manual. + */ +#if (BUILD2_AUTOCONF_OPENBSD_PREREQ(199912) && !BUILD2_AUTOCONF_OPENBSD_PREREQ(201609)) +# define HAVE_DECL_KERN_ARND 1 +#endif