[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "dir" crashing oactve 3.2.0/mingw32
From: |
John W. Eaton |
Subject: |
Re: "dir" crashing oactve 3.2.0/mingw32 |
Date: |
Thu, 9 Jul 2009 15:05:23 -0400 |
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