From 35fdcec3af99b18eae96215a5534e2e913eb3054 Mon Sep 17 00:00:00 2001 From: sjg Date: Fri, 18 May 2012 02:28:16 +0000 Subject: [PATCH] Avoid nested extern declaration warnings --- usr.bin/make/make_malloc.c | 8 ++++---- usr.bin/make/var.c | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/usr.bin/make/make_malloc.c b/usr.bin/make/make_malloc.c index f0ccbc44bdaf..87f6840979e1 100644 --- a/usr.bin/make/make_malloc.c +++ b/usr.bin/make/make_malloc.c @@ -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 -__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 @@ -43,11 +43,11 @@ __RCSID("$NetBSD: make_malloc.c,v 1.6 2010/12/25 20:35:25 dholland Exp $"); * 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 --git a/usr.bin/make/var.c b/usr.bin/make/var.c index c386dbe5dc0f..1ee20d378999 100644 --- a/usr.bin/make/var.c +++ b/usr.bin/make/var.c @@ -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 #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 @@ Var_Export(char *str, int isExport) /* * This is called when .unexport[-env] is seen. */ +extern char **environ; + void Var_UnExport(char *str) { @@ -760,7 +762,6 @@ Var_UnExport(char *str) str += 8; unexport_env = (strncmp(str, "-env", 4) == 0); if (unexport_env) { - extern char **environ; static char **savenv; char **newenv;