Re: 7.1 beta 3 CHANGES FOR QNX - Mailing list pgsql-hackers

From Tom Lane
Subject Re: 7.1 beta 3 CHANGES FOR QNX
Date
Msg-id 2792.981233373@sss.pgh.pa.us
Whole thread Raw
In response to Re: 7.1 beta 3 CHANGES FOR QNX  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: ERROR: "Database 'products', OID nnn, has disappeared from pg_database"
Next
From: m w
Date:
Subject: Re: Like vs '=' bug with indexing