Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/stdlib avoid nested extern declaration



details:   https://anonhg.NetBSD.org/src/rev/3e28f1bb5d6a
branches:  trunk
changeset: 500921:3e28f1bb5d6a
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Dec 20 18:38:30 2000 +0000

description:
avoid nested extern declaration

diffstat:

 lib/libc/stdlib/setenv.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (43 lines):

diff -r 8bffe2a4dbce -r 3e28f1bb5d6a lib/libc/stdlib/setenv.c
--- a/lib/libc/stdlib/setenv.c  Wed Dec 20 18:35:46 2000 +0000
+++ b/lib/libc/stdlib/setenv.c  Wed Dec 20 18:38:30 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: setenv.c,v 1.18 2000/01/22 22:19:20 mycroft Exp $      */
+/*     $NetBSD: setenv.c,v 1.19 2000/12/20 18:38:30 christos Exp $     */
 
 /*
  * Copyright (c) 1987, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)setenv.c   8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: setenv.c,v 1.18 2000/01/22 22:19:20 mycroft Exp $");
+__RCSID("$NetBSD: setenv.c,v 1.19 2000/12/20 18:38:30 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -60,6 +60,8 @@
 extern rwlock_t __environ_lock;
 #endif
 
+extern char **environ;
+
 /*
  * setenv --
  *     Set the value of the environmental variable "name" to be
@@ -71,7 +73,6 @@
        const char *value;
        int rewrite;
 {
-       extern char **environ;
        static int alloced;                     /* if allocated space before */
        char *c;
        const char *cc;
@@ -142,7 +143,6 @@
 unsetenv(name)
        const char *name;
 {
-       extern char **environ;
        char **p;
        int offset;
 



Home | Main Index | Thread Index | Old Index