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
commit8631838ac02b6c20d1628ebe026cfb7d5a1d7fe1 (patch)
treef27c2e1c6f3e1f7cc747cad0452734c4c917b208 /read.c
parent78037718635d4055341217e9c4d0291b33604314 (diff)
downloadmake-8631838ac02b6c20d1628ebe026cfb7d5a1d7fe1.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 1a0fae89..bf7f80ce 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)
{