From 3a68dc015948a7e5eb3f28ca07d9f0b1bace0410 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Fri, 18 Oct 2024 09:00:43 +0100 Subject: make: relax definition of comment line According to POSIX: Blank lines, empty lines, and lines with ('#') as the first character on the line are also known as comment lines. Most implementations also include lines where the first non-blank character is '#'. Allow this as an extension. Adds 0-16 bytes. --- miscutils/make.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miscutils/make.c b/miscutils/make.c index 4a8643a83..7336afdf3 100644 --- a/miscutils/make.c +++ b/miscutils/make.c @@ -1770,7 +1770,7 @@ readline(FILE *fd, int want_command) while (isblank(*p)) p++; - if (*p != '\n' && *str != '#') + if (*p != '\n' && (posix ? *str != '#' : *p != '#')) return str; } -- cgit v1.2.3-55-g6feb