make: declare all common symbols in headers, unexport others

No functional change.
This commit is contained in:
rillig 2023-03-28 14:39:31 +00:00
parent 5c90bbdf3b
commit 3c2f2cbb8f
5 changed files with 13 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.592 2023/02/25 00:07:08 rillig Exp $ */
/* $NetBSD: main.c,v 1.593 2023/03/28 14:39:31 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -111,7 +111,7 @@
#include "trace.h"
/* "@(#)main.c 8.3 (Berkeley) 3/19/94" */
MAKE_RCSID("$NetBSD: main.c,v 1.592 2023/02/25 00:07:08 rillig Exp $");
MAKE_RCSID("$NetBSD: main.c,v 1.593 2023/03/28 14:39:31 rillig Exp $");
#if defined(MAKE_NATIVE) && !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
"The Regents of the University of California. "
@ -125,7 +125,7 @@ bool allPrecious; /* .PRECIOUS given on line by itself */
bool deleteOnError; /* .DELETE_ON_ERROR: set */
static int maxJobTokens; /* -j argument */
bool enterFlagObj; /* -w and objdir != srcdir */
static bool enterFlagObj; /* -w and objdir != srcdir */
static int jp_0 = -1, jp_1 = -1; /* ends of parent job pipe */
bool doing_depend; /* Set while reading .depend */

View File

@ -1,4 +1,4 @@
/* $NetBSD: make.h,v 1.318 2023/03/09 07:06:43 rillig Exp $ */
/* $NetBSD: make.h,v 1.319 2023/03/28 14:39:31 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -768,6 +768,8 @@ typedef struct CmdOpts {
} CmdOpts;
extern CmdOpts opts;
extern bool forceJobs;
extern char **environ;
/* arch.c */
void Arch_Init(void);
@ -1179,6 +1181,7 @@ pp_skip_hspace(char **pp)
}
#if defined(lint)
extern void do_not_define_rcsid(void); /* for lint */
# define MAKE_RCSID(id) extern void do_not_define_rcsid(void)
#elif defined(MAKE_NATIVE)
# include <sys/cdefs.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: meta.c,v 1.204 2023/02/28 06:04:28 sjg Exp $ */
/* $NetBSD: meta.c,v 1.205 2023/03/28 14:39:31 rillig Exp $ */
/*
* Implement 'meta' mode.
@ -83,8 +83,6 @@ static bool metaCmpFilter = false; /* do we have CMP_FILTER ? */
static bool metaCurdirOk = false; /* write .meta in .CURDIR Ok? */
static bool metaSilent = false; /* if we have a .meta be SILENT */
extern bool forceJobs;
extern char **environ;
#define MAKE_META_PREFIX ".MAKE.META.PREFIX"

View File

@ -1,4 +1,4 @@
/* $NetBSD: trace.c,v 1.32 2022/03/26 14:02:40 rillig Exp $ */
/* $NetBSD: trace.c,v 1.33 2023/03/28 14:39:31 rillig Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -48,11 +48,11 @@
#include "job.h"
#include "trace.h"
MAKE_RCSID("$NetBSD: trace.c,v 1.32 2022/03/26 14:02:40 rillig Exp $");
MAKE_RCSID("$NetBSD: trace.c,v 1.33 2023/03/28 14:39:31 rillig Exp $");
static FILE *trfile;
static pid_t trpid;
const char *trwd;
static const char *trwd;
static const char evname[][4] = {
"BEG",

View File

@ -1,4 +1,4 @@
/* $NetBSD: var.c,v 1.1048 2023/03/09 06:49:37 rillig Exp $ */
/* $NetBSD: var.c,v 1.1049 2023/03/28 14:39:31 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -139,7 +139,7 @@
#include "metachar.h"
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
MAKE_RCSID("$NetBSD: var.c,v 1.1048 2023/03/09 06:49:37 rillig Exp $");
MAKE_RCSID("$NetBSD: var.c,v 1.1049 2023/03/28 14:39:31 rillig Exp $");
/*
* Variables are defined using one of the VAR=value assignments. Their
@ -786,8 +786,6 @@ Var_ExportVars(const char *varnames)
}
extern char **environ;
static void
ClearEnv(void)
{