From f0f2f92389ade8a089e06503fae03c56beda85c1 Mon Sep 17 00:00:00 2001 From: rpaulo Date: Sat, 18 Jun 2005 14:32:04 +0000 Subject: [PATCH] PR standards/17732: make doesn't honour escaped comment lines. Now with a real fix. Ok'ed by sjg and hubertf. --- usr.bin/make/parse.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index b33fe0b916b6..d7f670685a9f 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.101 2005/06/16 14:54:10 rpaulo Exp $ */ +/* $NetBSD: parse.c,v 1.102 2005/06/18 14:32:04 rpaulo Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: parse.c,v 1.101 2005/06/16 14:54:10 rpaulo Exp $"; +static char rcsid[] = "$NetBSD: parse.c,v 1.102 2005/06/18 14:32:04 rpaulo Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: parse.c,v 1.101 2005/06/16 14:54:10 rpaulo Exp $"); +__RCSID("$NetBSD: parse.c,v 1.102 2005/06/18 14:32:04 rpaulo Exp $"); #endif #endif /* not lint */ #endif @@ -2552,6 +2552,13 @@ test_char: */ do { c = ParseReadc(); + /* + * If we found a backslash not escaped + * itself it means that the comment is + * going to continue in the next line. + */ + if (c == '\\') + ParseReadc(); } while ((c != '\n') && (c != EOF)); goto line_read; } else {