Add HAVE_PIPE, HAVE_PIPE2 (GH PR #22)

This commit is contained in:
Fred Helmesjö 2022-09-01 09:21:18 +02:00 committed by Boris Kolpackov
parent cc385bb874
commit 3b7b79fe78
2 changed files with 36 additions and 0 deletions

View File

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

View File

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