[PATCH v4] Fixes CJK wide character display

Daniel Stone daniel at fooishbar.org
Mon Aug 19 16:38:18 PDT 2013


Hi,

On 19 August 2013 23:37, Kristian Høgsberg <hoegsberg at gmail.com> wrote:
> On Mon, Aug 19, 2013 at 01:00:52PM -0700, Othman, Ossama wrote:
>> That's an implementation-specific preprocessor symbol.  Please use the
>> _XOPEN_SOURCE feature test macro instead.
>>
>> The user could also potentially define that feature test macro with a
>> specific value, such as 500 (see
>> http://pubs.opengroup.org/onlinepubs/7908799/xsh/compilation.html), in
>> CPPFLAGS via the configure script as well, meaning it would be good to
>> check if _XOPEN_SOURCE is defined before explicitly defining it.
>
> I changed the __USE_XOPEN #define to
>
> #define _XOPEN_SOURCE 700 /* for strnlen, snprintf and wcwidth */
>
> where 700 is requried for strnlen it seems.  I'm not sure if we should
> be testing for this in configure somehow, but let's go with this for
> now.  Patch committed, weston-terminal now has support for wide
> characters.  Thanks!

Or you could just replace it with a #include "config.h" directive,
where AC_USE_SYSTEM_EXTENSIONS will take care of it.  On some systems,
_XOPEN_SOURCE means 'give me only the set of SuS + X/Open and
absolutely nothing else', not 'add X/Open-type symbols to your
existing useful ones'.

Cheers,
Daniel


More information about the wayland-devel mailing list