summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1997-08-27 20:30:54 +0000
committerPaul Smith <psmith@gnu.org>1997-08-27 20:30:54 +0000
commitbe3fb0ae6d6870dbc1b4d03447afcf3b0fed3114 (patch)
treef27c2e1c6f3e1f7cc747cad0452734c4c917b208 /read.c
parentdd0c939e781596fec17f8c72cbe6e3559e703fd8 (diff)
downloadgunmake-be3fb0ae6d6870dbc1b4d03447afcf3b0fed3114.tar.gz
Updates for GNU make 3.75.92.
Diffstat (limited to 'read.c')
-rw-r--r--read.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/read.c b/read.c
index 1a0fae8..bf7f80c 100644
--- a/read.c
+++ b/read.c
@@ -1,5 +1,5 @@
/* Reading and parsing of makefiles for GNU Make.
-Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc.
+Copyright (C) 1988,89,90,91,92,93,94,95,96,97 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify
@@ -907,13 +907,17 @@ do_define (name, namelen, origin, lineno, infile, filename)
initbuffer (&lb);
while (!feof (infile))
{
+ unsigned int len;
+
lineno += nlines;
nlines = readline (&lb, infile, filename, lineno);
collapse_continuations (lb.buffer);
p = next_token (lb.buffer);
- if ((p[5] == '\0' || isblank (p[5])) && !strncmp (p, "endef", 5))
+ len = strlen (p);
+ if ((len == 5 || (len > 5 && isblank (p[5])))
+ && !strncmp (p, "endef", 5))
{
p += 5;
remove_comments (p);
@@ -932,8 +936,7 @@ do_define (name, namelen, origin, lineno, infile, filename)
}
else
{
- unsigned int len = strlen (lb.buffer);
-
+ len = strlen (lb.buffer);
/* Increase the buffer size if necessary. */
if (idx + len + 1 > length)
{