|
Re: Bug in coreutils-4.5.9 "df" under AIX 5.1 -- found and fixed: msg#00068gnu.core-utils.bugs
Mike Jetzer <mjetzer@xxxxxxxxxxxxxxxxxxx> wrote: ... > When compiling under HP-UX B.11.11 (using the ANSI c > compiler -- I can't determine its version using "-v" or > "-V"; the exact command line is "cc -Aa +DAportable > -D_HPUX_SOURCE", which is what we typically use for GNU > packages), the following error is returned > cc: "exclude.c", line 177: error 1552: Incompatible > types in second and third operands of conditional > expression (?:). > > This appears to be because the fnmatch() prototype in > libfnmatch.h is getting its __const keywords replaced with > the empty string, and thus does not match > fnmatch_no_wildcards() (even if __const were replaced with > "const", I don't know if the compiler would have complained > because fnmatch() takes two "const char *" arguments, while > fnmatch_no_wildcards() takes two "char const *". To get > around this, I simply removed the "const" qualifiers from > fnmatch_no_wildcards(). Thanks for the detailed report! Here's one way to work around the HP-UX problem: Index: exclude.c =================================================================== RCS file: /fetish/cu/lib/exclude.c,v retrieving revision 1.11 diff -u -p -u -p -r1.11 exclude.c --- exclude.c 6 Jan 2003 13:17:48 -0000 1.11 +++ exclude.c 18 Mar 2003 14:58:26 -0000 @@ -173,9 +173,11 @@ excluded_filename (struct exclude const int options = exclude[i].options; if (excluded == !! (options & EXCLUDE_INCLUDE)) { - int (*matcher) PARAMS ((char const *, char const *, int)) = + typedef int (*fnmatch_t) + PARAMS ((char const *, char const *, int)); + fnmatch_t matcher = (options & EXCLUDE_WILDCARDS - ? fnmatch + ? (fnmatch_t) fnmatch : fnmatch_no_wildcards); bool matched = ((*matcher) (pattern, f, options) == 0); char const *p; |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Bug in coreutils-4.5.9 "df" under AIX 5.1 -- found and fixed: 00068, Mike Jetzer |
|---|---|
| Next by Date: | Re: Bug in coreutils-4.5.9 "df" under AIX 5.1 -- found and fixed: 00068, Bob Proulx |
| Previous by Thread: | Bug in coreutils-4.5.9 "df" under AIX 5.1 -- found and fixedi: 00068, Mike Jetzer |
| Next by Thread: | Re: Bug in coreutils-4.5.9 "df" under AIX 5.1 -- found and fixed: 00068, Bob Proulx |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |