X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fwchar.m4;h=e81485d01ea6535bbe0d040d7092c30662dba472;hb=b7b6d3d99a751f99638ed8e14b62c1cf697f0664;hp=ad3bebd769625fe61997e550a684b0e02040fda8;hpb=1e22851b28319cebdfd9cf3e6975d170210b5d65;p=gnulib.git diff --git a/m4/wchar.m4 b/m4/wchar.m4 index ad3bebd76..e81485d01 100644 --- a/m4/wchar.m4 +++ b/m4/wchar.m4 @@ -1,46 +1,51 @@ dnl A placeholder for ISO C99 , for platforms that have issues. -dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. +dnl Copyright (C) 2007-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, dnl with or without modifications, as long as this notice is preserved. dnl Written by Eric Blake. -# wchar.m4 serial 28 +# wchar.m4 serial 31 AC_DEFUN([gl_WCHAR_H], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) - AC_CACHE_CHECK([whether is standalone], - [gl_cv_header_wchar_h_standalone], - [AC_COMPILE_IFELSE([[#include -wchar_t w;]], - [gl_cv_header_wchar_h_standalone=yes], - [gl_cv_header_wchar_h_standalone=no])]) - - AC_REQUIRE([gt_TYPE_WINT_T]) - if test $gt_cv_c_wint_t = yes; then - HAVE_WINT_T=1 - else - HAVE_WINT_T=0 - fi - AC_SUBST([HAVE_WINT_T]) - dnl Prepare for creating substitute . - dnl Do it always: WCHAR_H may be empty here but can be set later. dnl Check for (missing in Linux uClibc when built without wide dnl character support). + dnl is always overridden, because of GNULIB_POSIXCHECK. AC_CHECK_HEADERS_ONCE([wchar.h]) + gl_CHECK_NEXT_HEADERS([wchar.h]) if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi AC_SUBST([HAVE_WCHAR_H]) - dnl is always overridden, because of GNULIB_POSIXCHECK. - gl_CHECK_NEXT_HEADERS([wchar.h]) + + AC_REQUIRE([gt_TYPE_WINT_T]) + if test $gt_cv_c_wint_t = yes; then + HAVE_WINT_T=1 + else + HAVE_WINT_T=0 + fi + AC_SUBST([HAVE_WINT_T]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[ +/* Some systems require additional headers. */ +#ifndef __GLIBC__ +# include +# include +# include +#endif +#include + ]], [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb + wcsrtombs wcsnrtombs wcwidth]) ]) dnl Check whether is usable at all.