make(1): improve type signature of Var_Export
This commit is contained in:
parent
0a54428996
commit
60660d5f35
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nonints.h,v 1.90 2020/08/08 13:00:07 rillig Exp $ */
|
||||
/* $NetBSD: nonints.h,v 1.91 2020/08/09 13:05:04 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -200,7 +200,7 @@ void Var_End(void);
|
||||
void Var_Stats(void);
|
||||
void Var_Dump(GNode *);
|
||||
void Var_ExportVars(void);
|
||||
void Var_Export(const char *, int);
|
||||
void Var_Export(const char *, Boolean);
|
||||
void Var_UnExport(const char *);
|
||||
|
||||
/* util.c */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: parse.c,v 1.249 2020/08/06 16:03:04 sjg Exp $ */
|
||||
/* $NetBSD: parse.c,v 1.250 2020/08/09 13:05:04 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -69,14 +69,14 @@
|
||||
*/
|
||||
|
||||
#ifndef MAKE_NATIVE
|
||||
static char rcsid[] = "$NetBSD: parse.c,v 1.249 2020/08/06 16:03:04 sjg Exp $";
|
||||
static char rcsid[] = "$NetBSD: parse.c,v 1.250 2020/08/09 13:05:04 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.249 2020/08/06 16:03:04 sjg Exp $");
|
||||
__RCSID("$NetBSD: parse.c,v 1.250 2020/08/09 13:05:04 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
@ -2020,7 +2020,7 @@ Parse_DoVar(char *line, GNode *ctxt)
|
||||
} else if (strcmp(line, MAKE_JOB_PREFIX) == 0) {
|
||||
Job_SetPrefix();
|
||||
} else if (strcmp(line, MAKE_EXPORTED) == 0) {
|
||||
Var_Export(cp, 0);
|
||||
Var_Export(cp, FALSE);
|
||||
}
|
||||
if (freeCp)
|
||||
free(cp);
|
||||
@ -3098,7 +3098,7 @@ Parse_File(const char *name, int fd)
|
||||
} else if (strncmp(cp, "export", 6) == 0) {
|
||||
for (cp += 6; isspace((unsigned char) *cp); cp++)
|
||||
continue;
|
||||
Var_Export(cp, 1);
|
||||
Var_Export(cp, TRUE);
|
||||
continue;
|
||||
} else if (strncmp(cp, "unexport", 8) == 0) {
|
||||
Var_UnExport(cp);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: var.c,v 1.440 2020/08/09 11:04:05 rillig Exp $ */
|
||||
/* $NetBSD: var.c,v 1.441 2020/08/09 13:05:04 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -69,14 +69,14 @@
|
||||
*/
|
||||
|
||||
#ifndef MAKE_NATIVE
|
||||
static char rcsid[] = "$NetBSD: var.c,v 1.440 2020/08/09 11:04:05 rillig Exp $";
|
||||
static char rcsid[] = "$NetBSD: var.c,v 1.441 2020/08/09 13:05:04 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.440 2020/08/09 11:04:05 rillig Exp $");
|
||||
__RCSID("$NetBSD: var.c,v 1.441 2020/08/09 13:05:04 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
@ -623,10 +623,14 @@ Var_ExportVars(void)
|
||||
|
||||
/*
|
||||
* This is called when .export is seen or .MAKE.EXPORTED is modified.
|
||||
*
|
||||
* It is also called when any exported variable is modified.
|
||||
* XXX: Is it really?
|
||||
*
|
||||
* str has the format "[-env|-literal] varname...".
|
||||
*/
|
||||
void
|
||||
Var_Export(const char *str, int isExport)
|
||||
Var_Export(const char *str, Boolean isExport)
|
||||
{
|
||||
VarExportFlags flags;
|
||||
char *val;
|
||||
|
Loading…
Reference in New Issue
Block a user