diff options
author | Ron Yorston <rmy@pobox.com> | 2024-10-18 09:00:43 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-10-18 09:00:43 +0100 |
commit | 3a68dc015948a7e5eb3f28ca07d9f0b1bace0410 (patch) | |
tree | d04ef64a44ea4b8e942c6f6d59325f693ccc7cf0 | |
parent | 030d8f8ea9d4c2a896efad2b327a3308f7fd8c1b (diff) | |
download | busybox-w32-3a68dc015948a7e5eb3f28ca07d9f0b1bace0410.tar.gz busybox-w32-3a68dc015948a7e5eb3f28ca07d9f0b1bace0410.tar.bz2 busybox-w32-3a68dc015948a7e5eb3f28ca07d9f0b1bace0410.zip |
make: relax definition of comment line
According to POSIX:
Blank lines, empty lines, and lines with <number-sign> ('#')
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.
-rw-r--r-- | miscutils/make.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
1770 | while (isblank(*p)) | 1770 | while (isblank(*p)) |
1771 | p++; | 1771 | p++; |
1772 | 1772 | ||
1773 | if (*p != '\n' && *str != '#') | 1773 | if (*p != '\n' && (posix ? *str != '#' : *p != '#')) |
1774 | return str; | 1774 | return str; |
1775 | } | 1775 | } |
1776 | 1776 | ||