From 72d868e6460e9189ab6ca9b4f4feae3d58db6f80 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 18 Aug 2016 09:13:44 -0700 Subject: 3222 Commit 3191 stopped defining _XOPEN_SOURCE when building termbox/ to get Mu to build on OpenBSD. However, that had the side effect of not declaring the prototype for wcwidth() on some versions of Linux. Ugh. Just hack around this morass. In general the direction we want to go in Mu is fewer feature #defines. At least explicit ones. Should be an internal detail of the underlying platform our code shouldn't have to worry about. If headers don't cooperate, just start explicitly declaring prototypes and damn the consequences. --- termbox/termbox.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'termbox') diff --git a/termbox/termbox.c b/termbox/termbox.c index 79e6e3cc..e7757f9a 100644 --- a/termbox/termbox.c +++ b/termbox/termbox.c @@ -12,6 +12,10 @@ #include #include #include +/* hack: we can't define _XOPEN_SOURCE because that causes OpenBSD to not + * include SIGWINCH. But then this prototype is not included on Linux, + * triggering a warning. */ +extern int wcwidth (wchar_t); #include "termbox.h" -- cgit 1.4.1-2-gfad0