bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH 05/11] wchar: fix 'conflicting types' error for `__wcwidth' on OS


From: KO Myung-Hun
Subject: [PATCH 05/11] wchar: fix 'conflicting types' error for `__wcwidth' on OS/2 kLIBC
Date: Wed, 22 Jul 2015 14:49:33 +0900

On OS/2 kLIBC, wcwidth is a macro to static inline function.
Implementation of wcwidth in wcwidth.c causes 'conflicting types'
error.

* lib/wchar.in.h: Undefine wcwidth on OS/2 kLIBC.
---
 lib/wchar.in.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/wchar.in.h b/lib/wchar.in.h
index 70305d5..7f7fd07 100644
--- a/lib/wchar.in.h
+++ b/lib/wchar.in.h
@@ -31,7 +31,7 @@
 @PRAGMA_COLUMNS@
 
 #if (((defined __need_mbstate_t || defined __need_wint_t)               \
-      && !defined __MINGW32__)                                          \
+      && !defined __MINGW32__ && !defined __KLIBC__)                    \
      || (defined __hpux                                                 \
          && ((defined _INTTYPES_INCLUDED && !defined strtoimax)         \
              || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H))               \
@@ -445,6 +445,10 @@ _GL_CXXALIAS_RPL (wcwidth, int, (wchar_t));
 #  if address@hidden@
 /* wcwidth exists but is not declared.  */
 _GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
+#  elif defined __KLIBC__
+/* On OS/2 kLIBC, wcwidth is a macro to static inline function. Implementation
+   of wcwidth in wcwidth.c causes 'conflicting types' error. */
+#   undef wcwidth
 #  endif
 _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
 # endif
-- 
1.9.5




reply via email to

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