New upstream version 1.8
[debian/gzip] / lib / wchar.in.h
index b6e43627926cea18d5ca37c527da9f79b61f5a46..755600fdeec2e3816dd14713aaeadecfc522fb3a 100644 (file)
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
 
-   Copyright (C) 2007-2013 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 General Public License as published by
 #endif
 @PRAGMA_COLUMNS@
 
-#if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
+#if (((defined __need_mbstate_t || defined __need_wint_t)               \
+      && !defined __MINGW32__ && !defined __KLIBC__)                    \
+     || (defined __hpux                                                 \
+         && ((defined _INTTYPES_INCLUDED && !defined strtoimax)         \
+             || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H))               \
+     || defined _GL_ALREADY_INCLUDING_WCHAR_H)
 /* Special invocation convention:
-   - Inside glibc and uClibc header files.
+   - Inside glibc and uClibc header files, but not MinGW.
    - On HP-UX 11.00 we have a sequence of nested includes
      <wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
      once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
@@ -440,6 +445,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