Skip to content

Commit 068e2ac

Browse files
committed
fix(Data/SQLParser): restore Windows unistd guard in flex_lexer.cpp too #5377
e23f9a1 patched the same guard in flex_lexer.h but missed the matching include in flex_lexer.cpp:3184, which also fails to compile on clang-cl Windows. Apply the identical conditional in the .cpp. Same caveat as before: lives in the generated file, must be re-applied after every flex regen.
1 parent e23f9a1 commit 068e2ac

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Data/SQLParser/src/parser/flex_lexer.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3181,8 +3181,17 @@ static thread_local std::stringstream strbuf;
31813181
* down here because we want the user's section 1 to have been scanned first.
31823182
* The user has a chance to override it with an option.
31833183
*/
3184+
/* POCO-LOCAL: io.h provides the POSIX-ish I/O declarations flex's runtime
3185+
* uses (read/write/isatty/close) on MSVC; unistd.h does not exist there.
3186+
* Re-apply this conditional after every flex regen - it lives in the
3187+
* generated file, not in flex_lexer.l.
3188+
*/
3189+
#if defined(_WIN32) || defined(_WIN64)
3190+
#include <io.h>
3191+
#else
31843192
#include <unistd.h>
31853193
#endif
3194+
#endif
31863195

31873196
#ifndef YY_EXTRA_TYPE
31883197
#define YY_EXTRA_TYPE void *

0 commit comments

Comments
 (0)