summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/compat.c
diff options
context:
space:
mode:
authorwill <will@FreeBSD.org>2000-12-02 20:24:42 +0000
committerwill <will@FreeBSD.org>2000-12-02 20:24:42 +0000
commit65a98afaedffb34df44fe7938b9f87f8dbce1cd6 (patch)
tree9dcfaa566f6b1b0fd7a3947c238332a19dd073c2 /usr.bin/make/compat.c
parent33a20c676da04b4c787eef9bd8f8ef901c319fee (diff)
downloadFreeBSD-src-65a98afaedffb34df44fe7938b9f87f8dbce1cd6.zip
FreeBSD-src-65a98afaedffb34df44fe7938b9f87f8dbce1cd6.tar.gz
There's also no point in #typedef'ing void/char pointers. Accordingly,
rip out ClientData/Address pointers and use standard types. Obtained from: OpenBSD
Diffstat (limited to 'usr.bin/make/compat.c')
-rw-r--r--usr.bin/make/compat.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c
index 23d48db..e68dd08 100644
--- a/usr.bin/make/compat.c
+++ b/usr.bin/make/compat.c
@@ -80,8 +80,8 @@ static char meta[256];
static GNode *curTarg = NULL;
static GNode *ENDNode;
static void CompatInterrupt __P((int));
-static int CompatRunCommand __P((ClientData, ClientData));
-static int CompatMake __P((ClientData, ClientData));
+static int CompatRunCommand __P((void *, void *));
+static int CompatMake __P((void *, void *));
static char *sh_builtin[] = {
"alias", "cd", "eval", "exec", "exit", "read", "set", "ulimit",
@@ -123,7 +123,7 @@ CompatInterrupt (signo)
if (signo == SIGINT) {
gn = Targ_FindNode(".INTERRUPT", TARG_NOCREATE);
if (gn != NULL) {
- Lst_ForEach(gn->commands, CompatRunCommand, (ClientData)gn);
+ Lst_ForEach(gn->commands, CompatRunCommand, (void *)gn);
}
}
@@ -177,8 +177,8 @@ shellneed (cmd)
*/
static int
CompatRunCommand (cmdp, gnp)
- ClientData cmdp; /* Command to execute */
- ClientData gnp; /* Node from which the command came */
+ void * cmdp; /* Command to execute */
+ void * gnp; /* Node from which the command came */
{
char *cmdStart; /* Start of expanded command */
register char *cp;
@@ -209,7 +209,7 @@ CompatRunCommand (cmdp, gnp)
silent = gn->type & OP_SILENT;
errCheck = !(gn->type & OP_IGNORE);
- cmdNode = Lst_Member (gn->commands, (ClientData)cmd);
+ cmdNode = Lst_Member (gn->commands, (void *)cmd);
cmdStart = Var_Subst (NULL, cmd, gn, FALSE);
/*
@@ -226,10 +226,10 @@ CompatRunCommand (cmdp, gnp)
} else {
cmd = cmdStart;
}
- Lst_Replace (cmdNode, (ClientData)cmdStart);
+ Lst_Replace (cmdNode, (void *)cmdStart);
if ((gn->type & OP_SAVE_CMDS) && (gn != ENDNode)) {
- (void)Lst_AtEnd(ENDNode->commands, (ClientData)cmdStart);
+ (void)Lst_AtEnd(ENDNode->commands, (void *)cmdStart);
return(0);
} else if (strcmp(cmdStart, "...") == 0) {
gn->type |= OP_SAVE_CMDS;
@@ -418,8 +418,8 @@ CompatRunCommand (cmdp, gnp)
*/
static int
CompatMake (gnp, pgnp)
- ClientData gnp; /* The node to make */
- ClientData pgnp; /* Parent to abort if necessary */
+ void * gnp; /* The node to make */
+ void * pgnp; /* Parent to abort if necessary */
{
GNode *gn = (GNode *) gnp;
GNode *pgn = (GNode *) pgnp;
@@ -437,7 +437,7 @@ CompatMake (gnp, pgnp)
gn->make = TRUE;
gn->made = BEINGMADE;
Suff_FindDeps (gn);
- Lst_ForEach (gn->children, CompatMake, (ClientData)gn);
+ Lst_ForEach (gn->children, CompatMake, (void *)gn);
if (!gn->make) {
gn->made = ABORTED;
pgn->make = FALSE;
@@ -502,7 +502,7 @@ CompatMake (gnp, pgnp)
*/
if (!touchFlag) {
curTarg = gn;
- Lst_ForEach (gn->commands, CompatRunCommand, (ClientData)gn);
+ Lst_ForEach (gn->commands, CompatRunCommand, (void *)gn);
curTarg = NULL;
} else {
Job_Touch (gn, gn->type & OP_SILENT);
@@ -677,7 +677,7 @@ Compat_Run(targs)
if (!queryFlag) {
gn = Targ_FindNode(".BEGIN", TARG_NOCREATE);
if (gn != NULL) {
- Lst_ForEach(gn->commands, CompatRunCommand, (ClientData)gn);
+ Lst_ForEach(gn->commands, CompatRunCommand, (void *)gn);
if (gn->made == ERROR) {
printf("\n\nStop.\n");
exit(1);
@@ -712,6 +712,6 @@ Compat_Run(targs)
* If the user has defined a .END target, run its commands.
*/
if (errors == 0) {
- Lst_ForEach(ENDNode->commands, CompatRunCommand, (ClientData)gn);
+ Lst_ForEach(ENDNode->commands, CompatRunCommand, (void *)gn);
}
}
OpenPOWER on IntegriCloud