summaryrefslogtreecommitdiff
path: root/m4/btowc.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2010-12-25 11:26:23 +0100
committerBruno Haible <bruno@clisp.org>2010-12-25 11:26:23 +0100
commit438d74b6b96ac7ccce6791556fe5e27f0e8f7ed8 (patch)
tree0d08d3ce37ae94c76403ea33c4e91bbd4f503c7a /m4/btowc.m4
parent1d7237cc87bccbf880affcdcaf82c9c32de01657 (diff)
downloadgnulib-438d74b6b96ac7ccce6791556fe5e27f0e8f7ed8.tar.gz
Ensure all prerequisites of <wchar.h> are included.
* m4/btowc.m4 (gl_FUNC_BTOWC): Include <stddef.h>, <stdio.h>, <time.h> before <wchar.h>. * m4/mbrlen.m4 (gl_MBRLEN_INCOMPLETE_STATE, gl_MBRLEN_RETVAL, gl_MBRLEN_NUL_RETVAL): Likewise. * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE, gl_MBRTOWC_SANITYCHECK, gl_MBRTOWC_NULL_ARG, gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL, AC_FUNC_MBRTOWC): Likewise. * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise. * m4/mbstate_t.m4 (AC_TYPE_MBSTATE_T): Likewise. * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise. * m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION, gl_WCSRTOMBS_NULL): Likewise. * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise. * m4/wchar_h.m4 (gl_WCHAR_H_INLINE_OK): Likewise. (gl_WCHAR_H): Improve comments. * m4/wctype_h.m4 (gl_WCTYPE_H): Likewise.
Diffstat (limited to 'm4/btowc.m4')
-rw-r--r--m4/btowc.m418
1 files changed, 15 insertions, 3 deletions
diff --git a/m4/btowc.m4 b/m4/btowc.m4
index b16b1f020a..cda119d935 100644
--- a/m4/btowc.m4
+++ b/m4/btowc.m4
@@ -1,4 +1,4 @@
-# btowc.m4 serial 7
+# btowc.m4 serial 8
dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -28,8 +28,14 @@ AC_DEFUN([gl_FUNC_BTOWC],
[
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
-#include <stdio.h>
#include <string.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>
int main ()
{
@@ -69,8 +75,14 @@ changequote([,])dnl
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <locale.h>
-#include <stdio.h>
#include <string.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>
int main ()
{