octave-maintainers
[Top][All Lists]
Advanced

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

Re: "dir" crashing oactve 3.2.0/mingw32


From: Jaroslav Hajek
Subject: Re: "dir" crashing oactve 3.2.0/mingw32
Date: Fri, 24 Jul 2009 14:01:10 +0200

On Thu, Jul 9, 2009 at 9:05 PM, John W. Eaton<address@hidden> wrote:
> On  2-Jul-2009, Jaroslav Hajek wrote:
>
> | On Sat, Jun 27, 2009 at 6:56 PM, Benjamin Lindner<address@hidden> wrote:
> | > Hello,
> | >
> | > there have been some reports that simply calling "dir" crashes octave
> | > 3.2.0/mingw32 on some windows platforms.
> | > This has been tracked down to calls to strftime() failing with a "%T" 
> format
> | > specifier.
> | >
> | > Mingw uses the strftime function provided by microsoft C runtime library,
> | > and indeed msdn states that the following format specifiers are supported:
> | > aAbBcdHIjmMpSUwWxXyYzZ
> | >
> | > Mind that "T" is not supported, neither is "e".
> | >
> | > Don't ask me why MS does not simply ignore other format specifiers, but
> | > causes applications to crash. But changing "%T" to the equivalent 
> "%H:%M:%S"
> | > fixes the crashes in "dir".
> | > Since "e" is neither supported, I propose to change it to "d" (with "%e"
> | > being sprintf("%d",dayofmonth) and "%d" being sprintf("%02d",dayofmonth).
> | >
> | > See the attached changeset.
> | >
> | > It would be great to have this also fixed in 3.2.x
> | >
> | > benjamin
> |
> |
> | I don't think this is a good solution, since using %e in strftime will
> | still crash. It would be much better if the replacements were
> | conditionally (on windows) done directly in strftime.
>
> How about this change instead?
>
>  http://hg.savannah.gnu.org/hgweb/octave/rev/69d05d1a63b9
>
> jwe
>

I transplanted it to 3.2.x


-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

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