On Thu, Sep 19, 2013 at 02:30:08PM +0200, Joris Giovannangeli wrote:

> The file usr.bin/bc/scan.l includes <termios.h>. This header file
> defines a macro named ECHO.
> But lex generates code which also defines a macro named ECHO. For some
> reason, lex only defines ECHO if ECHO is not already defined.
> 
> bc(1) builds fine, but the ECHO macro used in lexer code is the one from
> <termios.h>, which is wrong.
> 
> Moving #include <termios.h>  below the lex code, after an #undef ECHO
> fix the issue, but it might be better to move the gettty/settty/tspcons
> functions in a separated file.
> 
> Also, while you are here, there is no forward declaration of struct
> termios in file "extern.h", modern gcc are not happy with that.
> 
> best regards,
> joris

Thanks for the report. The bug has little impact, because the lex
rules catch any character, so the default ECHO rule is never reached.
But'll I'll fix it anwyay.

        -Otto

Reply via email to