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: replace __func__ with actual strings



details:   https://anonhg.NetBSD.org/src/rev/89ca03a61bc0
branches:  trunk
changeset: 1029210:89ca03a61bc0
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Dec 27 19:06:07 2021 +0000

description:
make: replace __func__ with actual strings

Make is supposed to be C90-compatible, and __func__ is from C99.

No functional change.

diffstat:

 usr.bin/make/hash.c  |  14 +++++++-------
 usr.bin/make/parse.c |  22 ++++++++++++----------
 2 files changed, 19 insertions(+), 17 deletions(-)

diffs (120 lines):

diff -r 0f98b5c0573e -r 89ca03a61bc0 usr.bin/make/hash.c
--- a/usr.bin/make/hash.c       Mon Dec 27 18:54:19 2021 +0000
+++ b/usr.bin/make/hash.c       Mon Dec 27 19:06:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hash.c,v 1.68 2021/12/15 12:24:13 rillig Exp $ */
+/*     $NetBSD: hash.c,v 1.69 2021/12/27 19:06:07 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -74,7 +74,7 @@
 #include "make.h"
 
 /*     "@(#)hash.c     8.1 (Berkeley) 6/6/93"  */
-MAKE_RCSID("$NetBSD: hash.c,v 1.68 2021/12/15 12:24:13 rillig Exp $");
+MAKE_RCSID("$NetBSD: hash.c,v 1.69 2021/12/27 19:06:07 rillig Exp $");
 
 /*
  * The ratio of # entries to # buckets at which we rebuild the table to
@@ -118,7 +118,7 @@
        unsigned int chainlen = 0;
 
 #ifdef DEBUG_HASH_LOOKUP
-       DEBUG4(HASH, "%s: %p h=%08x key=%s\n", __func__, t, h, key);
+       DEBUG3(HASH, "HashTable_Find: %p h=%08x key=%s\n", t, h, key);
 #endif
 
        for (e = t->buckets[h & t->bucketsMask]; e != NULL; e = e->next) {
@@ -152,8 +152,8 @@
        unsigned int chainlen = 0;
 
 #ifdef DEBUG_HASH_LOOKUP
-       DEBUG5(HASH, "%s: %p h=%08x key=%.*s\n", __func__, t, h,
-           (int)Substring_Length(key), key.start);
+       DEBUG4(HASH, "HashTable_FindEntryBySubstring: %p h=%08x key=%.*s\n",
+           t, h, (int)Substring_Length(key), key.start);
 #endif
 
        for (e = t->buckets[h & t->bucketsMask]; e != NULL; e = e->next) {
@@ -268,8 +268,8 @@
        t->bucketsSize = newSize;
        t->bucketsMask = newMask;
        t->buckets = newBuckets;
-       DEBUG5(HASH, "%s: %p size=%d entries=%d maxchain=%d\n",
-           __func__, (void *)t, t->bucketsSize, t->numEntries, t->maxchain);
+       DEBUG4(HASH, "HashTable_Enlarge: %p size=%d entries=%d maxchain=%d\n",
+           (void *)t, t->bucketsSize, t->numEntries, t->maxchain);
        t->maxchain = 0;
 }
 
diff -r 0f98b5c0573e -r 89ca03a61bc0 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Mon Dec 27 18:54:19 2021 +0000
+++ b/usr.bin/make/parse.c      Mon Dec 27 19:06:07 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.585 2021/12/27 18:54:19 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.586 2021/12/27 19:06:07 rillig Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "pathnames.h"
 
 /*     "@(#)parse.c    8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.585 2021/12/27 18:54:19 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.586 2021/12/27 19:06:07 rillig Exp $");
 
 /* types and constants */
 
@@ -726,8 +726,8 @@
                Lst_Append(&cgn->parents, pgn);
 
        if (DEBUG(PARSE)) {
-               debug_printf("# %s: added child %s - %s\n",
-                   __func__, pgn->name, cgn->name);
+               debug_printf("# LinkSource: added child %s - %s\n",
+                   pgn->name, cgn->name);
                Targ_PrintNode(pgn, 0);
                Targ_PrintNode(cgn, 0);
        }
@@ -900,8 +900,10 @@
                Lst_Append(&order_pred->order_succ, gn);
                Lst_Append(&gn->order_pred, order_pred);
                if (DEBUG(PARSE)) {
-                       debug_printf("# %s: added Order dependency %s - %s\n",
-                           __func__, order_pred->name, gn->name);
+                       debug_printf(
+                           "# ParseDependencySourceOrder: "
+                           "added Order dependency %s - %s\n",
+                           order_pred->name, gn->name);
                        Targ_PrintNode(order_pred, 0);
                        Targ_PrintNode(gn, 0);
                }
@@ -2259,8 +2261,8 @@
        Global_Set(dirvar, dirname.str);
        Global_Set(filevar, basename);
 
-       DEBUG5(PARSE, "%s: ${%s} = `%s' ${%s} = `%s'\n",
-           __func__, dirvar, dirname.str, filevar, basename);
+       DEBUG4(PARSE, "SetFilenameVars: ${%s} = `%s' ${%s} = `%s'\n",
+           dirvar, dirname.str, filevar, basename);
        FStr_Done(&dirname);
 }
 
@@ -2458,7 +2460,7 @@
        char *file = line + (silent ? 8 : 7);
        char *all_files;
 
-       DEBUG2(PARSE, "%s: %s\n", __func__, file);
+       DEBUG1(PARSE, "ParseTraditionalInclude: %s\n", file);
 
        pp_skip_whitespace(&file);
 
@@ -2490,7 +2492,7 @@
        char *variable = line + 6;
        char *value;
 
-       DEBUG2(PARSE, "%s: %s\n", __func__, variable);
+       DEBUG1(PARSE, "ParseGmakeExport: %s\n", variable);
 
        pp_skip_whitespace(&variable);
 



Home | Main Index | Thread Index | Old Index