skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

commit 21bf9df13cad0da20ecd9fadfa54cd16479238aa
parent 6d2c28acaa0c11841ca57ffe2b07e34c91cdea9e
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date:   Wed, 15 Mar 2017 15:04:25 +0000

 Better pipe2 detection on BSD systems

Diffstat:
Msrc/libstddjb/pipe_internal.c | 9+--------
Msrc/sysdeps/trypipe2.c | 16++++++++++++++--
2 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/src/libstddjb/pipe_internal.c b/src/libstddjb/pipe_internal.c @@ -4,14 +4,7 @@ #ifdef SKALIBS_HASPIPE2 -#ifndef _NETBSD_SOURCE -#define _NETBSD_SOURCE -#endif - -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - +#include <skalibs/nonposix.h> #include <unistd.h> #include <fcntl.h> #include <skalibs/djbunix.h> diff --git a/src/sysdeps/trypipe2.c b/src/sysdeps/trypipe2.c @@ -1,11 +1,23 @@ /* ISC license. */ -#ifndef _NETBSD_SOURCE -#define _NETBSD_SOURCE +#undef _POSIX_C_SOURCE +#undef _XOPEN_SOURCE + +#ifndef __EXTENSIONS__ +#define __EXTENSIONS__ #endif #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif +#ifndef _BSD_SOURCE +#define _BSD_SOURCE +#endif +#ifndef _NETBSD_SOURCE +#define _NETBSD_SOURCE +#endif +#ifndef _INCOMPLETE_XOPEN_C063 +#define _INCOMPLETE_XOPEN_C063 +#endif #include <unistd.h>