From e225a4442bd3d9324a20491064f5227bc4232d34 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 23 Aug 2001 00:51:01 +0000 Subject: 2001-08-22 Roland McGrath * sysdeps/generic/dl-environ.c: Include and , and don't declare unsetenv or _environ directly. (unsetenv): Return int, not void. Use __environ instead of _environ. --- sysdeps/generic/dl-environ.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sysdeps/generic/dl-environ.c b/sysdeps/generic/dl-environ.c index 9b31754..7a3da0c 100644 --- a/sysdeps/generic/dl-environ.c +++ b/sysdeps/generic/dl-environ.c @@ -18,11 +18,10 @@ 02111-1307 USA. */ #include +#include +#include #include -extern char **_environ; -extern void unsetenv (const char *name); - /* Walk through the environment of the process and return all entries starting with `LD_'. */ char * @@ -51,13 +50,13 @@ _dl_next_ld_env_entry (char ***position) return result; } -void +int unsetenv (const char *name) { const size_t len = strlen (name); char **ep; - ep = _environ; + ep = __environ; while (*ep != NULL) if (!strncmp (*ep, name, len) && (*ep)[len] == '=') { @@ -71,4 +70,6 @@ unsetenv (const char *name) } else ++ep; + + return 0; } -- cgit v1.1