summaryrefslogtreecommitdiff
path: root/lib/wchar.in.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-03-27 21:41:36 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-03-27 21:41:36 +0200
commit6b73edd95d603e27d55d4905134ac1327d426534 (patch)
treee0b9334e2637f17696c796ac13b2c39294bf9233 /lib/wchar.in.h
parent0250cb64565a7d5238bbc751225d4b0236ef8316 (diff)
New upstream version 0.9.7upstream/0.9.7
Diffstat (limited to 'lib/wchar.in.h')
-rw-r--r--lib/wchar.in.h33
1 files changed, 25 insertions, 8 deletions
diff --git a/lib/wchar.in.h b/lib/wchar.in.h
index b15ad4b7..4c009f6a 100644
--- a/lib/wchar.in.h
+++ b/lib/wchar.in.h
@@ -1,18 +1,27 @@
/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or
+ modify it under the terms of either:
+ * the GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 3 of the License, or (at your
+ option) any later version.
+
+ or
+
+ * the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ or both in parallel, as here.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
+ GNU General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License
+ You should have received a copy of the GNU General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Eric Blake. */
@@ -31,10 +40,11 @@
@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)) \
+ || (defined __MINGW32__ && defined __STRING_H_SOURCED__) \
|| defined _GL_ALREADY_INCLUDING_WCHAR_H)
/* Special invocation convention:
- Inside glibc and uClibc header files, but not MinGW.
@@ -44,6 +54,8 @@
and once directly. In both situations 'wint_t' is not yet defined,
therefore we cannot provide the function overrides; instead include only
the system's <wchar.h>.
+ - With MinGW 3.22, when <string.h> includes <wchar.h>, only some part of
+ <wchar.h> is actually processed, and that doesn't include 'mbstate_t'.
- On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
the latter includes <wchar.h>. But here, we have no way to detect whether
<wctype.h> is completely included or is still being included. */
@@ -445,6 +457,11 @@ _GL_CXXALIAS_RPL (wcwidth, int, (wchar_t));
# 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