Module Name: src
Committed By: rillig
Date: Sat Sep 12 15:15:51 UTC 2020
Modified Files:
src/usr.bin/make: main.c nonints.h suff.c
Log Message:
make(1): move PrintAddr to where it belongs
To generate a diff of this commit:
cvs rdiff -u -r1.332 -r1.333 src/usr.bin/make/main.c
cvs rdiff -u -r1.109 -r1.110 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.148 -r1.149 src/usr.bin/make/suff.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/main.c
diff -u src/usr.bin/make/main.c:1.332 src/usr.bin/make/main.c:1.333
--- src/usr.bin/make/main.c:1.332 Fri Sep 11 17:32:36 2020
+++ src/usr.bin/make/main.c Sat Sep 12 15:15:51 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.332 2020/09/11 17:32:36 rillig Exp $ */
+/* $NetBSD: main.c,v 1.333 2020/09/12 15:15:51 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.332 2020/09/11 17:32:36 rillig Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.333 2020/09/12 15:15:51 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
@@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: main.c,v 1.332 2020/09/11 17:32:36 rillig Exp $");
+__RCSID("$NetBSD: main.c,v 1.333 2020/09/12 15:15:51 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -1968,13 +1968,6 @@ cached_realpath(const char *pathname, ch
return rp ? resolved : NULL;
}
-int
-PrintAddr(void *a, void *b)
-{
- printf("%lx ", (unsigned long) a);
- return b ? 0 : 0;
-}
-
static int
addErrorCMD(void *cmdp, void *gnp)
Index: src/usr.bin/make/nonints.h
diff -u src/usr.bin/make/nonints.h:1.109 src/usr.bin/make/nonints.h:1.110
--- src/usr.bin/make/nonints.h:1.109 Sat Sep 12 15:10:55 2020
+++ src/usr.bin/make/nonints.h Sat Sep 12 15:15:51 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: nonints.h,v 1.109 2020/09/12 15:10:55 rillig Exp $ */
+/* $NetBSD: nonints.h,v 1.110 2020/09/12 15:15:51 rillig Exp $ */
/*-
* Copyright (c) 1988, 1989, 1990, 1993
@@ -113,7 +113,6 @@ void Error(const char *, ...) MAKE_ATTR_
void Fatal(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2) MAKE_ATTR_DEAD;
void Punt(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2) MAKE_ATTR_DEAD;
void DieHorribly(void) MAKE_ATTR_DEAD;
-int PrintAddr(void *, void *);
void Finish(int) MAKE_ATTR_DEAD;
int eunlink(const char *);
void execError(const char *, const char *);
Index: src/usr.bin/make/suff.c
diff -u src/usr.bin/make/suff.c:1.148 src/usr.bin/make/suff.c:1.149
--- src/usr.bin/make/suff.c:1.148 Sat Sep 12 14:41:00 2020
+++ src/usr.bin/make/suff.c Sat Sep 12 15:15:51 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: suff.c,v 1.148 2020/09/12 14:41:00 rillig Exp $ */
+/* $NetBSD: suff.c,v 1.149 2020/09/12 15:15:51 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: suff.c,v 1.148 2020/09/12 14:41:00 rillig Exp $";
+static char rcsid[] = "$NetBSD: suff.c,v 1.149 2020/09/12 15:15:51 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94";
#else
-__RCSID("$NetBSD: suff.c,v 1.148 2020/09/12 14:41:00 rillig Exp $");
+__RCSID("$NetBSD: suff.c,v 1.149 2020/09/12 15:15:51 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -948,6 +948,15 @@ Suff_AddLib(const char *sname)
/********** Implicit Source Search Functions *********/
+#ifdef DEBUG_SRC
+static int
+PrintAddr(void *a, void *b MAKE_ATTR_UNUSED)
+{
+ printf("%lx ", (unsigned long) a);
+ return 0;
+}
+#endif
+
/* Add a suffix as a Src structure to the given list with its parent
* being the given Src structure. If the suffix is the null suffix,
* the prefix is used unaltered as the file name in the Src structure.