]> git.saurik.com Git - bison.git/blame - m4/mbstate_t.m4
* data/yacc.c: Guard the declaration of yytoknum also with
[bison.git] / m4 / mbstate_t.m4
CommitLineData
eb956856
PE
1# mbstate_t.m4 serial 9
2dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU
4dnl General Public License. As a special exception to the GNU General
5dnl Public License, this file may be distributed as part of a program
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
ff4a34be
AD
8
9# From Paul Eggert.
10
11# BeOS 5 has <wchar.h> but does not define mbstate_t,
12# so you can't declare an object of that type.
13# Check for this incompatibility with Standard C.
14
eb956856
PE
15# AC_TYPE_MBSTATE_T
16# -----------------
17AC_DEFUN([AC_TYPE_MBSTATE_T],
18 [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
19 [AC_COMPILE_IFELSE(
20 [AC_LANG_PROGRAM(
21 [AC_INCLUDES_DEFAULT
22# include <wchar.h>],
23 [mbstate_t x; return sizeof x;])],
24 [ac_cv_type_mbstate_t=yes],
25 [ac_cv_type_mbstate_t=no])])
26 if test $ac_cv_type_mbstate_t = yes; then
27 AC_DEFINE([HAVE_MBSTATE_T], 1,
28 [Define to 1 if <wchar.h> declares mbstate_t.])
29 else
30 AC_DEFINE([mbstate_t], int,
ff4a34be
AD
31 [Define to a type if <wchar.h> does not define.])
32 fi])