=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/job.c,v retrieving revision 1.26 retrieving revision 1.27 diff -c -r1.26 -r1.27 *** src/usr.bin/make/job.c 2000/06/10 01:26:36 1.26 --- src/usr.bin/make/job.c 2000/06/10 01:32:22 1.27 *************** *** 1,4 **** ! /* $OpenBSD: job.c,v 1.26 2000/06/10 01:26:36 espie Exp $ */ /* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: job.c,v 1.27 2000/06/10 01:32:22 espie Exp $ */ /* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */ /* *************** *** 43,49 **** #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else ! static char rcsid[] = "$OpenBSD: job.c,v 1.26 2000/06/10 01:26:36 espie Exp $"; #endif #endif /* not lint */ --- 43,49 ---- #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else ! static char rcsid[] = "$OpenBSD: job.c,v 1.27 2000/06/10 01:32:22 espie Exp $"; #endif #endif /* not lint */ *************** *** 292,302 **** #define W_SETEXITSTATUS(st, val) W_SETMASKED(st, val, WEXITSTATUS) ! static int JobCondPassSig __P((ClientData, ClientData)); static void JobPassSig __P((int)); static int JobCmpPid __P((ClientData, ClientData)); static int JobPrintCommand __P((ClientData, ClientData)); ! static int JobSaveCommand __P((ClientData, ClientData)); static void JobClose __P((Job *)); #ifdef REMOTE static int JobCmpRmtID __P((Job *, ClientData)); --- 292,302 ---- #define W_SETEXITSTATUS(st, val) W_SETMASKED(st, val, WEXITSTATUS) ! static void JobCondPassSig __P((ClientData, ClientData)); static void JobPassSig __P((int)); static int JobCmpPid __P((ClientData, ClientData)); static int JobPrintCommand __P((ClientData, ClientData)); ! static void JobSaveCommand __P((ClientData, ClientData)); static void JobClose __P((Job *)); #ifdef REMOTE static int JobCmpRmtID __P((Job *, ClientData)); *************** *** 322,336 **** * Pass a signal to a job if the job is remote or if USE_PGRP * is defined. * - * Results: - * === 0 - * * Side Effects: * None, except the job may bite it. * *----------------------------------------------------------------------- */ ! static int JobCondPassSig(jobp, signop) ClientData jobp; /* Job to biff */ ClientData signop; /* Signal to send it */ --- 322,333 ---- * Pass a signal to a job if the job is remote or if USE_PGRP * is defined. * * Side Effects: * None, except the job may bite it. * *----------------------------------------------------------------------- */ ! static void JobCondPassSig(jobp, signop) ClientData jobp; /* Job to biff */ ClientData signop; /* Signal to send it */ *************** *** 356,362 **** } KILL(job->pid, signo); #endif - return 0; } /*- --- 353,358 ---- *************** *** 663,684 **** * Save a command to be executed when everything else is done. * Callback function for JobFinish... * - * Results: - * Always returns 0 - * * Side Effects: * The command is tacked onto the end of postCommands's commands list. * *----------------------------------------------------------------------- */ ! static int JobSaveCommand(cmd, gn) ClientData cmd; ClientData gn; { cmd = (ClientData) Var_Subst((char *) cmd, (GNode *) gn, FALSE); Lst_AtEnd(postCommands->commands, cmd); - return(0); } --- 659,676 ---- * Save a command to be executed when everything else is done. * Callback function for JobFinish... * * Side Effects: * The command is tacked onto the end of postCommands's commands list. * *----------------------------------------------------------------------- */ ! static void JobSaveCommand(cmd, gn) ClientData cmd; ClientData gn; { cmd = (ClientData) Var_Subst((char *) cmd, (GNode *) gn, FALSE); Lst_AtEnd(postCommands->commands, cmd); } *************** *** 965,975 **** * the parents. In addition, any saved commands for the node are placed * on the .END target. */ ! if (job->tailCmds != NULL) { ! Lst_ForEachFrom(job->node->commands, job->tailCmds, ! JobSaveCommand, ! job->node); ! } job->node->made = MADE; Make_Update(job->node); free((Address)job); --- 957,963 ---- * the parents. In addition, any saved commands for the node are placed * on the .END target. */ ! Lst_ForEachFrom(job->tailCmds, JobSaveCommand, job->node); job->node->made = MADE; Make_Update(job->node); free((Address)job); *************** *** 1850,1860 **** */ if (cmdsOK) { if (aborting == 0) { ! if (job->tailCmds != NULL) { ! Lst_ForEachFrom(job->node->commands, job->tailCmds, ! JobSaveCommand, ! job->node); ! } Make_Update(job->node); } free((Address)job); --- 1838,1844 ---- */ if (cmdsOK) { if (aborting == 0) { ! Lst_ForEachFrom(job->tailCmds, JobSaveCommand, job->node); Make_Update(job->node); } free((Address)job);