"dir" crashing oactve 3.2.0/mingw32
Benjamin Lindner
lindnerben at gmx.net
Sat Jun 27 11:56:57 CDT 2009
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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: strftime-mscrt.patch
Url: https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20090627/88ab24b0/attachment.ksh
More information about the Octave-maintainers
mailing list