mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-12 20:18:20 +00:00
use strftime instead of put_time for gcc 4.8 compatibility
This commit is contained in:
parent
eccc48c39f
commit
1c96a0b1d5
|
@ -22,7 +22,6 @@
|
||||||
#include "kernel/celltypes.h"
|
#include "kernel/celltypes.h"
|
||||||
|
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <iomanip>
|
|
||||||
|
|
||||||
USING_YOSYS_NAMESPACE
|
USING_YOSYS_NAMESPACE
|
||||||
PRIVATE_NAMESPACE_BEGIN
|
PRIVATE_NAMESPACE_BEGIN
|
||||||
|
@ -649,10 +648,12 @@ struct SimWorker : SimShared
|
||||||
return;
|
return;
|
||||||
|
|
||||||
vcdfile << stringf("$version %s $end\n", yosys_version_str);
|
vcdfile << stringf("$version %s $end\n", yosys_version_str);
|
||||||
vcdfile << stringf("$date ");
|
|
||||||
std::time_t t = std::time(nullptr);
|
std::time_t t = std::time(nullptr);
|
||||||
vcdfile << std::put_time(std::localtime(&t), "%c %Z");
|
char mbstr[255];
|
||||||
vcdfile << stringf(" $end\n");
|
if (std::strftime(mbstr, sizeof(mbstr), "%c", std::localtime(&t))) {
|
||||||
|
vcdfile << stringf("$date ") << mbstr << stringf(" $end\n");
|
||||||
|
}
|
||||||
|
|
||||||
if (!timescale.empty())
|
if (!timescale.empty())
|
||||||
vcdfile << stringf("$timescale %s $end\n", timescale.c_str());
|
vcdfile << stringf("$timescale %s $end\n", timescale.c_str());
|
||||||
|
|
Loading…
Reference in a new issue