Add HAVE_DECL_CTL_KERN, HAVE_DECL_KERN_ARND (GH PR #38)

This commit is contained in:
Fred Helmesjö 2022-09-01 10:07:44 +02:00 committed by Boris Kolpackov
parent 5f1d305468
commit c504aa31a4
2 changed files with 31 additions and 0 deletions

View File

@ -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

View File

@ -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