Re: Building sharutils 4.13.4 with MinGW

Eli Zaretskii <[email protected]>
Newsgroups gmane.comp.gnu.utils.bugs
Message-ID <[email protected]>
> Date: Mon, 08 Apr 2013 10:07:32 -0700
> From: Bruce Korb <[email protected]>
> CC: [email protected], [email protected]
> 
> On 04/08/13 08:56, Eli Zaretskii wrote:
> >> Thanks, I didn't know about TZNAME_MAX.  (It doesn't exist on Windows,
> >> FWIW.)
> >
> > For the record: the last sentence is incorrect -- latest versions of
> > Windows headers do define TZNAME_MAX, with a value of 10.  But that
> > value is clearly insufficient, because strftime on Windows adds
> > something like "Daylight Time" to the name of the zone, which enlarges
> > it quite a bit.
> 
> I settled on 60.  Is that enough to cover any conceivable result?

Yes, I think so.

> Unfortunately, the result is "0" to indicate failure, yielding no
> information about how much space I ought to have had.  I could do
> the loop over and over until something was "big enough", but instead
> if it takes more than 60, then you just don't get the submitter name.
> Go live someplace that uses a smaller time zone name. ;)

It might be a good alternative to fall back on %z, which has a
predictable fixed limit, if %Z fails.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.