www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/11/10/17:14:35

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10211102213.AA24361@clio.rice.edu>
Subject: Re: libc' getenv optimization (patch)
To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
Date: Sun, 10 Nov 2002 16:13:18 -0600 (CST)
Cc: uue AT pauzner DOT dnttm DOT ru (Leonid Pauzner), djgpp-workers AT delorie DOT com
In-Reply-To: <Pine.SUN.3.91.1021017072757.3848A-100000@is> from "Eli Zaretskii" at Oct 17, 2002 07:29:17 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

> > 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.
> 
> This change sounds okay to me.

Proposed patch:

C:\v204\djgpp\src\libc\ansi\time>more ctime.dif
*** ctime.c_ori Sun Jun  9 13:20:22 2002
--- ctime.c     Sun Nov 10 16:07:40 2002
*************** tzset(void)
*** 937,940 ****
--- 937,941 ----
    {
      tzsetwall();
+     lcl_is_set = 1;
      return;
    }

- Raw text -


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