Portability to BeOS.
authorBruno Haible <bruno@clisp.org>
Mon, 21 Aug 2006 18:28:02 +0000 (18:28 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 21 Aug 2006 18:28:02 +0000 (18:28 +0000)
ChangeLog
lib/ChangeLog
lib/mbchar.h
m4/ChangeLog
m4/mbchar.m4
modules/mbchar

index 91a19d2..e3880ff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-19  Bruno Haible  <bruno@clisp.org>
+
+       BeOS portability.
+       * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
+       BeOS has mbrtowc() but no <wctype.h>.
+
 2006-08-21  Bruno Haible <bruno@clisp.org>
 
        * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
index cc8d1c8..5705f2a 100644 (file)
@@ -1,3 +1,8 @@
+2006-08-19  Bruno Haible  <bruno@clisp.org>
+
+       BeOS portability.
+       * mbchar.h: Include <wctype.h> only if it exists.
+
 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
 
        * cycle-check.h: Include <stdint.h> unconditionally, since we
index 52b1075..bf31027 100644 (file)
 #include <time.h>
 #include <wchar.h>
 
-#include <wctype.h>
+/* BeOS 5 has the functions but no <wctype.h>.  */
+#if HAVE_WCTYPE_H
+# include <wctype.h>
+#endif
 /* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions.
    Assume all 12 functions are implemented the same way, or not at all.  */
 #if !defined iswalnum && !HAVE_ISWCNTRL
index 8f525b6..919e79b 100644 (file)
@@ -1,3 +1,9 @@
+2006-08-19  Bruno Haible  <bruno@clisp.org>
+
+       BeOS portability.
+       * mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
+       exist.
+
 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
 
        Remove files that are no longer needed by their respective modules.
index ec4cbab..f95e926 100644 (file)
@@ -1,4 +1,4 @@
-# mbchar.m4 serial 3
+# mbchar.m4 serial 4
 dnl Copyright (C) 2005-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,13 +10,14 @@ dnl From Bruno Haible.
 AC_DEFUN([gl_MBCHAR],
 [
   AC_REQUIRE([AC_GNU_SOURCE])
-  dnl The following line is that so the user can test
-  dnl HAVE_WCHAR_H && HAVE_WCTYPE_H before #include "mbchar.h".
-  AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
-  dnl Compile mbchar.c only if HAVE_WCHAR_H && HAVE_WCTYPE_H.
-  if test $ac_cv_header_wchar_h = yes && test $ac_cv_header_wctype_h = yes; then
+  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])
     dnl Prerequisites of mbchar.h and mbchar.c.
+    AC_CHECK_HEADERS_ONCE([wctype.h])
     AC_CHECK_FUNCS([iswcntrl])
   fi
 ])
index c430361..13b9e41 100644 (file)
@@ -17,7 +17,7 @@ Makefile.am:
 lib_SOURCES += mbchar.h
 
 Include:
-#if HAVE_WCHAR_H && HAVE_WCTYPE_H
+#if HAVE_WCHAR_H
 #include "mbchar.h"
 #endif