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: Benjamin Lindner
Subject: Re: "dir" crashing oactve 3.2.0/mingw32
Date: Thu, 13 Aug 2009 18:35:58 +0200
User-agent: Thunderbird 2.0.0.22 (Windows/20090605)

Jaroslav Hajek wrote:
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


just back from holiday and catching up on unread emails.
thanks for the fix, it's of course the right thing to do.

benjamin



reply via email to

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