+2017-04-27 Bruno Haible <bruno@clisp.org>
+
+ wctype-h: Fix compilation error with the original mingw.org mingw.
+ * m4/wctype_h.m4 (gl_WCTYPE_H): Test for <crtdefs.h>. Set
+ HAVE_CRTDEFS_H.
+ * modules/wctype-h (Makefile.am): Substitute HAVE_CRTDEFS_H.
+ * lib/wctype.in.h (rpl_wint_t): If <crtdefs.h> does not exist, include
+ <stddef.h> instead.
+ Reported and proposed by Eli Zaretskii <eliz@gnu.org>.
+
2017-04-26 Pádraig Brady <P@draigBrady.com>
nap.h: Fix compilation on non windows platforms
# define WEOF -1
# endif
#else
-/* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h>.
- This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be
- "unchanged by default argument promotions". Override it. */
+/* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h> or
+ <stddef.h>. This is too small: ISO C 99 section 7.24.1.(2) says that
+ wint_t must be "unchanged by default argument promotions". Override it. */
# if @GNULIB_OVERRIDES_WINT_T@
# if !GNULIB_defined_wint_t
-# include <crtdefs.h>
+# if @HAVE_CRTDEFS_H@
+# include <crtdefs.h>
+# else
+# include <stddef.h>
+# endif
typedef unsigned int rpl_wint_t;
# undef wint_t
# define wint_t rpl_wint_t
-# wctype_h.m4 serial 18
+# wctype_h.m4 serial 19
dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
fi
AC_SUBST([HAVE_WCTYPE_H])
+ AC_CHECK_HEADERS_ONCE([crtdefs.h])
+ if test $ac_cv_header_crtdefs_h = yes; then
+ HAVE_CRTDEFS_H=1
+ else
+ HAVE_CRTDEFS_H=0
+ fi
+ AC_SUBST([HAVE_CRTDEFS_H])
+
case "$gl_cv_func_iswcntrl_works" in
*yes) REPLACE_ISWCNTRL=0 ;;
*) REPLACE_ISWCNTRL=1 ;;
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
+ -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \
-e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \
-e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \