+2011-02-18 Bruno Haible <bruno@clisp.org>
+
+ stdint: Cut dependency to module 'wchar'.
+ * lib/stdint.in.h: Include wchar.h only when HAVE_WCHAR_H is 1. Also
+ include the necessary prerequisites.
+ * m4/stdint.m4 (gl_STDINT_H): Test whether wchar.h exists.
+ * modules/stdint (Depends-on): Remove wchar.
+ (Makefile.am): Substitute HAVE_WCHAR_H.
+ This reverts part of a 2007-01-06 commit. Reported by Paul Eggert.
+
2011-02-18 Eric Blake <eblake@redhat.com>
longlong: skip, rather than fail, on cross-compilation
sequence of nested includes
<wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
<stdint.h> and assumes its types are already defined. */
-#if ! (defined WCHAR_MIN && defined WCHAR_MAX)
+#if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
# include <wchar.h>
# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
-# stdint.m4 serial 37
+# stdint.m4 serial 38
dnl Copyright (C) 2001-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
fi
AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT])
+ dnl Check for <wchar.h>, in the same way as gl_WCHAR_H does.
+ 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 <inttypes.h>.
dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h.
if test $ac_cv_header_inttypes_h = yes; then
Depends-on:
include_next
multiarch
-wchar
configure.ac:
gl_STDINT_H
-e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
-e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
-e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
+ -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
-e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
-e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
-e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \