Module Name: src
Committed By: rillig
Date: Sat Sep 12 15:10:55 UTC 2020
Modified Files:
src/usr.bin/make: compat.c nonints.h
Log Message:
make(1): fix prototype of Compat_Make
To generate a diff of this commit:
cvs rdiff -u -r1.142 -r1.143 src/usr.bin/make/compat.c
cvs rdiff -u -r1.108 -r1.109 src/usr.bin/make/nonints.h
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/compat.c
diff -u src/usr.bin/make/compat.c:1.142 src/usr.bin/make/compat.c:1.143
--- src/usr.bin/make/compat.c:1.142 Sat Sep 12 15:03:39 2020
+++ src/usr.bin/make/compat.c Sat Sep 12 15:10:55 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: compat.c,v 1.142 2020/09/12 15:03:39 rillig Exp $ */
+/* $NetBSD: compat.c,v 1.143 2020/09/12 15:10:55 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: compat.c,v 1.142 2020/09/12 15:03:39 rillig Exp $";
+static char rcsid[] = "$NetBSD: compat.c,v 1.143 2020/09/12 15:10:55 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: compat.c,v 1.142 2020/09/12 15:03:39 rillig Exp $");
+__RCSID("$NetBSD: compat.c,v 1.143 2020/09/12 15:10:55 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -485,6 +485,12 @@ CompatRunCommand(void *cmd, void *gn)
return Compat_RunCommand(cmd, gn);
}
+static int
+CompatMake(void *gn, void *pgn)
+{
+ return Compat_Make(gn, pgn);
+}
+
/*-
*-----------------------------------------------------------------------
* Compat_Make --
@@ -503,11 +509,8 @@ CompatRunCommand(void *cmd, void *gn)
*-----------------------------------------------------------------------
*/
int
-Compat_Make(void *gnp, void *pgnp)
+Compat_Make(GNode *gn, GNode *pgn)
{
- GNode *gn = (GNode *)gnp;
- GNode *pgn = (GNode *)pgnp;
-
if (!shellName) /* we came here from jobs */
Shell_Init();
if (gn->made == UNMADE && (gn == pgn || (pgn->type & OP_MADE) == 0)) {
@@ -523,7 +526,7 @@ Compat_Make(void *gnp, void *pgnp)
gn->made = BEINGMADE;
if ((gn->type & OP_MADE) == 0)
Suff_FindDeps(gn);
- Lst_ForEach(gn->children, Compat_Make, gn);
+ Lst_ForEach(gn->children, CompatMake, gn);
if ((gn->flags & REMAKE) == 0) {
gn->made = ABORTED;
pgn->flags &= ~(unsigned)REMAKE;
@@ -663,7 +666,7 @@ Compat_Make(void *gnp, void *pgnp)
}
cohorts:
- Lst_ForEach(gn->cohorts, Compat_Make, pgnp);
+ Lst_ForEach(gn->cohorts, CompatMake, pgn);
return 0;
}
Index: src/usr.bin/make/nonints.h
diff -u src/usr.bin/make/nonints.h:1.108 src/usr.bin/make/nonints.h:1.109
--- src/usr.bin/make/nonints.h:1.108 Sat Sep 12 15:03:40 2020
+++ src/usr.bin/make/nonints.h Sat Sep 12 15:10:55 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: nonints.h,v 1.108 2020/09/12 15:03:40 rillig Exp $ */
+/* $NetBSD: nonints.h,v 1.109 2020/09/12 15:10:55 rillig Exp $ */
/*-
* Copyright (c) 1988, 1989, 1990, 1993
@@ -87,7 +87,7 @@ Boolean Arch_IsLib(GNode *);
/* compat.c */
int Compat_RunCommand(char *, GNode *);
void Compat_Run(Lst);
-int Compat_Make(void *, void *);
+int Compat_Make(GNode *, GNode *);
/* cond.c */
struct If;