Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): rename parameter in meta_needed and me...



details:   https://anonhg.NetBSD.org/src/rev/e202cd040251
branches:  trunk
changeset: 946448:e202cd040251
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Nov 28 10:28:53 2020 +0000

description:
make(1): rename parameter in meta_needed and meta_create

It conflicts with the global variable in dir.c when make is built in
all-in-one mode.

diffstat:

 usr.bin/make/meta.c |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (61 lines):

diff -r 0f4ba69dff5b -r e202cd040251 usr.bin/make/meta.c
--- a/usr.bin/make/meta.c       Sat Nov 28 10:25:45 2020 +0000
+++ b/usr.bin/make/meta.c       Sat Nov 28 10:28:53 2020 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: meta.c,v 1.151 2020/11/28 10:25:45 rillig Exp $ */
+/*      $NetBSD: meta.c,v 1.152 2020/11/28 10:28:53 rillig Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -412,7 +412,7 @@
  */
 static Boolean
 meta_needed(GNode *gn, const char *dname, const char *tname,
-            char *objdir, Boolean verbose)
+           char *objdir_realpath, Boolean verbose)
 {
     struct cached_stat cst;
 
@@ -452,8 +452,8 @@
     }
 
     /* make sure these are canonical */
-    if (cached_realpath(dname, objdir))
-       dname = objdir;
+    if (cached_realpath(dname, objdir_realpath))
+       dname = objdir_realpath;
 
     /* If we aren't in the object directory, don't create a meta file. */
     if (!metaCurdirOk && strcmp(curdir, dname) == 0) {
@@ -471,7 +471,7 @@
 {
     FILE *fp;
     char buf[MAXPATHLEN];
-    char objdir[MAXPATHLEN];
+    char objdir_realpath[MAXPATHLEN];
     char **ptr;
     const char *dname;
     const char *tname;
@@ -484,10 +484,10 @@
     dname = Var_Value(".OBJDIR", gn, &dname_freeIt);
     tname = GNode_VarTarget(gn);
 
-    /* if this succeeds objdir is realpath of dname */
-    if (!meta_needed(gn, dname, tname, objdir, TRUE))
+    /* if this succeeds objdir_realpath is realpath of dname */
+    if (!meta_needed(gn, dname, tname, objdir_realpath, TRUE))
        goto out;
-    dname = objdir;
+    dname = objdir_realpath;
 
     if (metaVerbose) {
        char *mp;
@@ -513,7 +513,7 @@
        goto out;
 
     fname = meta_name(pbm->meta_fname, sizeof pbm->meta_fname,
-                     dname, tname, objdir);
+                     dname, tname, objdir_realpath);
 
 #ifdef DEBUG_META_MODE
     DEBUG1(META, "meta_create: %s\n", fname);



Home | Main Index | Thread Index | Old Index