bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Building sharutils 4.13.4 with MinGW


From: Eli Zaretskii
Subject: Re: Building sharutils 4.13.4 with MinGW
Date: Mon, 08 Apr 2013 20:23:01 +0300

> Date: Mon, 08 Apr 2013 10:07:32 -0700
> From: Bruce Korb <address@hidden>
> CC: address@hidden, address@hidden
> 
> 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.



reply via email to

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