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.

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