diff --git a/lib/libcurses/curs_addwstr.3 b/lib/libcurses/curs_addwstr.3
index 474fc51a24b..bf616a8aace 100644
--- a/lib/libcurses/curs_addwstr.3
+++ b/lib/libcurses/curs_addwstr.3
@@ -44,6 +44,8 @@
.hy
.SH SYNOPSIS
.nf
+\fB#define _XOPEN_SOURCE_EXTENDED\fR
+.nf
\fB#include <curses.h>\fR
.PP
\fBint addwstr(const wchar_t *\fR\fIwstr\fR\fB);\fR
Hello.
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).
Initially I sent this message to the tech mailing list and was ignored.
I guess my topic wasn't really appropriate for that list, I apologize
for this mistake.
Best regards, Grigory.
No comments:
Post a Comment