bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 16/21] wcwidth: fix 'conflicting types' error for `__wcwidth'


From: KO Myung-Hun
Subject: Re: [PATCH 16/21] wcwidth: fix 'conflicting types' error for `__wcwidth' on OS/2 kLIBC
Date: Tue, 02 Dec 2014 16:16:46 +0900
User-agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:10.0.6esrpre) Gecko/20120715 Firefox/10.0.6esrpre SeaMonkey/2.7.2

Hi/2.

Paul Eggert wrote:
> KO Myung-Hun wrote:
>> +#ifdef __KLIBC__
>> +/* To avoid 'conflicting types' error for `__wcwidth' on OS/2 kLIBC.
>> +   wchar_t(unsigned short) is defined differently from wint_t(int) on
>> +   OS/2 kLIBC. */
>> +# undef wcwidth
>> +/* Ignore wcwidth() of OS/2 kLIBC */
>> +# undef HAVE_WCWIDTH
>> +#endif
> 
> The #undef is redundant, since it's about to happen anyway.
> 

Do you mean HAVE_WCWIDTH ?

> Why is HAVE_WCWIDTH defined?  As I understand it, wcwidth is merely a
> macro in kLIBC, not a function, so HAVE_WCWIDTH shouldn't be 1.
> 

Sorry, it's my mistake. HAVE_WCWIDTH is not defined.

> Put the comment first, and then the code.  

I don't understand what you mean. Do you mean that do not mix comments
and macro definitions ?

> The code change should be
> pretty simple; all you need to do is replace the existing '#if
> HAVE_WCWIDTH' with '#if HAVE_WCWIDTH && !defined __KLIBC__'.

This comment is for whole this patch or for #undef HAVE_WCWIDTH only ?

Anyway removed #undef HAVE_WCWIDTH part.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

Attachment: 0001-wcwidth-fix-conflicting-types-error-for-__wcwidth-on.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]