www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/10/16/03:40:47

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10210160742.AA18845@clio.rice.edu>
Subject: Re: libc' getenv optimization (patch)
To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
Date: Wed, 16 Oct 2002 02:42:25 -0500 (CDT)
Cc: uue AT pauzner DOT dnttm DOT ru (Leonid Pauzner), djgpp-workers AT delorie DOT com
In-Reply-To: <Pine.SUN.3.91.1021016083157.20518H@is> from "Eli Zaretskii" at Oct 16, 2002 08:37:32 AM
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> It might be educational to compare what we use with the version in 
> djtzs203.zip, it just could be that some of the problems are already 
> solved there.  

A quick comparison shows me how it behaves (compared to ours) - and it
seems tzsetwall() is useless there also.  This means my current patch
would do the wrong thing if someone called tzsetwall() before a
time function with TZ set.  I think I see a fix; if we set lcl_is_set
to the value "1" after the return from tzsetwall() in tzset() then our 
caching will prevent future calls to getenv() unless someone changes 
the environment (or calls tzsetwall()) - same behavior.

mktime() and friends behavior look the same (probably slow).  

I wrote a much faster version for an early alpha of 2.00 (non iterative)
but it didn't do timezones, DST or leap seconds.  Do you want accurate
and compatible or fast? :-P  We went with standard code.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019