Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make Avoid nested extern declaration warnings



details:   https://anonhg.NetBSD.org/src/rev/1da30c6811d8
branches:  trunk
changeset: 779311:1da30c6811d8
user:      sjg <sjg%NetBSD.org@localhost>
date:      Fri May 18 02:28:16 2012 +0000

description:
Avoid nested extern declaration warnings

diffstat:

 usr.bin/make/make_malloc.c |  8 ++++----
 usr.bin/make/var.c         |  9 +++++----
 2 files changed, 9 insertions(+), 8 deletions(-)

diffs (75 lines):

diff -r ed76d85a21cc -r 1da30c6811d8 usr.bin/make/make_malloc.c
--- a/usr.bin/make/make_malloc.c        Thu May 17 21:59:49 2012 +0000
+++ b/usr.bin/make/make_malloc.c        Fri May 18 02:28:16 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make_malloc.c,v 1.6 2010/12/25 20:35:25 dholland Exp $ */
+/*     $NetBSD: make_malloc.c,v 1.7 2012/05/18 02:28:16 sjg Exp $      */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
 
 #ifdef MAKE_NATIVE
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: make_malloc.c,v 1.6 2010/12/25 20:35:25 dholland Exp $");
+__RCSID("$NetBSD: make_malloc.c,v 1.7 2012/05/18 02:28:16 sjg Exp $");
 #endif
 
 #include <stdio.h>
@@ -43,11 +43,11 @@
  * enomem --
  *     die when out of memory.
  */
+extern char *progname;
+
 static void
 enomem(void)
 {
-       extern char *progname;
-
        (void)fprintf(stderr, "%s: %s.\n", progname, strerror(ENOMEM));
        exit(2);
 }
diff -r ed76d85a21cc -r 1da30c6811d8 usr.bin/make/var.c
--- a/usr.bin/make/var.c        Thu May 17 21:59:49 2012 +0000
+++ b/usr.bin/make/var.c        Fri May 18 02:28:16 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.168 2012/04/24 20:26:58 sjg Exp $    */
+/*     $NetBSD: var.c,v 1.169 2012/05/18 02:28:16 sjg Exp $    */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.168 2012/04/24 20:26:58 sjg Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.169 2012/05/18 02:28:16 sjg 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.168 2012/04/24 20:26:58 sjg Exp $");
+__RCSID("$NetBSD: var.c,v 1.169 2012/05/18 02:28:16 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -742,6 +742,8 @@
 /*
  * This is called when .unexport[-env] is seen.
  */
+extern char **environ;
+
 void
 Var_UnExport(char *str)
 {
@@ -760,7 +762,6 @@
     str += 8;
     unexport_env = (strncmp(str, "-env", 4) == 0);
     if (unexport_env) {
-       extern char **environ;
        static char **savenv;
        char **newenv;
 



Home | Main Index | Thread Index | Old Index