X-Git-Url: https://git.cworth.org/git?p=tar;a=blobdiff_plain;f=m4%2Fwchar.m4;h=5c923fa0e03e32d6d3fe1ac0f3aefb4396c459e8;hp=70b1248f8fcfce58a93260c6cfb8ea7bf93ded61;hb=cf7169a2ede9bb08b71de68fe0c8bbecf827abe6;hpb=138fc7e67e3d9845cd7d81aad0e9c7724784f9b9 diff --git a/m4/wchar.m4 b/m4/wchar.m4 index 70b1248..5c923fa 100644 --- a/m4/wchar.m4 +++ b/m4/wchar.m4 @@ -1,13 +1,13 @@ dnl A placeholder for ISO C99 , for platforms that have issues. -dnl Copyright (C) 2007 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2008 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 4 +# wchar.m4 serial 6 AC_DEFUN([gl_WCHAR_H], [ @@ -18,7 +18,16 @@ AC_DEFUN([gl_WCHAR_H], wchar_t w;]], [gl_cv_header_wchar_h_standalone=yes], [gl_cv_header_wchar_h_standalone=no])]) - if test $gl_cv_header_wchar_h_standalone != yes; then + + 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]) + + if test $gl_cv_header_wchar_h_standalone != yes || test $gt_cv_c_wint_t != yes; then WCHAR_H=wchar.h fi @@ -36,6 +45,13 @@ wchar_t w;]], gl_CHECK_NEXT_HEADERS([wchar.h]) ]) +dnl Unconditionally enables the replacement of . +AC_DEFUN([gl_REPLACE_WCHAR_H], +[ + AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + WCHAR_H=wchar.h +]) + AC_DEFUN([gl_WCHAR_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. @@ -49,6 +65,5 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS], dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH]) - WCHAR_H= - AC_SUBST([WCHAR_H]) + WCHAR_H=''; AC_SUBST([WCHAR_H]) ])