diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2016-03-13 18:34:22 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2016-03-13 18:34:22 +0000 |
commit | 8a59d71f31abaa642f02dbeac92ab61c3cfcb3e1 (patch) | |
tree | 0579de35b795570fbe1c5a9065453eb9f30f3a66 /lib/libc/stdlib | |
parent | e028b5ad03d3421ea9ae9ef0d16f68d503f04315 (diff) |
environ and __progname are not declared in a public header; declare them
in libc's hidden/stdlib.h instead of in each .c file that needs one
ok deraadt@ gsoares@ mpi@
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r-- | lib/libc/stdlib/getenv.c | 3 | ||||
-rw-r--r-- | lib/libc/stdlib/malloc.c | 4 | ||||
-rw-r--r-- | lib/libc/stdlib/setenv.c | 3 | ||||
-rw-r--r-- | lib/libc/stdlib/system.c | 4 |
4 files changed, 4 insertions, 10 deletions
diff --git a/lib/libc/stdlib/getenv.c b/lib/libc/stdlib/getenv.c index 6ddad9225a3..054497b4320 100644 --- a/lib/libc/stdlib/getenv.c +++ b/lib/libc/stdlib/getenv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getenv.c,v 1.11 2015/09/13 08:31:47 guenther Exp $ */ +/* $OpenBSD: getenv.c,v 1.12 2016/03/13 18:34:21 guenther Exp $ */ /* * Copyright (c) 1987, 1993 * The Regents of the University of California. All rights reserved. @@ -45,7 +45,6 @@ char * __findenv(const char *name, int len, int *offset) { - extern char **environ; int i; const char *np; char **p, *cp; diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index d22fb38dae3..24b22854a5a 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc.c,v 1.182 2016/02/25 00:38:51 deraadt Exp $ */ +/* $OpenBSD: malloc.c,v 1.183 2016/03/13 18:34:21 guenther Exp $ */ /* * Copyright (c) 2008, 2010, 2011 Otto Moerbeek <otto@drijf.net> * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> @@ -208,8 +208,6 @@ static int malloc_active; /* status of malloc */ static u_char getrbyte(struct dir_info *d); -extern char *__progname; - #ifdef MALLOC_STATS void malloc_dump(int); PROTO_NORMAL(malloc_dump); diff --git a/lib/libc/stdlib/setenv.c b/lib/libc/stdlib/setenv.c index e55a1feb6f9..1182abdaa34 100644 --- a/lib/libc/stdlib/setenv.c +++ b/lib/libc/stdlib/setenv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: setenv.c,v 1.16 2015/09/13 08:31:47 guenther Exp $ */ +/* $OpenBSD: setenv.c,v 1.17 2016/03/13 18:34:21 guenther Exp $ */ /* * Copyright (c) 1987 Regents of the University of California. * All rights reserved. @@ -32,7 +32,6 @@ #include <stdlib.h> #include <string.h> -extern char **environ; static char **lastenv; /* last value of environ */ /* diff --git a/lib/libc/stdlib/system.c b/lib/libc/stdlib/system.c index de32d4328f7..fe718276b92 100644 --- a/lib/libc/stdlib/system.c +++ b/lib/libc/stdlib/system.c @@ -1,4 +1,4 @@ -/* $OpenBSD: system.c,v 1.11 2015/10/23 04:44:41 guenther Exp $ */ +/* $OpenBSD: system.c,v 1.12 2016/03/13 18:34:21 guenther Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. * All rights reserved. @@ -36,8 +36,6 @@ #include <unistd.h> #include <paths.h> -extern char **environ; - int system(const char *command) { |