On Wed, Sep 7, 2022 at 9:02 PM Grigory Kirillov <t...@bk.ru> wrote:
>
> Recently one OpenBSD user of little project of mine got caught up in
> a problem - they couldn't compile it from source because wide character
> functions of the ncurses library weren't declared. After a long
> investigation I finally found out that these functions require
> _XOPEN_SOURCE_EXTENDED macro being defined. On my machine that wasn't
> a problem because on my Linux system ncurses header also checks for
> _XOPEN_SOURCE macro which value has to be greater than or equal to 500
> and I was already compiling it with this macro with a value of 700.
>
> My request here is to put up a `#define _XOPEN_SOURCE_EXTENDED` line to
> the OpenBSD man page for curs_addwstr.3 I think this will make it
> easier for other people to compile ncurses with wide character functions
> especially for someone who's trying to resolve issues for someone else
> while being on a different system...
>
> Also it would be cool if ncurses header provided in OpenBSD were
> checking value of the _XOPEN_SOURCE macro (because
> _XOPEN_SOURCE_EXTENDED is equal to _XOPEN_SOURCE with the value of 500
> or greater (according to my feature_test_macros(7) man page) and I also
> hope that this is a standard behavior).

>From what I can see, this macro is obsolete, so it should probably not
be recommended in the man page:

"Use of _XOPEN_SOURCE_EXTENDED in new source code should be avoided.
Since defining _XOPEN_SOURCE with a value of 500 or more has the same
effect as defining _XOPEN_SOURCE_EXTENDED, the latter (obsolete)
feature test macro is generally not described in the SYNOPSIS in man
pages."

Reply via email to