+2006-06-26 Bruno Haible <bruno@clisp.org>
+
+ * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
+
2006-06-23 Simon Josefsson <jas@extundo.com>
Bruno Haible <bruno@clisp.org>
+2006-06-26 Bruno Haible <bruno@clisp.org>
+
+ * stdlib_.h: Include <wchar.h> if necessary for WCHAR_MIN or
+ WCHAR_MAX.
+ Reported by Mark D. Baushke and Larry Jones.
+
2006-06-26 Bruno Haible <bruno@clisp.org>
* stdlib_.h: Don't include <stdint.h> when using the SGI C compiler
/* Get wchar_t, WCHAR_MIN, WCHAR_MAX. */
#include <stddef.h>
+/* Some systems define WCHAR_MIN, WCHAR_MAX in <wchar.h>, not <stddef.h>. */
+#if !(defined(WCHAR_MIN) && defined(WCHAR_MAX)) && @HAVE_WCHAR_H@
+# include <wchar.h>
+#endif
+
/* Get LONG_MIN, LONG_MAX, ULONG_MAX. */
#include <limits.h>
+2006-06-26 Bruno Haible <bruno@clisp.org>
+
+ * stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
+
2006-06-26 Bruno Haible <bruno@clisp.org>
* stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
AC_DEFUN([gl_STDINT_H],
[
+ dnl Check for <wchar.h>.
+ AC_CHECK_HEADERS_ONCE([wchar.h])
+ if test $ac_cv_header_wchar_h = yes; then
+ HAVE_WCHAR_H=1
+ else
+ HAVE_WCHAR_H=0
+ fi
+ AC_SUBST([HAVE_WCHAR_H])
+
dnl Check for <stdint.h> that doesn't clash with <sys/types.h>.
gl_HEADER_STDINT_H
if test $gl_cv_header_stdint_h = yes; then
gl_STDINT_MISSING_BOUNDS2([SIG_ATOMIC_MIN SIG_ATOMIC_MAX],
[#include <signal.h>])
dnl Don't bother defining WCHAR_MIN and WCHAR_MAX, since they should
- dnl already be defined in <stddef.h>.
+ dnl already be defined in <stddef.h> or <wchar.h>.
dnl For wint_t we need <wchar.h>.
dnl Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included
dnl before <wchar.h>.
# We need the following in order to create <stdint.h> when the system
# doesn't have one that works with the given compiler.
stdint.h: stdint_.h
- sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+ sed -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
+ -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
-e 's|@''FULL_PATH_STDINT_H''@|$(FULL_PATH_STDINT_H)|g' \
-e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
-e 's|@''FULL_PATH_INTTYPES_H''@|$(FULL_PATH_INTTYPES_H)|g' \