[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: |
Sat, 7 Nov 2015 11:45:50 +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.
---
ChangeLog | 9 +++++++++
lib/wchar.in.h | 6 +++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index f3f5503..602ce34 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2015-11-07 KO Myung-Hun <address@hidden>
+ wchar: fix 'conflicting types' error for `__wcwidth' on OS/2 kLIBC
+ 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.
+
+2015-11-07 KO Myung-Hun <address@hidden>
+
w32spawn: clear SHELL_SPECIAL_CHARS and SHELL_SPACE_CHAR on OS/2 kLIBC
spawn() on OS/2 kLIBC is not silly like one on Windows
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
--
2.6.0
- [PATCH] OS/2 patches, KO Myung-Hun, 2015/11/06
- [PATCH 01/11] stdint: check _INTPTR_T_DECLARED before defining intptr_t and uintptr_t, KO Myung-Hun, 2015/11/06
- [PATCH 02/11] binary-io: don't put fd in binary mode if it is a console on EMX, KO Myung-Hun, 2015/11/06
- [PATCH 03/11] pipe-filter-aux: undefine HAVE_SELECT on KLIBC, KO Myung-Hun, 2015/11/06
- [PATCH 04/11] w32spawn: clear SHELL_SPECIAL_CHARS and SHELL_SPACE_CHAR on OS/2 kLIBC, KO Myung-Hun, 2015/11/06
- [PATCH 05/11] wchar: fix 'conflicting types' error for `__wcwidth' on OS/2 kLIBC,
KO Myung-Hun <=
- [PATCH 07/11] dup, dup2, fcntl: support a directory fd on OS/2 kLIBC, KO Myung-Hun, 2015/11/06
- [PATCH 06/11] pipe_filter_ii_execute: port to OS/2 kLIBC, KO Myung-Hun, 2015/11/06
- [PATCH 08/11] openat_proc_name: port to OS/2 kLIBC, KO Myung-Hun, 2015/11/06
- [PATCH 10/11] utimes: detect utimes() correctly on OS/2 kLIBC, KO Myung-Hun, 2015/11/06
- [PATCH 09/11] opendir, closedir, dirfd, fdopendir: port to OS/2 kLIBC, KO Myung-Hun, 2015/11/06
- [PATCH 11/11] gnulib-tool: fall back into copy if symbolic link is not supported, KO Myung-Hun, 2015/11/06