mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Fix MinGW compilation printing %lls, bug214
This commit is contained in:
+5
-5
@@ -531,17 +531,17 @@ public:
|
||||
}
|
||||
for (int word=VL_WORDS_I(nodep->num().minWidth())-1; word>0; word--) {
|
||||
// Only 32 bits - llx + long long here just to appease CPP format warning
|
||||
ofp()->printf(",0x%08llx", (long long)(nodep->num().dataWord(word)));
|
||||
ofp()->printf(",0x%08" VL_PRI64 "x", (long long)(nodep->num().dataWord(word)));
|
||||
}
|
||||
ofp()->printf(",0x%08llx)", (long long)(nodep->num().dataWord(0)));
|
||||
ofp()->printf(",0x%08" VL_PRI64 "x)", (long long)(nodep->num().dataWord(0)));
|
||||
} else if (nodep->isQuad()) {
|
||||
vluint64_t num = nodep->toUQuad();
|
||||
if (num<10) ofp()->printf("VL_ULL(%lld)", (long long)num);
|
||||
else ofp()->printf("VL_ULL(0x%llx)", (long long)num);
|
||||
if (num<10) ofp()->printf("VL_ULL(%" VL_PRI64 "d)", (long long)num);
|
||||
else ofp()->printf("VL_ULL(0x%" VL_PRI64 "x)", (long long)num);
|
||||
} else {
|
||||
uint32_t num = nodep->toUInt();
|
||||
if (num<10) puts(cvtToStr(num));
|
||||
else ofp()->printf("0x%llx", (long long)num);
|
||||
else ofp()->printf("0x%" VL_PRI64 "x", (long long)num);
|
||||
//Unneeded-Causes %lx format warnings:
|
||||
// if (!nodep->num().isSigned() && (num & (1UL<<31))) puts("U");
|
||||
}
|
||||
|
||||
+2
-2
@@ -161,7 +161,7 @@ inline void V3FileDependImp::writeTimes(const string& filename, const string& cm
|
||||
*ofp<<"# DESCR"<<"IPTION: Verilator output: Timestamp data for --skip-identical. Delete at will."<<endl;
|
||||
*ofp<<"C \""<<cmdline<<"\""<<endl;
|
||||
|
||||
#ifndef __WIN32
|
||||
#ifndef _WIN32
|
||||
sync(); // Push files so sizes look correct
|
||||
#endif
|
||||
for (set<DependFile>::iterator iter=m_filenameList.begin();
|
||||
@@ -258,7 +258,7 @@ void V3File::createMakeDir() {
|
||||
static bool created = false;
|
||||
if (!created) {
|
||||
created = true;
|
||||
#ifndef __WIN32
|
||||
#ifndef _WIN32
|
||||
mkdir(v3Global.opt.makeDir().c_str(), 0777);
|
||||
#else
|
||||
mkdir(v3Global.opt.makeDir().c_str());
|
||||
|
||||
+3
-3
@@ -23,7 +23,7 @@
|
||||
#include "verilatedos.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#if !defined(__WIN32)
|
||||
#ifndef _WIN32
|
||||
# include <sys/utsname.h>
|
||||
#endif
|
||||
#include <cctype>
|
||||
@@ -330,7 +330,7 @@ void V3Options::setenvStr(const string& envvar, const string& value, const strin
|
||||
} else {
|
||||
UINFO(1,"export "<<envvar<<"="<<value<<endl);
|
||||
}
|
||||
#ifndef __WIN32
|
||||
#ifndef _WIN32
|
||||
setenv(envvar.c_str(),value.c_str(),true);
|
||||
#else
|
||||
//setenv() replaced by putenv() in MinGW environment. Prototype is different
|
||||
@@ -367,7 +367,7 @@ string V3Options::getenvSYSTEMC_ARCH() {
|
||||
// Hardcoded with MINGW current version. Would like a better way.
|
||||
string sysname = "MINGW32_NT-5.0";
|
||||
var = "mingw32";
|
||||
#elsif defined (__WIN32)
|
||||
#elsif defined (_WIN32)
|
||||
string sysname = "WIN32";
|
||||
var = "win32";
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user