summaryrefslogtreecommitdiff
path: root/src/file.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2020-01-03 18:19:33 -0500
committerPaul Smith <psmith@gnu.org>2020-01-04 13:23:23 -0500
commitb774aebffadd5f8374ff435b4c5d660ee899add7 (patch)
treec57832e89a23bedd0c791646d424e0a5cb513e7e /src/file.c
parent06de697268492b72297b02ef69f68becc1874b54 (diff)
downloadmake-git-b774aebffadd5f8374ff435b4c5d660ee899add7.tar.gz
Enable compilation with C90 compilers
* configure.ac: Try compiling Guile headers: they don't work with C90. * maintMakefile: Simplify config checks via target-specific variables. * src/makeint.h: Use ATTRIBUTE rather than defining __attribute__, as that causes compile issues with system headers. (ENUM_BITFIELD): Don't use enum bitfields in ANSI mode. * src/main.c: Use ATTRIBUTE instead of __attribute__. * src/job.h: Ditto. * src/file.c: Don't define variables inside for loops. * src/rule.c: Ditto. * src/dep.h (SI): Only use static inline in non-ANSI mode.
Diffstat (limited to 'src/file.c')
-rw-r--r--src/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/file.c b/src/file.c
index 2f1425e6..a979ca55 100644
--- a/src/file.c
+++ b/src/file.c
@@ -640,9 +640,10 @@ expand_deps (struct file *f)
struct dep *
expand_extra_prereqs (const struct variable *extra)
{
+ struct dep *d;
struct dep *prereqs = extra ? split_prereqs (variable_expand (extra->value)) : NULL;
- for (struct dep *d = prereqs; d; d = d->next)
+ for (d = prereqs; d; d = d->next)
{
d->file = lookup_file (d->name);
if (!d->file)