This is the mail archive of the
mailing list for the glibc project.
Re: [RFC] Use STATIC_GETENV macro.
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: OndÅej BÃlka <neleai at seznam dot cz>, libc-alpha at sourceware dot org
- Date: Sat, 09 Nov 2013 12:56:22 -0800
- Subject: Re: [RFC] Use STATIC_GETENV macro.
- Authentication-results: sourceware.org; auth=none
- References: <20131109103822 dot GA9173 at domone> <20131109112400 dot GB9173 at domone>
OndÅej BÃlka wrote:
> --- a/time/tzset.c
> +++ b/time/tzset.c
> @@ -407,7 +407,7 @@ tzset_internal (always, explicit)
> is_initialized = 1;
> /* Examine the TZ environment variable. */
> - tz = getenv ("TZ");
> + tz = STATIC_GETENV ("TZ");
This part, at least, looks wrong: the whole point
of tzset is to adjust to changes to the TZ
More generally, it's not clear that this change would
be a performance win in practice within glibc, even
where caching wouldn't introduce correctness issues.
I doubt whether we should export it to users.