Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make: declare all common symbols in headers, un...



details:   https://anonhg.NetBSD.org/src/rev/b6bf57b66714
branches:  trunk
changeset: 374044:b6bf57b66714
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Mar 28 14:39:31 2023 +0000

description:
make: declare all common symbols in headers, unexport others

No functional change.

diffstat:

 usr.bin/make/main.c  |  6 +++---
 usr.bin/make/make.h  |  5 ++++-
 usr.bin/make/meta.c  |  4 +---
 usr.bin/make/trace.c |  6 +++---
 usr.bin/make/var.c   |  6 ++----
 5 files changed, 13 insertions(+), 14 deletions(-)

diffs (121 lines):

diff -r b4929896a36f -r b6bf57b66714 usr.bin/make/main.c
--- a/usr.bin/make/main.c       Tue Mar 28 14:38:29 2023 +0000
+++ b/usr.bin/make/main.c       Tue Mar 28 14:39:31 2023 +0000
@@ -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
 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 */
diff -r b4929896a36f -r b6bf57b66714 usr.bin/make/make.h
--- a/usr.bin/make/make.h       Tue Mar 28 14:38:29 2023 +0000
+++ b/usr.bin/make/make.h       Tue Mar 28 14:39:31 2023 +0000
@@ -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>
diff -r b4929896a36f -r b6bf57b66714 usr.bin/make/meta.c
--- a/usr.bin/make/meta.c       Tue Mar 28 14:38:29 2023 +0000
+++ b/usr.bin/make/meta.c       Tue Mar 28 14:39:31 2023 +0000
@@ -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
 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"
 
diff -r b4929896a36f -r b6bf57b66714 usr.bin/make/trace.c
--- a/usr.bin/make/trace.c      Tue Mar 28 14:38:29 2023 +0000
+++ b/usr.bin/make/trace.c      Tue Mar 28 14:39:31 2023 +0000
@@ -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",
diff -r b4929896a36f -r b6bf57b66714 usr.bin/make/var.c
--- a/usr.bin/make/var.c        Tue Mar 28 14:38:29 2023 +0000
+++ b/usr.bin/make/var.c        Tue Mar 28 14:39:31 2023 +0000
@@ -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)
 {



Home | Main Index | Thread Index | Old Index