From: Paul Eggert Date: Fri, 23 Sep 2005 20:23:59 +0000 (+0000) Subject: (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux X-Git-Tag: v5.90~118 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=588034d1015147066e3ca45506eda4c9b5ef976d;p=thirdparty%2Fcoreutils.git (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux bug reported by Jim Meyering. --- diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4 index bca15add15..863265151b 100644 --- a/m4/fnmatch.m4 +++ b/m4/fnmatch.m4 @@ -27,9 +27,15 @@ AC_DEFUN([_AC_FUNC_FNMATCH_IF], # include # define y(a, b, c) (fnmatch (a, b, c) == 0) # define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH) + static int + fnm (char const *pattern, char const *string, int flags) + { + return fnmatch (pattern, string, flags); + } ], [exit - (!(y ("a*", "abc", 0) + (!((fnm ? fnm : fnmatch) ("a*", "", 0) == FNM_NOMATCH + && y ("a*", "abc", 0) && n ("d*/*1", "d/s/1", FNM_PATHNAME) && y ("a\\\\bc", "abc", 0) && n ("a\\\\bc", "abc", FNM_NOESCAPE)