From ad148c4154b7fccbfc28a19769d36c91090aee3b Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 15 Oct 2005 20:37:36 +0000 Subject: [PATCH] Suppress warnings on platforms where fprintf is a macro (eg, recent Fedora). This was already done by somebody for the core flex files, but these contrib files seem to have been missed. --- contrib/cube/cubescan.l | 1 + contrib/seg/segscan.l | 1 + contrib/tsearch2/wordparser/parser.l | 1 + 3 files changed, 3 insertions(+) diff --git a/contrib/cube/cubescan.l b/contrib/cube/cubescan.l index 289d23120d..9d2b4ae18c 100644 --- a/contrib/cube/cubescan.l +++ b/contrib/cube/cubescan.l @@ -9,6 +9,7 @@ #define YY_READ_BUF_SIZE 16777216 /* Avoid exit() on fatal scanner errors (a bit ugly -- see yy_fatal_error) */ +#undef fprintf #define fprintf(file, fmt, msg) ereport(ERROR, (errmsg_internal("%s", msg))) /* Handles to the buffer that the lexer uses internally */ diff --git a/contrib/seg/segscan.l b/contrib/seg/segscan.l index 24ad662910..817300993d 100644 --- a/contrib/seg/segscan.l +++ b/contrib/seg/segscan.l @@ -9,6 +9,7 @@ #define YY_READ_BUF_SIZE 16777216 /* Avoid exit() on fatal scanner errors (a bit ugly -- see yy_fatal_error) */ +#undef fprintf #define fprintf(file, fmt, msg) ereport(ERROR, (errmsg_internal("%s", msg))) /* Handles to the buffer that the lexer uses internally */ diff --git a/contrib/tsearch2/wordparser/parser.l b/contrib/tsearch2/wordparser/parser.l index 179c99c9da..a7cb4684c3 100644 --- a/contrib/tsearch2/wordparser/parser.l +++ b/contrib/tsearch2/wordparser/parser.l @@ -6,6 +6,7 @@ #include "common.h" /* Avoid exit() on fatal scanner errors */ +#undef fprintf #define fprintf(file, fmt, msg) ts_error(ERROR, fmt, msg) char *token = NULL; /* pointer to token */