[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: |
Thu, 2 Jul 2009 11:52:03 +0200 |
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.
regards
--
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
- Re: "dir" crashing oactve 3.2.0/mingw32,
Jaroslav Hajek <=