standards/172273: unsetenv(3) issue according to autoconf
Andrey Chernov
ache at vniz.net
Tue Oct 2 16:30:25 UTC 2012
The following reply was made to PR standards/172273; it has been noted by GNATS.
From: Andrey Chernov <ache at vniz.net>
To: Ed Maste <emaste at FreeBSD.org>
Cc: FreeBSD-gnats-submit at FreeBSD.org
Subject: Re: standards/172273: unsetenv(3) issue according to autoconf
Date: Tue, 02 Oct 2012 20:29:33 +0400
This is a multi-part message in MIME format.
--------------050507030501080408080306
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
On 02.10.2012 20:08, Andrey Chernov wrote:
> Attached simple patch should fix this issue (failing on test 3).
Oops, see more correct version attached.
--------------050507030501080408080306
Content-Type: text/plain; charset=windows-1251;
name="getenv.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="getenv.patch"
--- getenv.c.old 2012-10-02 20:01:33.000000000 +0400
+++ getenv.c 2012-10-02 20:25:47.000000000 +0400
@@ -675,11 +675,13 @@
/* Deactivate specified variable. */
envNdx = envVarsTotal - 1;
- if (__findenv(name, nameLen, &envNdx, true) != NULL) {
+ /* Remove all occurences */
+ while (__findenv(name, nameLen, &envNdx, true) != NULL) {
envVars[envNdx].active = false;
if (envVars[envNdx].putenv)
__remove_putenv(envNdx);
__rebuild_environ(envActive - 1);
+ envNdx = envVarsTotal - 1;
}
return (0);
--------------050507030501080408080306--
More information about the freebsd-standards
mailing list