Mercurial > gnulib
changeset 18205:4fb84296b8f8
wchar: fix "conflicting types" error for __wcwidth on OS/2 kLIBC
On OS/2 kLIBC, wcwidth is a macro that expands to the name of a
static inline function. The implementation of wcwidth in wcwidth.c
causes a "conflicting types" error.
* lib/wchar.in.h: Undefine wcwidth on OS/2 kLIBC.
author | KO Myung-Hun <komh78@gmail.com> |
---|---|
date | Thu, 14 Jan 2016 11:23:45 +0900 |
parents | 1b9bf726a39a |
children | fb2ae9e4640b |
files | lib/wchar.in.h |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/wchar.in.h Thu Jan 14 11:23:44 2016 +0900 +++ b/lib/wchar.in.h Thu Jan 14 11:23:45 2016 +0900 @@ -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,11 @@ # if !@HAVE_DECL_WCWIDTH@ /* 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 that expands to the name of a + static inline function. The implementation of wcwidth in wcwidth.c + causes a "conflicting types" error. */ +# undef wcwidth # endif _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); # endif