Fix pcre2grep compile with -std=c99.
This commit is contained in:
parent
1b389f5144
commit
11cd3714d3
@ -126,6 +126,9 @@ buffer overflow at compile time. This bug was discovered by the LLVM fuzzer.
|
||||
31. Fix -fsanitize=undefined warnings for left shifts of 1 by 31 (it treats 1
|
||||
as an int; fixed by writing it as 1u).
|
||||
|
||||
32. Fix pcre2grep compile when -std=c99 is used with gcc, though it still gives
|
||||
a warning for "fileno" unless -std=gnu99 us used.
|
||||
|
||||
|
||||
Version 10.10 06-March-2015
|
||||
---------------------------
|
||||
|
@ -581,7 +581,7 @@ isdirectory(char *filename)
|
||||
struct stat statbuf;
|
||||
if (stat(filename, &statbuf) < 0)
|
||||
return 0; /* In the expectation that opening as a file will fail */
|
||||
return (statbuf.st_mode & S_IFMT) == S_IFDIR;
|
||||
return S_ISDIR(statbuf.st_mode);
|
||||
}
|
||||
|
||||
static directory_type *
|
||||
@ -618,7 +618,7 @@ isregfile(char *filename)
|
||||
struct stat statbuf;
|
||||
if (stat(filename, &statbuf) < 0)
|
||||
return 1; /* In the expectation that opening as a file will fail */
|
||||
return (statbuf.st_mode & S_IFMT) == S_IFREG;
|
||||
return S_ISREG(statbuf.st_mode);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user