* lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
authorEric Blake <ebb9@byu.net>
Wed, 10 Jan 2007 13:46:26 +0000 (13:46 +0000)
committerEric Blake <ebb9@byu.net>
Wed, 10 Jan 2007 13:46:26 +0000 (13:46 +0000)
<wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
* m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
* m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
Reported by Chris McGuire.

ChangeLog
lib/wctype_.h
m4/wcwidth.m4
m4/wint_t.m4

index da23d5a..aa5338b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-01-10  Eric Blake  <ebb9@byu.net>
+
+       * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
+       <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
+       * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
+       * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
+       Reported by Chris McGuire.
+
 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * gnulib-tool (func_all_modules): Use POSIX conforming escaping
index 93f8ef6..6a3c056 100644 (file)
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
 
-   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
@@ -33,8 +33,9 @@
 /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.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>.  */
+   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>
index 7f23e5f..ad6222f 100644 (file)
@@ -1,5 +1,5 @@
-# wcwidth.m4 serial 6
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+# wcwidth.m4 serial 7
+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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -22,8 +22,9 @@ AC_DEFUN([gl_FUNC_WCWIDTH],
 #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>.  */
+   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>
index b8fff9c..3706c04 100644 (file)
@@ -1,5 +1,5 @@
-# wint_t.m4 serial 1 (gettext-0.12)
-dnl Copyright (C) 2003 Free Software Foundation, Inc.
+# wint_t.m4 serial 2 (gettext-0.12)
+dnl Copyright (C) 2003, 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.
@@ -11,7 +11,15 @@ dnl Prerequisite: AC_PROG_CC
 AC_DEFUN([gt_TYPE_WINT_T],
 [
   AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
-    [AC_TRY_COMPILE([#include <wchar.h>
+    [AC_TRY_COMPILE([
+/* 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>
        wint_t foo = (wchar_t)'\0';], ,
        gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
   if test $gt_cv_c_wint_t = yes; then