Build process chash when btyacc parse file was created in windows with end of line mark as \r\n#8887
Build process chash when btyacc parse file was created in windows with end of line mark as \r\n#8887Khalyutin wants to merge 2 commits intoFirebirdSQL:masterfrom
Conversation
Khalyutin
commented
Feb 8, 2026
…ed delete windows end of line mark as \r\n (CR + LF) Otherwise, the file will not be found. more info: ChrisDodd/btyacc#32
|
Such problems are usually solved by |
Yes, of course. But we tried to eliminate the root cause of the problem so that others wouldn't have to waste resources trying to localize it in the future. :) |
|
Will you also fix |
source code of ms command interpreter not include in FirebirdSQL/firebird/extern/ |
|
Why not pickup commit from original source tree ? |
the source tree is very different from the version of btyacc in extern/btyacc/ start from "read_from_file()" in original insted of "fopen()" in extern/btyacc/ Adding read_from_file() may require further changes, up to replacing the entire library :(. As a result, fixing a known compilation error can addition unknown parsing errors... I think the risk of taking a significant block of code from the btyacc original source is unjustified. |
| } | ||
| inc_file_name[ii] = 0; | ||
|
|
||
| char *inc_file_name = line+9; |
There was a problem hiding this comment.
inc_file_name is already declared as global variable at line 26 above.
It is used later in other functions.
This change break it, AFAIU
There was a problem hiding this comment.
Yes, you're right, the consequences of breaking a global variable "inc_file_name", are unpredictable.
The PR to the btyacc original source tree was intended to clarify the initial understanding regarding the handling of "\r\n" characters.
However, an attempt to integrate the original code from the btyacc source was failed...
My original idea was to handle only "\r\n" EndOfLine characters without touching anything else:
-- for(i=9; line[i]!='\n' && line[i]!=' '; i++, ii++) {
++ for(i=9; line[i]!='\n' && line[i]!=' ' && !(line[i] =='\r' && line[i+1]=='\n'); i++, ii++) {
Is this acceptable?