make(1): move PrintAddr to where it belongs

This commit is contained in:
rillig 2020-09-12 15:15:51 +00:00
parent 66b9293081
commit 8c7f5b73b9
3 changed files with 16 additions and 15 deletions

View File

@ -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, 1989, 1990, 1993\
#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, char *resolved)
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)

View File

@ -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_PRINTFLIKE(1, 2);
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 *);

View File

@ -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.