From 0132c118e556e61c2b8c656718f42722b4f2f598 Mon Sep 17 00:00:00 2001 From: Emil Rosenquist <37864286+EmilRosenquist@users.noreply.github.com> Date: Thu, 1 Sep 2022 09:08:02 +0200 Subject: [PATCH] Add HAVE_ERRNO_H (GH PR #16) --- .../libbuild2/autoconf/checks/HAVE_ERRNO_H.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_ERRNO_H.h diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_ERRNO_H.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_ERRNO_H.h new file mode 100644 index 0000000..2928567 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_ERRNO_H.h @@ -0,0 +1,19 @@ +// HAVE_ERRNO_H : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_ERRNO_H + +/* Since Linux/glibc 2.1, OpenBSD 2.0, FreeBSD 1.0, NetBSD 1.0, Mac OS + * and win32. + */ +#if BUILD2_AUTOCONF_GLIBC_PREREQ(2, 1) || \ + BUILD2_AUTOCONF_FREEBSD_PREREQ(1, 0) || \ + BUILD2_AUTOCONF_OPENBSD_PREREQ(199610) || \ + BUILD2_AUTOCONF_NETBSD_PREREQ(1, 0) || \ + defined(BUILD2_AUTOCONF_MACOS) || \ + defined(_WIN32) +# define HAVE_ERRNO_H 1 +#endif