From: Stefan Sperling Subject: Re: [PATCH 1/2] tog: fix widechar ncurses definitions To: Quentin Rameau , gameoftrees@openbsd.org Date: Tue, 21 Sep 2021 12:57:10 +0200 On Tue, Sep 21, 2021 at 12:53:44PM +0200, Stefan Sperling wrote: > On Sun, Sep 19, 2021 at 01:51:19PM +0200, Quentin Rameau wrote: > > The ncurses implementation still relies on _XOPEN_SOURCE_EXTENDED being > > defined in order to expose the widechar variant of ncurses, even on > > more recent distributed versions. > > --- > > tog/tog.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/tog/tog.c b/tog/tog.c > > index 228a76b0..5af8f69f 100644 > > --- a/tog/tog.c > > +++ b/tog/tog.c > > @@ -19,7 +19,9 @@ > > > > #include > > #include > > +#define _XOPEN_SOURCE_EXTENDED > > The effect of this seems to be: > #define NCURSES_WIDECHAR 1 > > Can't we set this define directly? Hmm, actually, the openbsd version already sets the _XOPEN_SOURCE_EXTENDED macro just like your patch does: https://git.gameoftrees.org/gitweb/?p=got.git;a=blob;f=tog/tog.c;h=a61b2885188ca56c732c41d2f597ad00ab285533;hb=HEAD#l23 It is only missing in -portable.