Module Name: src Committed By: rillig Date: Mon Dec 27 19:06:07 UTC 2021
Modified Files: src/usr.bin/make: hash.c parse.c Log Message: make: replace __func__ with actual strings Make is supposed to be C90-compatible, and __func__ is from C99. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/usr.bin/make/hash.c cvs rdiff -u -r1.585 -r1.586 src/usr.bin/make/parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/hash.c diff -u src/usr.bin/make/hash.c:1.68 src/usr.bin/make/hash.c:1.69 --- src/usr.bin/make/hash.c:1.68 Wed Dec 15 12:24:13 2021 +++ src/usr.bin/make/hash.c Mon Dec 27 19:06:07 2021 @@ -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 @@ HashTable_Find(HashTable *t, unsigned in 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 @@ HashTable_FindEntryBySubstring(HashTable 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 @@ HashTable_Enlarge(HashTable *t) 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; } Index: src/usr.bin/make/parse.c diff -u src/usr.bin/make/parse.c:1.585 src/usr.bin/make/parse.c:1.586 --- src/usr.bin/make/parse.c:1.585 Mon Dec 27 18:54:19 2021 +++ src/usr.bin/make/parse.c Mon Dec 27 19:06:07 2021 @@ -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 @@ LinkSource(GNode *pgn, GNode *cgn, bool 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 @@ ParseDependencySourceOrder(const char *s 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 @@ SetFilenameVars(const char *filename, co 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 @@ ParseTraditionalInclude(char *line) 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 @@ ParseGmakeExport(char *line) char *variable = line + 6; char *value; - DEBUG2(PARSE, "%s: %s\n", __func__, variable); + DEBUG1(PARSE, "ParseGmakeExport: %s\n", variable); pp_skip_whitespace(&variable);