From 3b7b79fe78f520afb02ecd296ff961df553191dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fred=20Helmesj=C3=B6?= Date: Thu, 1 Sep 2022 09:21:18 +0200 Subject: [PATCH] Add HAVE_PIPE, HAVE_PIPE2 (GH PR #22) --- .../libbuild2/autoconf/checks/HAVE_PIPE.h | 19 +++++++++++++++++++ .../libbuild2/autoconf/checks/HAVE_PIPE2.h | 17 +++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_PIPE.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_PIPE2.h diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_PIPE.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_PIPE.h new file mode 100644 index 0000000..e990465 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_PIPE.h @@ -0,0 +1,19 @@ +// HAVE_PIPE : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_PIPE + +/* Since Version 3 AT&T UNIX (older than 1979). + * Linux, FreeBSD, OpenBSD, NetBSD, Mac OS X, Solaris + */ +#if defined(__linux__) || \ + defined(__FreeBSD__) || \ + defined(__OpenBSD__) || \ + defined(__NetBSD__) || \ + defined(BUILD2_AUTOCONF_MACOS) || \ + ((defined(__sun) && defined(__SVR4)) || defined(__sun__)) +# define HAVE_PIPE 1 +#endif diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_PIPE2.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_PIPE2.h new file mode 100644 index 0000000..da944c8 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_PIPE2.h @@ -0,0 +1,17 @@ +// HAVE_PIPE2 : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_PIPE2 + +/* Since OpenBSD 5.7, FreeBSD 10.0, NetBSD 6.0, + * glibc 2.9. + */ +#if BUILD2_AUTOCONF_OPENBSD_PREREQ(201505) || \ + BUILD2_AUTOCONF_FREEBSD_PREREQ(10, 0) || \ + BUILD2_AUTOCONF_NETBSD_PREREQ(6, 0) || \ + BUILD2_AUTOCONF_GLIBC_PREREQ(2, 9) +# define HAVE_PIPE2 1 +#endif