diff --git a/include/asm/lexer.hpp b/include/asm/lexer.hpp index f0f4b8c5..2dbc6e38 100644 --- a/include/asm/lexer.hpp +++ b/include/asm/lexer.hpp @@ -7,13 +7,14 @@ #include #include #include +#include // BUFSIZ #include #include #include #include "platform.hpp" // SSIZE_MAX -#define LEXER_BUF_SIZE 128 +#define LEXER_BUF_SIZE BUFSIZ // The buffer needs to be large enough for the maximum `lexerState->peek()` lookahead distance static_assert(LEXER_BUF_SIZE > 1, "Lexer buffer size is too small"); // This caps the size of buffer reads, and according to POSIX, passing more than SSIZE_MAX is UB diff --git a/src/asm/lexer.cpp b/src/asm/lexer.cpp index 3ca0728c..947e76e0 100644 --- a/src/asm/lexer.cpp +++ b/src/asm/lexer.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include