mbstate_t.m4 846 B

1234567891011121314151617181920212223
  1. # serial 2
  2. # From Paul Eggert.
  3. # Some versions of BeOS define mbstate_t to be an incomplete type,
  4. # so you can't declare an object of that type.
  5. # Check for this incompatibility with Standard C.
  6. # Include stdio.h first, because otherwise this test would fail on Linux
  7. # (at least 2.2.16) because the `_XOPEN_SOURCE 500' definition elicits
  8. # a syntax error in wchar.h due to the use of undefined __int32_t.
  9. AC_DEFUN(AC_MBSTATE_T_OBJECT,
  10. [AC_CACHE_CHECK([for mbstate_t object type], ac_cv_type_mbstate_t_object,
  11. [AC_TRY_COMPILE([#include <stdio.h>
  12. #include <wchar.h>],
  13. [mbstate_t x; return sizeof x;],
  14. ac_cv_type_mbstate_t_object=yes,
  15. ac_cv_type_mbstate_t_object=no)])
  16. if test $ac_cv_type_mbstate_t_object = yes; then
  17. AC_DEFINE(HAVE_MBSTATE_T_OBJECT, 1,
  18. [Define if mbstate_t is an object type.])
  19. fi])