vis

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

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

commit c0e99705485572944a0c2ef2c1f7ce52d4191903
parent 23dd5bfe99dea264391e797b8d243b1eabecf84c
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Thu,  5 May 2016 11:24:55 +0200

build: add -D__BSD_VISIBLE=1 to default CFLAGS for FreeBSD

SIGWINCH is not part of POSIX. In contrast to the other BSD
variants, FreeBSD does not expose it when defining _BSD_SOURCE.

This is probably not the 'correct' solution, but seems to
work for now.

Instead of defining it globally it might have been better to add
the necessary #define to the only source file making use of
SIGWINCH.

Close #302

Diffstat:
Mconfigure | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure b/configure @@ -209,9 +209,10 @@ LDFLAGS_STD="-lc" OS=$(uname) case "$OS" in -*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" ;; +FreeBSD) CFLAGS_STD="$CFLAGS_STD -D_BSD_SOURCE -D__BSD_VISIBLE=1" ;; +*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" ;; esac tryflag CFLAGS -pipe