From: Roland McGrath Date: Thu, 23 Aug 2001 00:51:01 +0000 (+0000) Subject: 2001-08-22 Roland McGrath X-Git-Tag: cvs/glibc-2-2-5~399 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e225a4442bd3d9324a20491064f5227bc4232d34;p=thirdparty%2Fglibc.git 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. --- diff --git a/sysdeps/generic/dl-environ.c b/sysdeps/generic/dl-environ.c index 9b317548ec0..7a3da0c4b5f 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; }