Bruce Momjian <pgman@candle.pha.pa.us> writes:
> *** src/interfaces/ecpg/preproc/pgc.l 2001/01/24 19:43:29 1.73
> --- src/interfaces/ecpg/preproc/pgc.l 2001/02/02 18:13:17
> ***************
> *** 35,40 ****
> --- 35,45 ----
> #undef yywrap
> #endif /* yywrap */
> + #ifdef __QNX__
> + /* For some reason, QNX needs this, 2001-02-02 */
> + #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
> + #endif
> +
> #define YY_NO_UNPUT
> extern YYSTYPE yylval;
I do not believe this patch is correct or necessary. What is it trying
to fix, and if there's a problem here then why is there not a problem in
every other one of our flex outputs?
If there is a real problem --- presumably of the form "some QNX header
file pollutes the namespace with a definition of ECHO" --- then a more
appropriate fix would be
+ #ifdef __QNX__
+ /* Get rid of conflicting definition of ECHO from QNX's <something.h> */
+ #undef ECHO
+ #endif
so as not to tie ourselves to the exact definition of ECHO that flex is
currently using. However, I would first like to know where the conflict
is and why it doesn't break every other flex output in existence.
regards, tom lane