bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnulib] Re: access to Solaris2.5 system? [Re: strftime merge f


From: Paul Eggert
Subject: Re: [Bug-gnulib] Re: access to Solaris2.5 system? [Re: strftime merge from Emacs
Date: 08 Jun 2003 23:59:58 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Jim Meyering <address@hidden> writes:

> +/* This is a wrapper for tzset. It is used only on systems for which
> +   tzset may clobber the static buffer used for localtime's result.
> +   Save and restore the contents of the buffer used for localtime's
> +   result around the call to tzset.  */
> +void
> +rpl_tzset (void)
> +{
> +  struct tm save;
> +
> +  if (! localtime_buffer_addr)
> +    {
> +      time_t t = 0;
> +      localtime_buffer_addr = localtime (&t);
> +    }
> +
> +  save = *localtime_buffer_addr;
> +  tzset ();
> +  *localtime_buffer_addr = save;
>  }


Don't we still have the problem the first time that rpl_tzset is
called?  rpl_tzset still clobbers the localtime buffer in that case.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]