This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Use STATIC_GETENV macro.


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
environment variable.

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]