[Top][All Lists]

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

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

From: Paul Eggert
Subject: Re: [PATCH 16/21] wcwidth: fix 'conflicting types' error for `__wcwidth' on OS/2 kLIBC
Date: Sun, 30 Nov 2014 14:23:35 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

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 */

The #undef is redundant, since it's about to happen anyway.

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.

Put the comment first, and then the code. 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__'.

reply via email to

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