delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/10/13/02:07:18

Date: Sun, 13 Oct 2002 08:04:01 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: profiling with DJGPP
In-Reply-To: <3da885d1.sandmann@clio.rice.edu>
Message-ID: <Pine.SUN.3.91.1021013080125.11821E-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, 12 Oct 2002, Charles Sandmann wrote:

> A casual inspection of ctime.c (I'm not an expert) looks like to me that
> at least the first comparison of lcl_is_set should be !=0 instead of >0 
> to cache the case where TZ is not set.

lcl_is_set is set to -1 by tzsetwall.  I think it's important to not use 
cached values if they were set by tzsetwall, since it looks at files, and 
files could have changed behind our back.  It's the same logic as with 
not calling getenv, except that with files we have no easy way of knowing 
when the relevant files stay put.

I think the _real_ fix is to set TZ.  There are no good reasons why not.

- Raw text -


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