vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit f84df43acc61a8bd1af8265a2839874bd7ae8904
parent 209aceb2a9069a34888840fd9facbe5e894a6c8b
Author: Silas <silas_git@nocafe.net>
Date:   Thu, 12 Nov 2020 08:36:33 -0300

build: add -D_NETBSD_SOURCE for NetBSD

memrchr() signature is not exposed by default for NetBSD.  If one does
not add -D_NETBSD_SOURCE, the compiler uses its own signature for
memrchr() that returns a 32-bit integer, leading to misbehaviour in some
situations.  Defining _BSD_SOURCE doesn't work, so we define
_NETBSD_SOURCE.

Diffstat:
Mconfigure | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/configure b/configure @@ -227,6 +227,7 @@ OS=$(uname) case "$OS" in FreeBSD|DragonFly) CFLAGS_STD="$CFLAGS_STD -D_BSD_SOURCE -D__BSD_VISIBLE=1" ;; +NetBSD) CFLAGS_STD="$CFLAGS_STD -D_NETBSD_SOURCE" ;; *BSD) CFLAGS_STD="$CFLAGS_STD -D_BSD_SOURCE" ;; Darwin) CFLAGS_STD="$CFLAGS_STD -D_DARWIN_C_SOURCE" ;; AIX) CFLAGS_STD="$CFLAGS_STD -D_ALL_SOURCE" ;;