changeset 7888:b6376840b47b

* modules/fnmatch (Depends-on): Depend on wchar. * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>. * m4/fnmatch.m4: Likewise. * modules/mbchar (Makefile.am): Assume <wchar.h>. * m4/mbchar.m4: Likewise. * modules/mbswidth (Depends-on): Depend on wchar. * lib/mbswidth.c: Assume <wchar.h>. * m4/mbswidth.m4: Likewise. * modules/quotearg (Depends-on): Depend on wchar. * lib/quotearg.c: Assume <wchar.h>. * m4/quotearg.m4: Likewise. * modules/regex (Depends-on): Depend on wchar. * lib/regex_internal.h: Assume <wchar.h>. * m4/regex.m4: Likewise. * modules/stdint (Depends-on): Depend on wchar. * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>. * m4/stdint.m4: Likewise. * tests/test-stdint.c [HAVE_WINT_T]: Likewise. * modules/strftime (Depends-on): Depend on wchar. * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>. * modules/strtol (Depends-on): Depend on wchar. * lib/strtol.c: Assume <wchar.h>. * modules/wcwidth (Depends-on): Depend on wchar. * lib/wcwidth.h: Assume <wchar.h>. * m4/wcwidth.m4: Likewise.
author Eric Blake <ebb9@byu.net>
date Tue, 16 Jan 2007 16:31:23 +0000
parents 87ea438b0662
children 5c31327eb3ea
files ChangeLog lib/fnmatch.c lib/mbswidth.c lib/quotearg.c lib/regex_internal.h lib/stdint_.h lib/strftime.c lib/strtol.c lib/wcwidth.h m4/fnmatch.m4 m4/mbchar.m4 m4/mbswidth.m4 m4/quotearg.m4 m4/regex.m4 m4/stdint.m4 m4/wcwidth.m4 modules/fnmatch modules/mbchar modules/mbswidth modules/quotearg modules/regex modules/stdint modules/strftime modules/strtol modules/wcwidth tests/test-stdint.c
diffstat 26 files changed, 101 insertions(+), 118 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2007-01-16  Eric Blake  <ebb9@byu.net>
+
+	* modules/fnmatch (Depends-on): Depend on wchar.
+	* lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
+	* m4/fnmatch.m4: Likewise.
+	* modules/mbchar (Makefile.am): Assume <wchar.h>.
+	* m4/mbchar.m4: Likewise.
+	* modules/mbswidth (Depends-on): Depend on wchar.
+	* lib/mbswidth.c: Assume <wchar.h>.
+	* m4/mbswidth.m4: Likewise.
+	* modules/quotearg (Depends-on): Depend on wchar.
+	* lib/quotearg.c: Assume <wchar.h>.
+	* m4/quotearg.m4: Likewise.
+	* modules/regex (Depends-on): Depend on wchar.
+	* lib/regex_internal.h: Assume <wchar.h>.
+	* m4/regex.m4: Likewise.
+	* modules/stdint (Depends-on): Depend on wchar.
+	* lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
+	* m4/stdint.m4: Likewise.
+	* tests/test-stdint.c [HAVE_WINT_T]: Likewise.
+	* modules/strftime (Depends-on): Depend on wchar.
+	* lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
+	* modules/strtol (Depends-on): Depend on wchar.
+	* lib/strtol.c: Assume <wchar.h>.
+	* modules/wcwidth (Depends-on): Depend on wchar.
+	* lib/wcwidth.h: Assume <wchar.h>.
+	* m4/wcwidth.m4: Likewise.
+
 2007-01-16  Bruno Haible  <bruno@clisp.org>
 
 	* modules/csharpexec-script: New, created from...
--- a/lib/fnmatch.c
+++ b/lib/fnmatch.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006
+/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007
 	Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -40,7 +40,7 @@
 #include <string.h>
 
 #define WIDE_CHAR_SUPPORT \
-  (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC && HAVE_ISWCTYPE \
+  (HAVE_WCTYPE_H && HAVE_BTOWC && HAVE_ISWCTYPE \
    && HAVE_WMEMCHR && (HAVE_WMEMCPY || HAVE_WMEMPCPY))
 
 /* For platform which support the ISO C amendement 1 functionality we
--- a/lib/mbswidth.c
+++ b/lib/mbswidth.c
@@ -1,5 +1,5 @@
 /* Determine the number of screen columns needed for a string.
-   Copyright (C) 2000-2006 Free Software Foundation, Inc.
+   Copyright (C) 2000-2007 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
@@ -31,15 +31,7 @@
 #include <ctype.h>
 
 /* Get mbstate_t, mbrtowc(), mbsinit().  */
-#if HAVE_WCHAR_H
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
-   <wchar.h>.  */
-# include <stdio.h>
-# include <time.h>
-# include <wchar.h>
-#endif
+#include <wchar.h>
 
 /* Get wcwidth().  */
 #include "wcwidth.h"
--- a/lib/quotearg.c
+++ b/lib/quotearg.c
@@ -1,6 +1,6 @@
 /* quotearg.c - quote arguments for output
 
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006 Free
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 Free
    Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -31,20 +31,12 @@
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
+#include <wchar.h>
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
 
-#if HAVE_WCHAR_H
-
-/* BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared.  */
-# include <stdio.h>
-# include <time.h>
-
-# include <wchar.h>
-#endif
-
 #if !HAVE_MBRTOWC
 /* Disable multibyte processing entirely.  Since MB_CUR_MAX is 1, the
    other macros are defined only for documentation and to satisfy C
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
 
@@ -37,9 +37,8 @@
 #if defined HAVE_LOCALE_H || defined _LIBC
 # include <locale.h>
 #endif
-#if defined HAVE_WCHAR_H || defined _LIBC
-# include <wchar.h>
-#endif /* HAVE_WCHAR_H || _LIBC */
+
+#include <wchar.h>
 #include <wctype.h>
 #include <stdint.h>
 #if defined _LIBC
@@ -87,7 +86,7 @@
 # define SIZE_MAX ((size_t) -1)
 #endif
 
-#if (defined MB_CUR_MAX && HAVE_LOCALE_H && HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_ISWCTYPE && HAVE_WCRTOMB && HAVE_MBRTOWC && HAVE_WCSCOLL) || _LIBC
+#if (defined MB_CUR_MAX && HAVE_LOCALE_H && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCRTOMB && HAVE_MBRTOWC && HAVE_WCSCOLL) || _LIBC
 # define RE_ENABLE_I18N
 #endif
 
--- a/lib/stdint_.h
+++ b/lib/stdint_.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2006 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2007 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
    This file is part of gnulib.
 
@@ -82,11 +82,7 @@
 #if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
 
 /* Get WCHAR_MIN, WCHAR_MAX.  */
-# if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
-   /* BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
-      <wchar.h>.  */
-#  include <stdio.h>
-#  include <time.h>
+# if ! (defined WCHAR_MIN && defined WCHAR_MAX)
 #  include <wchar.h>
 # endif
 
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1999, 2000, 2001, 2003, 2004, 2005, 2006 Free Software
+/* Copyright (C) 1991-1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software
    Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C Library.
@@ -58,7 +58,7 @@
    conversion specifications.  The GNU C Library uses UTF8 multibyte
    encoding, which is safe for formats, but strftime.c can be used
    with other C libraries that use unsafe encodings.  */
-#define DO_MULTIBYTE (HAVE_MBLEN && HAVE_WCHAR_H && ! MULTIBYTE_IS_FORMAT_SAFE)
+#define DO_MULTIBYTE (HAVE_MBLEN && ! MULTIBYTE_IS_FORMAT_SAFE)
 
 #if DO_MULTIBYTE
 # if HAVE_MBRLEN
--- a/lib/strtol.c
+++ b/lib/strtol.c
@@ -1,6 +1,7 @@
 /* Convert string representation of a number into an integer value.
 
-   Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2003, 2005, 2006
+   Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2003, 2005,
+   2006, 2007
    Free Software Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C
@@ -187,9 +188,7 @@
 # define LOCALE_PARAM_PROTO
 #endif
 
-#if defined _LIBC || defined HAVE_WCHAR_H
-# include <wchar.h>
-#endif
+#include <wchar.h>
 
 #ifdef USE_WIDE_CHAR
 # include <wctype.h>
--- a/lib/wcwidth.h
+++ b/lib/wcwidth.h
@@ -1,5 +1,5 @@
 /* Determine the number of screen columns needed for a character.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 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
@@ -21,15 +21,7 @@
 #if HAVE_WCHAR_T
 
 /* Get wcwidth if available, along with wchar_t.  */
-# if HAVE_WCHAR_H
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
-   <wchar.h>.  */
-#  include <stdio.h>
-#  include <time.h>
-#  include <wchar.h>
-# endif
+# include <wchar.h>
 
 /* Get iswprint.  */
 # include <wctype.h>
@@ -60,6 +52,6 @@
 #  endif
 # endif
 
-#endif /* HAVE_WCHAR_H */
+#endif /* HAVE_WCHAR_T */
 
 #endif /* _gl_WCWIDTH_H */
--- a/m4/fnmatch.m4
+++ b/m4/fnmatch.m4
@@ -1,6 +1,6 @@
 # Check for fnmatch.
 
-# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
 # Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -33,7 +33,7 @@
 	   {
 	     return fnmatch (pattern, string, flags);
 	   }
-         ],
+	 ],
 	 [exit
 	   (!(fnm ("a*", "", 0) == FNM_NOMATCH
 	      && y ("a*", "abc", 0)
@@ -65,7 +65,7 @@
 AC_REQUIRE([AC_TYPE_MBSTATE_T])dnl
 AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
 AC_CHECK_FUNCS([btowc iswctype mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy])
-AC_CHECK_HEADERS([wchar.h wctype.h])
+AC_CHECK_HEADERS([wctype.h])
 AC_LIBOBJ([fnmatch])
 FNMATCH_H=fnmatch.h
 ])# _AC_LIBOBJ_FNMATCH
@@ -75,8 +75,8 @@
 [
   FNMATCH_H=
   _AC_FUNC_FNMATCH_IF([POSIX], [ac_cv_func_fnmatch_posix],
-                      [rm -f lib/fnmatch.h],
-                      [_AC_LIBOBJ_FNMATCH])
+		      [rm -f lib/fnmatch.h],
+		      [_AC_LIBOBJ_FNMATCH])
   if test $ac_cv_func_fnmatch_posix != yes; then
     dnl We must choose a different name for our function, since on ELF systems
     dnl a broken fnmatch() in libc.so would override our fnmatch() if it is
@@ -95,8 +95,8 @@
 
   FNMATCH_H=
   _AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu],
-                      [rm -f lib/fnmatch.h],
-                      [_AC_LIBOBJ_FNMATCH])
+		      [rm -f lib/fnmatch.h],
+		      [_AC_LIBOBJ_FNMATCH])
   if test $ac_cv_func_fnmatch_gnu != yes; then
     dnl We must choose a different name for our function, since on ELF systems
     dnl a broken fnmatch() in libc.so would override our fnmatch() if it is
--- a/m4/mbchar.m4
+++ b/m4/mbchar.m4
@@ -1,5 +1,5 @@
-# mbchar.m4 serial 4
-dnl Copyright (C) 2005-2006 Free Software Foundation, Inc.
+# mbchar.m4 serial 5
+dnl Copyright (C) 2005-2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -10,11 +10,5 @@
 AC_DEFUN([gl_MBCHAR],
 [
   AC_REQUIRE([AC_GNU_SOURCE])
-  dnl The following line is that so the user can test HAVE_WCHAR_H
-  dnl before #include "mbchar.h".
-  AC_CHECK_HEADERS_ONCE([wchar.h])
-  dnl Compile mbchar.c only if HAVE_WCHAR_H.
-  if test $ac_cv_header_wchar_h = yes; then
-    AC_LIBOBJ([mbchar])
-  fi
+  AC_LIBOBJ([mbchar])
 ])
--- a/m4/mbswidth.m4
+++ b/m4/mbswidth.m4
@@ -1,5 +1,5 @@
-# mbswidth.m4 serial 13
-dnl Copyright (C) 2000-2002, 2004, 2006 Free Software Foundation, Inc.
+# mbswidth.m4 serial 14
+dnl Copyright (C) 2000-2002, 2004, 2006, 2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -18,9 +18,14 @@
   AC_CACHE_CHECK([whether mbswidth is declared in <wchar.h>],
     ac_cv_have_decl_mbswidth,
     [AC_TRY_COMPILE([
-#if HAVE_WCHAR_H
-# include <wchar.h>
-#endif
+/* 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>.  */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
 ], [
   char *p = (char *) mbswidth;
   return !p;
--- a/m4/quotearg.m4
+++ b/m4/quotearg.m4
@@ -1,5 +1,5 @@
-# quotearg.m4 serial 5
-dnl Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+# quotearg.m4 serial 6
+dnl Copyright (C) 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -9,7 +9,6 @@
   AC_LIBOBJ([quotearg])
 
   dnl Prerequisites of lib/quotearg.c.
-  AC_CHECK_HEADERS_ONCE([wchar.h])
   AC_CHECK_FUNCS_ONCE([mbsinit])
   AC_TYPE_MBSTATE_T
   gl_FUNC_MBRTOWC
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,7 +1,7 @@
-#serial 41
+#serial 42
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006 Free Software Foundation, Inc.
+# 2006, 2007 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -193,7 +193,6 @@
   AC_REQUIRE([AC_GNU_SOURCE])
   AC_REQUIRE([AC_C_RESTRICT])
   AC_REQUIRE([AM_LANGINFO_CODESET])
-  AC_CHECK_HEADERS_ONCE([wchar.h])
   AC_CHECK_FUNCS_ONCE([iswctype mbrtowc mempcpy wcrtomb wcscoll])
   AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
 ])
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,5 +1,5 @@
-# stdint.m4 serial 21
-dnl Copyright (C) 2001-2002, 2004-2006 Free Software Foundation, Inc.
+# stdint.m4 serial 22
+dnl Copyright (C) 2001-2002, 2004-2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -27,15 +27,6 @@
   fi
   AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT])
 
-  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 <inttypes.h>.
   dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h.
   if test $ac_cv_header_inttypes_h = yes; then
@@ -190,7 +181,7 @@
   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
 };
 	 ]])],
-         [gl_cv_header_working_stdint_h=yes])])
+	 [gl_cv_header_working_stdint_h=yes])])
   fi
   if test "$gl_cv_header_working_stdint_h" = yes; then
     STDINT_H=
@@ -269,9 +260,9 @@
   for gltype in $1 ; do
     AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed],
       [AC_COMPILE_IFELSE(
-         [AC_LANG_PROGRAM([$2[
-            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])],
-         result=yes, result=no)
+	 [AC_LANG_PROGRAM([$2[
+	    int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])],
+	 result=yes, result=no)
        eval gl_cv_type_${gltype}_signed=\$result
       ])
     eval result=\$gl_cv_type_${gltype}_signed
@@ -342,15 +333,13 @@
 dnl gl_STDINT_INCLUDES
 AC_DEFUN([gl_STDINT_INCLUDES],
 [[
+  /* 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 <signal.h>
-  #if HAVE_WCHAR_H
-    /* BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
-       <wchar.h>.  */
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
+  #include <stdio.h>
+  #include <time.h>
+  #include <wchar.h>
 ]])
 
 dnl gl_STDINT_TYPE_PROPERTIES
--- a/m4/wcwidth.m4
+++ b/m4/wcwidth.m4
@@ -1,4 +1,4 @@
-# wcwidth.m4 serial 7
+# wcwidth.m4 serial 8
 dnl Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -19,14 +19,12 @@
   AC_CHECK_DECLS([wcwidth], [], [], [
 /* AIX 3.2.5 declares wcwidth in <string.h>. */
 #include <string.h>
-#if HAVE_WCHAR_H
 /* 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>.  */
-# include <stddef.h>
-# include <stdio.h>
-# include <time.h>
-# include <wchar.h>
-#endif
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
 ])])
--- a/modules/fnmatch
+++ b/modules/fnmatch
@@ -11,6 +11,7 @@
 Depends-on:
 alloca
 stdbool
+wchar
 wctype
 
 configure.ac:
--- a/modules/mbchar
+++ b/modules/mbchar
@@ -18,9 +18,7 @@
 Makefile.am:
 
 Include:
-#if HAVE_WCHAR_H
 #include "mbchar.h"
-#endif
 
 License:
 LGPL
--- a/modules/mbswidth
+++ b/modules/mbswidth
@@ -9,6 +9,7 @@
 m4/mbswidth.m4
 
 Depends-on:
+wchar
 wctype
 wcwidth
 
--- a/modules/quotearg
+++ b/modules/quotearg
@@ -9,10 +9,11 @@
 m4/quotearg.m4
 
 Depends-on:
-xalloc
 gettext-h
 stdbool
+wchar
 wctype
+xalloc
 
 configure.ac:
 gl_QUOTEARG
--- a/modules/regex
+++ b/modules/regex
@@ -19,6 +19,7 @@
 stdint
 strcase
 ssize_t
+wchar
 wctype
 
 configure.ac:
--- a/modules/stdint
+++ b/modules/stdint
@@ -14,6 +14,7 @@
 
 Depends-on:
 absolute-header
+wchar
 
 configure.ac:
 gl_STDINT_H
@@ -26,8 +27,7 @@
 stdint.h: stdint_.h
 	rm -f $@-t $@
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-	  sed -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
-	      -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+	  sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
 	      -e 's|@''ABSOLUTE_STDINT_H''@|$(ABSOLUTE_STDINT_H)|g' \
 	      -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
 	      -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
--- a/modules/strftime
+++ b/modules/strftime
@@ -9,8 +9,9 @@
 m4/strftime.m4
 
 Depends-on:
+stdbool
 time_r
-stdbool
+wchar
 
 configure.ac:
 gl_FUNC_GNU_STRFTIME
--- a/modules/strtol
+++ b/modules/strtol
@@ -6,6 +6,7 @@
 m4/strtol.m4
 
 Depends-on:
+wchar
 
 configure.ac:
 gl_FUNC_STRTOL
--- a/modules/wcwidth
+++ b/modules/wcwidth
@@ -8,6 +8,7 @@
 m4/wint_t.m4
 
 Depends-on:
+wchar
 wctype
 
 configure.ac:
--- a/tests/test-stdint.c
+++ b/tests/test-stdint.c
@@ -1,5 +1,5 @@
 /* Test of <stdint.h> substitute.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 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
@@ -306,11 +306,7 @@
 #endif
 
 #if HAVE_WINT_T
-# if HAVE_WCHAR_H
-#  include <stdio.h>
-#  include <time.h>
-#  include <wchar.h>
-# endif
+# include <wchar.h>
 
 verify (TYPE_MINIMUM (wint_t) == WINT_MIN);
 verify (TYPE_MAXIMUM (wint_t) == WINT_MAX);