From: Manoel Trapier Date: Tue, 19 Mar 2013 09:55:03 +0000 (+0100) Subject: As suspected clang/Linux have it's own sort of warns ^^ X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e3b4856beb8f989b04634881a99888d9ba9b62c0;p=ack.git As suspected clang/Linux have it's own sort of warns ^^ --- diff --git a/util/cgg/bootlex.l b/util/cgg/bootlex.l index ec796a578..261467664 100644 --- a/util/cgg/bootlex.l +++ b/util/cgg/bootlex.l @@ -18,6 +18,9 @@ #include "booth.h" #include "y.tab.h" +/* fileno is not C89 and can be missing sometimes. */ +int fileno(FILE *stream); + int lineno = 1; extern char *iname; %} diff --git a/util/cgg/main.c b/util/cgg/main.c index 186bbc966..fe80edd27 100644 --- a/util/cgg/main.c +++ b/util/cgg/main.c @@ -24,6 +24,8 @@ void outbyte(int n); void patbyte(int n); void hashpatterns(); +#define IsAscii(_c) (((_c) & ~0x7f) == 0) + char * myalloc(int n) { register char *p; @@ -604,7 +606,7 @@ void finishio() fprintf(cfile,"\t\""); while (*p) { register int c = (*p) & BMASK; - if (! isascii(c) || iscntrl(c)) { + if (! IsAscii(c) || iscntrl(c)) { /* The next line used to have (c>>6)&03, but this triggered a bug in GCC 2.4.5 on SPARC.