make(1): remove trailing whitespace
This commit is contained in:
parent
44d841d2c5
commit
820b5caede
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: compat.c,v 1.112 2020/07/03 08:02:55 rillig Exp $ */
|
||||
/* $NetBSD: compat.c,v 1.113 2020/07/03 08:13:23 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.112 2020/07/03 08:02:55 rillig Exp $";
|
||||
static char rcsid[] = "$NetBSD: compat.c,v 1.113 2020/07/03 08:13:23 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.112 2020/07/03 08:02:55 rillig Exp $");
|
||||
__RCSID("$NetBSD: compat.c,v 1.113 2020/07/03 08:13:23 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
@ -233,7 +233,7 @@ CompatRunCommand(void *cmdp, void *gnp)
|
||||
silent = gn->type & OP_SILENT;
|
||||
errCheck = !(gn->type & OP_IGNORE);
|
||||
doIt = FALSE;
|
||||
|
||||
|
||||
cmdNode = Lst_Member(gn->commands, cmd);
|
||||
cmdStart = Var_Subst(NULL, cmd, gn, VARF_WANTRES);
|
||||
|
||||
@ -304,7 +304,7 @@ CompatRunCommand(void *cmdp, void *gnp)
|
||||
* go to the shell. Therefore treat '=' and ':' like shell
|
||||
* meta characters as documented in make(1).
|
||||
*/
|
||||
|
||||
|
||||
useShell = needshell(cmd, FALSE);
|
||||
#endif
|
||||
|
||||
@ -374,7 +374,7 @@ again:
|
||||
meta_compat_start();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Fork and execute the single command. If the fork fails, we abort.
|
||||
*/
|
||||
@ -496,7 +496,7 @@ again:
|
||||
bmake_signal(compatSigno, SIG_DFL);
|
||||
kill(myPid, compatSigno);
|
||||
}
|
||||
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cond.c,v 1.77 2020/07/03 08:02:55 rillig Exp $ */
|
||||
/* $NetBSD: cond.c,v 1.78 2020/07/03 08:13:23 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: cond.c,v 1.77 2020/07/03 08:02:55 rillig Exp $";
|
||||
static char rcsid[] = "$NetBSD: cond.c,v 1.78 2020/07/03 08:13:23 rillig Exp $";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: cond.c,v 1.77 2020/07/03 08:02:55 rillig Exp $");
|
||||
__RCSID("$NetBSD: cond.c,v 1.78 2020/07/03 08:13:23 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
@ -186,7 +186,7 @@ static unsigned int cond_min_depth = 0; /* depth at makefile open */
|
||||
* Indicate when we should be strict about lhs of comparisons.
|
||||
* TRUE when Cond_EvalExpression is called from Cond_Eval (.if etc)
|
||||
* FALSE when Cond_EvalExpression is called from var.c:ApplyModifiers
|
||||
* since lhs is already expanded and we cannot tell if
|
||||
* since lhs is already expanded and we cannot tell if
|
||||
* it was a variable reference or not.
|
||||
*/
|
||||
static Boolean lhsStrict;
|
||||
@ -412,7 +412,7 @@ CondDoExists(int argLen MAKE_ATTR_UNUSED, const char *arg)
|
||||
if (DEBUG(COND)) {
|
||||
fprintf(debug_file, "exists(%s) result is \"%s\"\n",
|
||||
arg, path ? path : "");
|
||||
}
|
||||
}
|
||||
if (path != NULL) {
|
||||
result = TRUE;
|
||||
free(path);
|
||||
@ -666,7 +666,7 @@ compare_expression(Boolean doEval)
|
||||
rhs = NULL;
|
||||
lhsFree = rhsFree = FALSE;
|
||||
lhsQuoted = rhsQuoted = FALSE;
|
||||
|
||||
|
||||
/*
|
||||
* Parse the variable spec and skip over it, saving its
|
||||
* value in lhs.
|
||||
@ -709,7 +709,7 @@ compare_expression(Boolean doEval)
|
||||
goto done;
|
||||
}
|
||||
/* For .ifxxx <number> compare against zero */
|
||||
if (CondCvtArg(lhs, &left)) {
|
||||
if (CondCvtArg(lhs, &left)) {
|
||||
t = left != 0.0;
|
||||
goto done;
|
||||
}
|
||||
@ -762,7 +762,7 @@ do_string_compare:
|
||||
* rhs is either a float or an integer. Convert both the
|
||||
* lhs and the rhs to a double and compare the two.
|
||||
*/
|
||||
|
||||
|
||||
if (!CondCvtArg(lhs, &left) || !CondCvtArg(rhs, &right))
|
||||
goto do_string_compare;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dir.c,v 1.75 2020/07/03 08:02:55 rillig Exp $ */
|
||||
/* $NetBSD: dir.c,v 1.76 2020/07/03 08:13:23 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: dir.c,v 1.75 2020/07/03 08:02:55 rillig Exp $";
|
||||
static char rcsid[] = "$NetBSD: dir.c,v 1.76 2020/07/03 08:13:23 rillig Exp $";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: dir.c,v 1.75 2020/07/03 08:02:55 rillig Exp $");
|
||||
__RCSID("$NetBSD: dir.c,v 1.76 2020/07/03 08:13:23 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
@ -112,7 +112,7 @@ __RCSID("$NetBSD: dir.c,v 1.75 2020/07/03 08:02:55 rillig Exp $");
|
||||
* Dir_FindHereOrAbove Search for a path in the current directory and
|
||||
* then all the directories above it in turn until
|
||||
* the path is found or we reach the root ("/").
|
||||
*
|
||||
*
|
||||
* Dir_MTime Return the modification time of a node. The file
|
||||
* is searched for along the default search path.
|
||||
* The path and mtime fields of the node are filled
|
||||
@ -377,7 +377,7 @@ void
|
||||
Dir_InitCur(const char *cdname)
|
||||
{
|
||||
Path *p;
|
||||
|
||||
|
||||
if (cdname != NULL) {
|
||||
/*
|
||||
* Our build directory is not the same as our source directory.
|
||||
@ -480,7 +480,7 @@ Dir_SetPATH(void)
|
||||
Boolean hasLastDot = FALSE; /* true we should search dot last */
|
||||
|
||||
Var_Delete(".PATH", VAR_GLOBAL);
|
||||
|
||||
|
||||
if (Lst_Open(dirSearchPath) == SUCCESS) {
|
||||
if ((ln = Lst_First(dirSearchPath)) != NULL) {
|
||||
p = (Path *)Lst_Datum(ln);
|
||||
@ -545,7 +545,7 @@ DirFindName(const void *p, const void *dname)
|
||||
* Dir_HasWildcards --
|
||||
* see if the given name has any wildcard characters in it
|
||||
* be careful not to expand unmatching brackets or braces.
|
||||
* XXX: This code is not 100% correct. ([^]] fails etc.)
|
||||
* XXX: This code is not 100% correct. ([^]] fails etc.)
|
||||
* I really don't think that make(1) should be expanding
|
||||
* patterns, because then you have to set a mechanism for
|
||||
* escaping the expansion!
|
||||
@ -947,7 +947,7 @@ Dir_Expand(const char *word, Lst path, Lst expansions)
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
static char *
|
||||
DirLookup(Path *p, const char *name MAKE_ATTR_UNUSED, const char *cp,
|
||||
DirLookup(Path *p, const char *name MAKE_ATTR_UNUSED, const char *cp,
|
||||
Boolean hasSlash MAKE_ATTR_UNUSED)
|
||||
{
|
||||
char *file; /* the current filename to check */
|
||||
@ -1185,7 +1185,7 @@ Dir_FindFile(const char *name, Lst path)
|
||||
* is found, we concatenate the directory name and the final
|
||||
* component and return the resulting string. If we don't find any
|
||||
* such thing, we go on to phase two...
|
||||
*
|
||||
*
|
||||
* No matter what, we always look for the file in the current
|
||||
* directory before anywhere else (unless we found the magic
|
||||
* DOTLAST path, in which case we search it last) and we *do not*
|
||||
@ -1409,14 +1409,14 @@ Dir_FindFile(const char *name, Lst path)
|
||||
/*-
|
||||
*-----------------------------------------------------------------------
|
||||
* Dir_FindHereOrAbove --
|
||||
* search for a path starting at a given directory and then working
|
||||
* search for a path starting at a given directory and then working
|
||||
* our way up towards the root.
|
||||
*
|
||||
* Input:
|
||||
* here starting directory
|
||||
* search_path the path we are looking for
|
||||
* result the result of a successful search is placed here
|
||||
* rlen the length of the result buffer
|
||||
* rlen the length of the result buffer
|
||||
* (typically MAXPATHLEN + 1)
|
||||
*
|
||||
* Results:
|
||||
@ -1426,7 +1426,7 @@ Dir_FindFile(const char *name, Lst path)
|
||||
* Side Effects:
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
int
|
||||
int
|
||||
Dir_FindHereOrAbove(char *here, char *search_path, char *result, int rlen) {
|
||||
|
||||
struct stat st;
|
||||
@ -1451,7 +1451,7 @@ Dir_FindHereOrAbove(char *here, char *search_path, char *result, int rlen) {
|
||||
try_end = try + strlen(try);
|
||||
while (try_end > try && *try_end != '/')
|
||||
try_end--;
|
||||
if (try_end > try)
|
||||
if (try_end > try)
|
||||
*try_end = 0; /* chop! */
|
||||
}
|
||||
|
||||
@ -1462,7 +1462,7 @@ Dir_FindHereOrAbove(char *here, char *search_path, char *result, int rlen) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* nope, we didn't find it. if we used up dirbase we've
|
||||
* reached the root and failed.
|
||||
*/
|
||||
@ -1479,7 +1479,7 @@ Dir_FindHereOrAbove(char *here, char *search_path, char *result, int rlen) {
|
||||
} /* while (1) */
|
||||
|
||||
/*
|
||||
* we failed...
|
||||
* we failed...
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
@ -1529,7 +1529,7 @@ Dir_MTime(GNode *gn, Boolean recheck)
|
||||
* see if we can find it via the current .PATH
|
||||
*/
|
||||
cp++;
|
||||
|
||||
|
||||
fullName = Dir_FindFile(cp, Suff_FindPath(gn));
|
||||
if (fullName) {
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: for.c,v 1.53 2017/04/16 21:04:44 riastradh Exp $ */
|
||||
/* $NetBSD: for.c,v 1.54 2020/07/03 08:13:23 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, The Regents of the University of California.
|
||||
@ -30,14 +30,14 @@
|
||||
*/
|
||||
|
||||
#ifndef MAKE_NATIVE
|
||||
static char rcsid[] = "$NetBSD: for.c,v 1.53 2017/04/16 21:04:44 riastradh Exp $";
|
||||
static char rcsid[] = "$NetBSD: for.c,v 1.54 2020/07/03 08:13:23 rillig Exp $";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)for.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: for.c,v 1.53 2017/04/16 21:04:44 riastradh Exp $");
|
||||
__RCSID("$NetBSD: for.c,v 1.54 2020/07/03 08:13:23 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
@ -224,7 +224,7 @@ For_Eval(char *line)
|
||||
words = brk_string(sub, &nwords, FALSE, &word_buf);
|
||||
|
||||
free(sub);
|
||||
|
||||
|
||||
if (words != NULL) {
|
||||
for (n = 0; n < nwords; n++) {
|
||||
ptr = words[n];
|
||||
@ -480,9 +480,9 @@ For_Iterate(void *v_arg, size_t *ret_len)
|
||||
|
||||
void
|
||||
For_Run(int lineno)
|
||||
{
|
||||
{
|
||||
For *arg;
|
||||
|
||||
|
||||
arg = accumFor;
|
||||
accumFor = NULL;
|
||||
|
||||
@ -491,6 +491,6 @@ For_Run(int lineno)
|
||||
For_Free(arg);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Parse_SetInput(NULL, lineno, -1, For_Iterate, arg);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: job.c,v 1.200 2020/07/03 08:02:55 rillig Exp $ */
|
||||
/* $NetBSD: job.c,v 1.201 2020/07/03 08:13:23 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: job.c,v 1.200 2020/07/03 08:02:55 rillig Exp $";
|
||||
static char rcsid[] = "$NetBSD: job.c,v 1.201 2020/07/03 08:13:23 rillig Exp $";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: job.c,v 1.200 2020/07/03 08:02:55 rillig Exp $");
|
||||
__RCSID("$NetBSD: job.c,v 1.201 2020/07/03 08:13:23 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
@ -261,7 +261,7 @@ static Shell shells[] = {
|
||||
"",
|
||||
},
|
||||
/*
|
||||
* KSH description.
|
||||
* KSH description.
|
||||
*/
|
||||
{
|
||||
"ksh",
|
||||
@ -431,7 +431,7 @@ JobCreatePipe(Job *job, int minfd)
|
||||
job->jobPipe[i] = fd;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Set close-on-exec flag for both */
|
||||
if (fcntl(job->jobPipe[0], F_SETFD, FD_CLOEXEC) == -1)
|
||||
Punt("Cannot set close-on-exec: %s", strerror(errno));
|
||||
@ -441,7 +441,7 @@ JobCreatePipe(Job *job, int minfd)
|
||||
/*
|
||||
* We mark the input side of the pipe non-blocking; we poll(2) the
|
||||
* pipe when we're waiting for a job token, but we might lose the
|
||||
* race for the token when a new one becomes available, so the read
|
||||
* race for the token when a new one becomes available, so the read
|
||||
* from the pipe should not block.
|
||||
*/
|
||||
flags = fcntl(job->jobPipe[0], F_GETFL, 0);
|
||||
@ -764,7 +764,7 @@ JobPrintCommand(void *cmdp, void *jobp)
|
||||
|
||||
/*
|
||||
* If the shell doesn't have error control the alternate echo'ing will
|
||||
* be done (to avoid showing additional error checking code)
|
||||
* be done (to avoid showing additional error checking code)
|
||||
* and this will need the characters '$ ` \ "' escaped
|
||||
*/
|
||||
|
||||
@ -772,10 +772,10 @@ JobPrintCommand(void *cmdp, void *jobp)
|
||||
/* Worst that could happen is every char needs escaping. */
|
||||
escCmd = bmake_malloc((strlen(cmd) * 2) + 1);
|
||||
for (i = 0, j= 0; cmd[i] != '\0'; i++, j++) {
|
||||
if (cmd[i] == '$' || cmd[i] == '`' || cmd[i] == '\\' ||
|
||||
if (cmd[i] == '$' || cmd[i] == '`' || cmd[i] == '\\' ||
|
||||
cmd[i] == '"')
|
||||
escCmd[j++] = '\\';
|
||||
escCmd[j] = cmd[i];
|
||||
escCmd[j] = cmd[i];
|
||||
}
|
||||
escCmd[j] = 0;
|
||||
}
|
||||
@ -848,13 +848,13 @@ JobPrintCommand(void *cmdp, void *jobp)
|
||||
}
|
||||
} else {
|
||||
|
||||
/*
|
||||
/*
|
||||
* If errors are being checked and the shell doesn't have error control
|
||||
* but does supply an errOut template, then setup commands to run
|
||||
* through it.
|
||||
*/
|
||||
|
||||
if (!commandShell->hasErrCtl && commandShell->errOut &&
|
||||
if (!commandShell->hasErrCtl && commandShell->errOut &&
|
||||
(*commandShell->errOut != '\0')) {
|
||||
if (!(job->flags & JOB_SILENT) && !shutUp) {
|
||||
if (commandShell->hasEchoCtl) {
|
||||
@ -878,7 +878,7 @@ JobPrintCommand(void *cmdp, void *jobp)
|
||||
DBPRINTF("set -%s\n", "x");
|
||||
job->flags |= JOB_TRACED;
|
||||
}
|
||||
|
||||
|
||||
DBPRINTF(cmdTemplate, cmd);
|
||||
free(cmdStart);
|
||||
free(escCmd);
|
||||
@ -1086,7 +1086,7 @@ JobFinish(Job *job, int status)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
return_job_token = FALSE;
|
||||
|
||||
Trace_Log(JOBEND, job);
|
||||
@ -1402,7 +1402,7 @@ JobExec(Job *job, char **argv)
|
||||
_exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Set up the child's output to be routed through the pipe
|
||||
* we've created for it.
|
||||
@ -2921,7 +2921,7 @@ Job_ServerStart(int max_tokens, int jp_0, int jp_1)
|
||||
{
|
||||
int i;
|
||||
char jobarg[64];
|
||||
|
||||
|
||||
if (jp_0 >= 0 && jp_1 >= 0) {
|
||||
/* Pipe passed in from parent */
|
||||
tokenWaitJob.inPipe = jp_0;
|
||||
@ -2937,12 +2937,12 @@ Job_ServerStart(int max_tokens, int jp_0, int jp_1)
|
||||
tokenWaitJob.inPipe, tokenWaitJob.outPipe);
|
||||
|
||||
Var_Append(MAKEFLAGS, "-J", VAR_GLOBAL);
|
||||
Var_Append(MAKEFLAGS, jobarg, VAR_GLOBAL);
|
||||
Var_Append(MAKEFLAGS, jobarg, VAR_GLOBAL);
|
||||
|
||||
/*
|
||||
* Preload the job pipe with one token per job, save the one
|
||||
* "extra" token for the primary job.
|
||||
*
|
||||
*
|
||||
* XXX should clip maxJobs against PIPE_BUF -- if max_tokens is
|
||||
* larger than the write buffer size of the pipe, we will
|
||||
* deadlock here.
|
||||
@ -3094,9 +3094,9 @@ emul_poll(struct pollfd *fd, int nfd, int timeout)
|
||||
if (fd[i].fd > maxfd)
|
||||
maxfd = fd[i].fd;
|
||||
}
|
||||
|
||||
|
||||
if (maxfd >= FD_SETSIZE) {
|
||||
Punt("Ran out of fd_set slots; "
|
||||
Punt("Ran out of fd_set slots; "
|
||||
"recompile with a larger FD_SETSIZE.");
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: job.h,v 1.42 2013/07/05 22:14:56 sjg Exp $ */
|
||||
/* $NetBSD: job.h,v 1.43 2020/07/03 08:13:23 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
|
||||
@ -106,7 +106,7 @@ emul_poll(struct pollfd *fd, int nfd, int timeout);
|
||||
|
||||
/*
|
||||
* The POLL_MSEC constant determines the maximum number of milliseconds spent
|
||||
* in poll before coming out to see if a child has finished.
|
||||
* in poll before coming out to see if a child has finished.
|
||||
*/
|
||||
#define POLL_MSEC 5000
|
||||
|
||||
@ -203,11 +203,11 @@ typedef struct Job {
|
||||
* a case, errCheck becomes a printf template for echoing the command,
|
||||
* should echoing be on and ignErr becomes another printf template for
|
||||
* executing the command while ignoring the return status. Finally errOut
|
||||
* is a printf template for running the command and causing the shell to
|
||||
* exit on error. If any of these strings are empty when hasErrCtl is FALSE,
|
||||
* the command will be executed anyway as is and if it causes an error, so be
|
||||
* is a printf template for running the command and causing the shell to
|
||||
* exit on error. If any of these strings are empty when hasErrCtl is FALSE,
|
||||
* the command will be executed anyway as is and if it causes an error, so be
|
||||
* it. Any templates setup to echo the command will escape any '$ ` \ "'i
|
||||
* characters in the command string to avoid common problems with
|
||||
* characters in the command string to avoid common problems with
|
||||
* echo "%s\n" as a template.
|
||||
*/
|
||||
typedef struct Shell {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.278 2020/07/03 08:02:55 rillig Exp $ */
|
||||
/* $NetBSD: main.c,v 1.279 2020/07/03 08:13:23 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -69,7 +69,7 @@
|
||||
*/
|
||||
|
||||
#ifndef MAKE_NATIVE
|
||||
static char rcsid[] = "$NetBSD: main.c,v 1.278 2020/07/03 08:02:55 rillig Exp $";
|
||||
static char rcsid[] = "$NetBSD: main.c,v 1.279 2020/07/03 08:13:23 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.278 2020/07/03 08:02:55 rillig Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.279 2020/07/03 08:13:23 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
@ -232,7 +232,7 @@ explode(const char *flags)
|
||||
*nf = '\0';
|
||||
return st;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
parse_debug_options(const char *argvalue)
|
||||
{
|
||||
@ -416,7 +416,7 @@ MainParseArgs(int argc, char **argv)
|
||||
/* Can't actually use getopt(3) because rescanning is not portable */
|
||||
|
||||
getopt_def = OPTFLAGS;
|
||||
rearg:
|
||||
rearg:
|
||||
inOption = FALSE;
|
||||
optscan = NULL;
|
||||
while(argc > 1) {
|
||||
@ -452,7 +452,7 @@ rearg:
|
||||
arginc = 2;
|
||||
}
|
||||
} else {
|
||||
argvalue = NULL;
|
||||
argvalue = NULL;
|
||||
}
|
||||
switch(c) {
|
||||
case '\0':
|
||||
@ -1268,7 +1268,7 @@ main(int argc, char **argv)
|
||||
(void)time(&now);
|
||||
|
||||
Trace_Log(MAKESTART, NULL);
|
||||
|
||||
|
||||
/*
|
||||
* Set up the .TARGETS variable to contain the list of targets to be
|
||||
* created. If none specified, make the variable empty -- the parser
|
||||
@ -1307,7 +1307,7 @@ main(int argc, char **argv)
|
||||
if (strncmp(".../", start, 4) != 0) {
|
||||
(void)Dir_AddDir(defIncPath, start);
|
||||
} else {
|
||||
if (Dir_FindHereOrAbove(curdir, start+4,
|
||||
if (Dir_FindHereOrAbove(curdir, start+4,
|
||||
found_path, sizeof(found_path))) {
|
||||
(void)Dir_AddDir(defIncPath, found_path);
|
||||
}
|
||||
@ -1342,7 +1342,7 @@ main(int argc, char **argv)
|
||||
|
||||
ln = Lst_Find(makefiles, NULL, ReadAllMakefiles);
|
||||
if (ln != NULL)
|
||||
Fatal("%s: cannot open %s.", progname,
|
||||
Fatal("%s: cannot open %s.", progname,
|
||||
(char *)Lst_Datum(ln));
|
||||
} else {
|
||||
p1 = Var_Subst(NULL, "${" MAKEFILE_PREFERENCE "}",
|
||||
@ -1365,7 +1365,7 @@ main(int argc, char **argv)
|
||||
|
||||
if (enterFlagObj)
|
||||
printf("%s: Entering directory `%s'\n", progname, objdir);
|
||||
|
||||
|
||||
MakeMode(NULL);
|
||||
|
||||
Var_Append("MFLAGS", Var_Value(MAKEFLAGS, VAR_GLOBAL, &p1), VAR_GLOBAL);
|
||||
@ -1409,7 +1409,7 @@ main(int argc, char **argv)
|
||||
|
||||
if (!printVars)
|
||||
Main_ExportMAKEFLAGS(TRUE); /* initial export */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* For compatibility, look at the directories in the VPATH variable
|
||||
@ -1525,14 +1525,14 @@ ReadMakefile(const void *p, const void *q MAKE_ATTR_UNUSED)
|
||||
size_t plen = strlen(curdir) + strlen(fname) + 2;
|
||||
if (len < plen)
|
||||
path = bmake_realloc(path, len = 2 * plen);
|
||||
|
||||
|
||||
(void)snprintf(path, len, "%s/%s", curdir, fname);
|
||||
fd = open(path, O_RDONLY);
|
||||
if (fd != -1) {
|
||||
fname = path;
|
||||
goto found;
|
||||
}
|
||||
|
||||
|
||||
/* If curdir failed, try objdir (ala .depend) */
|
||||
plen = strlen(objdir) + strlen(fname) + 2;
|
||||
if (len < plen)
|
||||
@ -2045,7 +2045,7 @@ PrintOnError(GNode *gn, const char *s)
|
||||
|
||||
if (s)
|
||||
printf("%s", s);
|
||||
|
||||
|
||||
printf("\n%s: stopped in %s\n", progname, curdir);
|
||||
|
||||
if (en)
|
||||
@ -2088,7 +2088,7 @@ Main_ExportMAKEFLAGS(Boolean first)
|
||||
if (once != first)
|
||||
return;
|
||||
once = 0;
|
||||
|
||||
|
||||
strncpy(tmp, "${.MAKEFLAGS} ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@}",
|
||||
sizeof(tmp));
|
||||
s = Var_Subst(NULL, tmp, VAR_CMD, VARF_WANTRES);
|
||||
@ -2134,7 +2134,7 @@ mkTempFile(const char *pattern, char **fnamep)
|
||||
static char *tmpdir = NULL;
|
||||
char tfile[MAXPATHLEN];
|
||||
int fd;
|
||||
|
||||
|
||||
if (!pattern)
|
||||
pattern = TMPPAT;
|
||||
if (!tmpdir)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: make.c,v 1.98 2020/07/03 08:02:55 rillig Exp $ */
|
||||
/* $NetBSD: make.c,v 1.99 2020/07/03 08:13:23 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -69,14 +69,14 @@
|
||||
*/
|
||||
|
||||
#ifndef MAKE_NATIVE
|
||||
static char rcsid[] = "$NetBSD: make.c,v 1.98 2020/07/03 08:02:55 rillig Exp $";
|
||||
static char rcsid[] = "$NetBSD: make.c,v 1.99 2020/07/03 08:13:23 rillig Exp $";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: make.c,v 1.98 2020/07/03 08:02:55 rillig Exp $");
|
||||
__RCSID("$NetBSD: make.c,v 1.99 2020/07/03 08:13:23 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
@ -264,7 +264,7 @@ Make_OODate(GNode *gn)
|
||||
* always out of date if no children and :: target
|
||||
* or non-existent.
|
||||
*/
|
||||
oodate = (gn->mtime == 0 || Arch_LibOODate(gn) ||
|
||||
oodate = (gn->mtime == 0 || Arch_LibOODate(gn) ||
|
||||
(gn->cmgn == NULL && (gn->type & OP_DOUBLEDEP)));
|
||||
} else if (gn->type & OP_JOIN) {
|
||||
/*
|
||||
@ -317,7 +317,7 @@ Make_OODate(GNode *gn)
|
||||
}
|
||||
oodate = TRUE;
|
||||
} else {
|
||||
/*
|
||||
/*
|
||||
* When a non-existing child with no sources
|
||||
* (such as a typically used FORCE source) has been made and
|
||||
* the target of the child (usually a directory) has the same
|
||||
@ -962,7 +962,7 @@ Make_DoAllVar(GNode *gn)
|
||||
{
|
||||
if (gn->flags & DONE_ALLSRC)
|
||||
return;
|
||||
|
||||
|
||||
Lst_ForEach(gn->children, MakeUnmark, gn);
|
||||
Lst_ForEach(gn->children, MakeAddAllSrc, gn);
|
||||
|
||||
@ -1293,7 +1293,7 @@ Make_ExpandUse(Lst targs)
|
||||
*/
|
||||
while (!Lst_IsEmpty (examine)) {
|
||||
gn = (GNode *)Lst_DeQueue(examine);
|
||||
|
||||
|
||||
if (gn->flags & REMAKE)
|
||||
/* We've looked at this one already */
|
||||
continue;
|
||||
@ -1429,7 +1429,7 @@ Make_ProcessWait(Lst targs)
|
||||
|
||||
while (!Lst_IsEmpty (examine)) {
|
||||
pgn = Lst_DeQueue(examine);
|
||||
|
||||
|
||||
/* We only want to process each child-list once */
|
||||
if (pgn->flags & DONE_WAIT)
|
||||
continue;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: meta.c,v 1.84 2020/07/03 08:02:55 rillig Exp $ */
|
||||
/* $NetBSD: meta.c,v 1.85 2020/07/03 08:13:23 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Implement 'meta' mode.
|
||||
@ -8,16 +8,16 @@
|
||||
/*
|
||||
* Copyright (c) 2009-2016, Juniper Networks, Inc.
|
||||
* Portions Copyright (c) 2009, John Birrell.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
@ -28,7 +28,7 @@
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#if defined(USE_META)
|
||||
|
||||
@ -109,7 +109,7 @@ extern char **environ;
|
||||
*
|
||||
* See meta_oodate below - we mainly care about 'E' and 'R'.
|
||||
*
|
||||
* We can still use meta mode without filemon, but
|
||||
* We can still use meta mode without filemon, but
|
||||
* the benefits are more limited.
|
||||
*/
|
||||
#ifdef USE_FILEMON
|
||||
@ -214,7 +214,7 @@ eat_dots(char *buf, size_t bufsz, int dots)
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
do {
|
||||
cp = strstr(buf, eat);
|
||||
if (cp) {
|
||||
@ -403,7 +403,7 @@ meta_needed(GNode *gn, const char *dname, const char *tname,
|
||||
|
||||
if (verbose)
|
||||
verbose = DEBUG(META);
|
||||
|
||||
|
||||
/* This may be a phony node which we don't want meta data for... */
|
||||
/* Skip .meta for .BEGIN, .END, .ERROR etc as well. */
|
||||
/* Or it may be explicitly flagged as .NOMETA */
|
||||
@ -454,7 +454,7 @@ meta_needed(GNode *gn, const char *dname, const char *tname,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static FILE *
|
||||
meta_create(BuildMon *pbm, GNode *gn)
|
||||
{
|
||||
@ -804,7 +804,7 @@ void
|
||||
meta_job_output(Job *job, char *cp, const char *nl)
|
||||
{
|
||||
BuildMon *pbm;
|
||||
|
||||
|
||||
if (job != NULL) {
|
||||
pbm = &job->bm;
|
||||
} else {
|
||||
@ -900,7 +900,7 @@ meta_finish(void)
|
||||
* Fetch a full line from fp - growing bufp if needed
|
||||
* Return length in bufp.
|
||||
*/
|
||||
static int
|
||||
static int
|
||||
fgetLine(char **bufp, size_t *szp, int o, FILE *fp)
|
||||
{
|
||||
char *buf = *bufp;
|
||||
@ -926,7 +926,7 @@ fgetLine(char **bufp, size_t *szp, int o, FILE *fp)
|
||||
newsz = ROUNDUP(fs.st_size, BUFSIZ);
|
||||
if (newsz <= bufsz)
|
||||
return x; /* truncated */
|
||||
if (DEBUG(META))
|
||||
if (DEBUG(META))
|
||||
fprintf(debug_file, "growing buffer %zu -> %zu\n",
|
||||
bufsz, newsz);
|
||||
p = bmake_realloc(buf, newsz);
|
||||
@ -1188,7 +1188,7 @@ meta_oodate(GNode *gn, Boolean oodate)
|
||||
have_filemon = TRUE;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Delimit the record type. */
|
||||
p = buf;
|
||||
@ -1303,7 +1303,7 @@ meta_oodate(GNode *gn, Boolean oodate)
|
||||
|
||||
case 'C': /* Chdir */
|
||||
/* Update lcwd and latest directory. */
|
||||
strlcpy(latestdir, p, sizeof(latestdir));
|
||||
strlcpy(latestdir, p, sizeof(latestdir));
|
||||
strlcpy(lcwd, p, sizeof(lcwd));
|
||||
Var_Set(lcwd_vname, lcwd, VAR_GLOBAL);
|
||||
Var_Set(ldir_vname, lcwd, VAR_GLOBAL);
|
||||
@ -1383,7 +1383,7 @@ meta_oodate(GNode *gn, Boolean oodate)
|
||||
/*
|
||||
* If a file we generated within our bailiwick
|
||||
* but outside of .OBJDIR is missing,
|
||||
* we need to do it again.
|
||||
* we need to do it again.
|
||||
*/
|
||||
/* ignore non-absolute paths */
|
||||
if (*p != '/')
|
||||
@ -1432,7 +1432,7 @@ meta_oodate(GNode *gn, Boolean oodate)
|
||||
*/
|
||||
if (meta_ignore(gn, p))
|
||||
break;
|
||||
|
||||
|
||||
/*
|
||||
* The rest of the record is the file name.
|
||||
* Check if it's not an absolute path.
|
||||
@ -1656,7 +1656,7 @@ meta_compat_start(void)
|
||||
* We need to re-open filemon for each cmd.
|
||||
*/
|
||||
BuildMon *pbm = &Mybm;
|
||||
|
||||
|
||||
if (pbm->mfp != NULL && useFilemon) {
|
||||
meta_open_filemon(pbm);
|
||||
} else {
|
||||
|
@ -1,23 +1,23 @@
|
||||
/* $NetBSD: meta.h,v 1.6 2020/01/19 19:42:32 riastradh Exp $ */
|
||||
/* $NetBSD: meta.h,v 1.7 2020/07/03 08:13:23 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Things needed for 'meta' mode.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2009-2010, Juniper Networks, Inc.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
@ -28,7 +28,7 @@
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
typedef struct BuildMon {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: parse.c,v 1.235 2020/07/03 08:02:55 rillig Exp $ */
|
||||
/* $NetBSD: parse.c,v 1.236 2020/07/03 08:13:23 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -69,14 +69,14 @@
|
||||
*/
|
||||
|
||||
#ifndef MAKE_NATIVE
|
||||
static char rcsid[] = "$NetBSD: parse.c,v 1.235 2020/07/03 08:02:55 rillig Exp $";
|
||||
static char rcsid[] = "$NetBSD: parse.c,v 1.236 2020/07/03 08:13:23 rillig Exp $";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: parse.c,v 1.235 2020/07/03 08:02:55 rillig Exp $");
|
||||
__RCSID("$NetBSD: parse.c,v 1.236 2020/07/03 08:13:23 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
@ -2416,7 +2416,7 @@ ParseTrackInput(const char *name)
|
||||
char *ep;
|
||||
char *fp = NULL;
|
||||
size_t name_len = strlen(name);
|
||||
|
||||
|
||||
old = Var_Value(MAKE_MAKEFILES, VAR_GLOBAL, &fp);
|
||||
if (old) {
|
||||
ep = old + strlen(old) - name_len;
|
||||
@ -3104,7 +3104,7 @@ Parse_File(const char *name, int fd)
|
||||
strncmp(cp, "warning", 7) == 0) {
|
||||
if (ParseMessage(cp))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (*line == '\t') {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: trace.c,v 1.11 2008/12/28 18:31:51 christos Exp $ */
|
||||
/* $NetBSD: trace.c,v 1.12 2020/07/03 08:13:23 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
@ -31,11 +31,11 @@
|
||||
|
||||
|
||||
#ifndef MAKE_NATIVE
|
||||
static char rcsid[] = "$NetBSD: trace.c,v 1.11 2008/12/28 18:31:51 christos Exp $";
|
||||
static char rcsid[] = "$NetBSD: trace.c,v 1.12 2020/07/03 08:13:23 rillig Exp $";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: trace.c,v 1.11 2008/12/28 18:31:51 christos Exp $");
|
||||
__RCSID("$NetBSD: trace.c,v 1.12 2020/07/03 08:13:23 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
|
||||
@ -90,7 +90,7 @@ void
|
||||
Trace_Log(TrEvent event, Job *job)
|
||||
{
|
||||
struct timeval rightnow;
|
||||
|
||||
|
||||
if (trfile == NULL)
|
||||
return;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: util.c,v 1.56 2020/07/03 08:02:55 rillig Exp $ */
|
||||
/* $NetBSD: util.c,v 1.57 2020/07/03 08:13:23 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Missing stuff from OS's
|
||||
@ -8,11 +8,11 @@
|
||||
#endif
|
||||
|
||||
#ifndef MAKE_NATIVE
|
||||
static char rcsid[] = "$NetBSD: util.c,v 1.56 2020/07/03 08:02:55 rillig Exp $";
|
||||
static char rcsid[] = "$NetBSD: util.c,v 1.57 2020/07/03 08:13:23 rillig Exp $";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: util.c,v 1.56 2020/07/03 08:02:55 rillig Exp $");
|
||||
__RCSID("$NetBSD: util.c,v 1.57 2020/07/03 08:13:23 rillig Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -410,7 +410,7 @@ size_t
|
||||
strftime(char *buf, size_t len, const char *fmt, const struct tm *tm)
|
||||
{
|
||||
static char months[][4] = {
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: var.c,v 1.234 2020/07/03 08:02:55 rillig Exp $ */
|
||||
/* $NetBSD: var.c,v 1.235 2020/07/03 08:13:23 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -69,14 +69,14 @@
|
||||
*/
|
||||
|
||||
#ifndef MAKE_NATIVE
|
||||
static char rcsid[] = "$NetBSD: var.c,v 1.234 2020/07/03 08:02:55 rillig Exp $";
|
||||
static char rcsid[] = "$NetBSD: var.c,v 1.235 2020/07/03 08:13:23 rillig Exp $";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: var.c,v 1.234 2020/07/03 08:02:55 rillig Exp $");
|
||||
__RCSID("$NetBSD: var.c,v 1.235 2020/07/03 08:13:23 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
@ -2462,7 +2462,7 @@ VarStrftime(const char *fmt, int zulu, time_t utc)
|
||||
if (!*fmt)
|
||||
fmt = "%c";
|
||||
strftime(buf, sizeof(buf), fmt, zulu ? gmtime(&utc) : localtime(&utc));
|
||||
|
||||
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
return bmake_strdup(buf);
|
||||
}
|
||||
@ -3561,7 +3561,7 @@ ApplyModifiers(char *nstr, const char *tstr,
|
||||
cp = tstr + 1; /* make sure it is set */
|
||||
if (STRMOD_MATCHX(tstr, "range", 5)) {
|
||||
int n;
|
||||
|
||||
|
||||
if (tstr[5] == '=') {
|
||||
n = strtoul(&tstr[6], &ep, 10);
|
||||
cp = ep;
|
||||
|
Loading…
Reference in New Issue
Block a user