* m4/stdint.m4 (gl_STDINT_H): Define GNULIB_OVERRIDES_WINT_T.
* modules/stdint (Makefile.am): Substitute GNULIB_OVERRIDES_WINT_T.
* lib/stdint.in.h [GNULIB_OVERRIDES_WINT_T]: Redefine WINT_MIN and
WINT_MAX.
+2016-12-17 Bruno Haible <bruno@clisp.org>
+
+ stdint: Fix WINT_MAX to match the gnulib provided wint_t on MSVC.
+ * m4/stdint.m4 (gl_STDINT_H): Define GNULIB_OVERRIDES_WINT_T.
+ * modules/stdint (Makefile.am): Substitute GNULIB_OVERRIDES_WINT_T.
+ * lib/stdint.in.h [GNULIB_OVERRIDES_WINT_T]: Redefine WINT_MIN and
+ WINT_MAX.
+
2016-12-17 Bruno Haible <bruno@clisp.org>
Avoid autoconf warning.
getlogin: Port to newer mingw.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_GETLOGIN.
* m4/getlogin.m4 (gl_FUNC_GETLOGIN): Set HAVE_DECL_GETLOGIN.
- * modules/unistd (Makefile.am): Substibute HAVE_DECL_GETLOGIN, not
+ * modules/unistd (Makefile.am): Substitute HAVE_DECL_GETLOGIN, not
HAVE_GETLOGIN.
* lib/unistd.in.h (getlogin): Test HAVE_DECL_GETLOGIN, not
HAVE_GETLOGIN.
(signbit): New macro.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
REPLACE_SIGNBIT.
- * modules/math (Makefile.am): Substibute also GNULIB_SIGNBIT and
+ * modules/math (Makefile.am): Substitute also GNULIB_SIGNBIT and
REPLACE_FREXPL into math.h.
2007-04-06 Bruno Haible <bruno@clisp.org>
* lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
is set. Don't provide a prototype if REPLACE_FREXPL is not set.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
- * modules/math (Makefile.am): Substibute also REPLACE_FREXPL into
+ * modules/math (Makefile.am): Substitute also REPLACE_FREXPL into
math.h.
2007-03-25 Bruno Haible <bruno@clisp.org>
LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */
#include <limits.h>
+/* Override WINT_MIN and WINT_MAX if gnulib's <wchar.h> or <wctype.h> overrides
+ wint_t. */
+#if @GNULIB_OVERRIDES_WINT_T@
+# undef WINT_MIN
+# undef WINT_MAX
+# define WINT_MIN 0x0U
+# define WINT_MAX 0xffffffffU
+#endif
+
#if ! @HAVE_C99_STDINT_H@
/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
-# stdint.m4 serial 48
+# stdint.m4 serial 49
dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
gl_STDINT_TYPE_PROPERTIES
fi
- # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
+ dnl Determine whether gnulib's <wchar.h> or <wctype.h> would, if present,
+ dnl override 'wint_t'.
+ AC_CACHE_CHECK([whether wint_t is too small],
+ [gl_cv_type_wint_t_too_small],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+#include <wchar.h>
+ int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
+ ]])],
+ [gl_cv_type_wint_t_too_small=no],
+ [gl_cv_type_wint_t_too_small=yes])])
+ if test $gl_cv_type_wint_t_too_small = yes; then
+ GNULIB_OVERRIDES_WINT_T=1
+ else
+ GNULIB_OVERRIDES_WINT_T=0
+ fi
+
+ dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
LIMITS_H=limits.h
AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
AC_SUBST([HAVE_SYS_BITYPES_H])
AC_SUBST([HAVE_SYS_INTTYPES_H])
AC_SUBST([STDINT_H])
+ AC_SUBST([GNULIB_OVERRIDES_WINT_T])
AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"])
])
-e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
-e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
-e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
+ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
< $(srcdir)/stdint.in.h; \
} > $@-t && \
mv $@-t $@