Module Name: src Committed By: sjg Date: Fri May 18 02:28:17 UTC 2012
Modified Files: src/usr.bin/make: make_malloc.c var.c Log Message: Avoid nested extern declaration warnings To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/make_malloc.c cvs rdiff -u -r1.168 -r1.169 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/make_malloc.c diff -u src/usr.bin/make/make_malloc.c:1.6 src/usr.bin/make/make_malloc.c:1.7 --- src/usr.bin/make/make_malloc.c:1.6 Sat Dec 25 20:35:25 2010 +++ src/usr.bin/make/make_malloc.c Fri May 18 02:28:16 2012 @@ -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 @@ __RCSID("$NetBSD: make_malloc.c,v 1.6 20 * 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); } Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.168 src/usr.bin/make/var.c:1.169 --- src/usr.bin/make/var.c:1.168 Tue Apr 24 20:26:58 2012 +++ src/usr.bin/make/var.c Fri May 18 02:28:16 2012 @@ -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 @@ 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;