mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
Windows/TimeValue.inc: Mute prefixed '0' on %d to emulate %e.
It fixes compatibility in llvm/test/Object/archive-toc.test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186142 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
da07e9df84
commit
99a8b54840
@ -49,6 +49,11 @@ std::string TimeValue::str() const {
|
|||||||
char Buffer[25];
|
char Buffer[25];
|
||||||
// FIXME: the windows version of strftime doesn't support %e
|
// FIXME: the windows version of strftime doesn't support %e
|
||||||
strftime(Buffer, 25, "%b %d %H:%M %Y", LT);
|
strftime(Buffer, 25, "%b %d %H:%M %Y", LT);
|
||||||
|
assert((Buffer[3] == ' ' && isdigit(Buffer[5]) && Buffer[6] == ' ') ||
|
||||||
|
"Unexpected format in strftime()!");
|
||||||
|
// Emulate %e on %d to mute '0'.
|
||||||
|
if (Buffer[4] == '0')
|
||||||
|
Buffer[4] = ' ';
|
||||||
return std::string(Buffer);
|
return std::string(Buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user