From 3fc55bba8ea9c79419a4f08d61be5a3ab7704d86 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Fri, 13 Nov 2009 11:08:30 -0500 Subject: [PATCH] Fix MinGW compilation, bug184. --- Changes | 2 ++ readme.pod | 8 ++++---- src/V3File.cpp | 6 ++++++ src/V3Options.cpp | 17 +++++++++++++++++ 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index 2d280dbd5..b6997f6fb 100644 --- a/Changes +++ b/Changes @@ -18,6 +18,8 @@ indicates the contributor was also the author of the fix; Thanks! *** Add VARHIDDEN warning when signal name hides module name. +**** Fix MinGW compilation, bug184. [by Shankar Giri] + **** Support optional cell parenthesis, bug179. [by Byron Bradley] **** Support for loop i++, ++i, i--, --i, bug175. [by Byron Bradley] diff --git a/readme.pod b/readme.pod index a320bf2e1..e08be3f11 100644 --- a/readme.pod +++ b/readme.pod @@ -43,11 +43,11 @@ The resulting executable will perform the actual simulation. This version of verilator has been built and tested on: - SuSE AMD64 i686-linux-2.6.5 + SuSE 11.1 AMD64 i686-linux-2.6.27, GCC 4.3.2 -Other users report success with Redhat Linux, Windows under Cygwin, Macs, -HPUX and Solaris. It should run with minor porting on any Linixish -platform. +Other users report success with Redhat Linux, Windows under Cygwin, Windows +under MinGW, Macs, HPUX and Solaris. It should run with minor porting on +any Linix-ish platform. =head1 INSTALLATION diff --git a/src/V3File.cpp b/src/V3File.cpp index 17c5df05f..a988079ed 100644 --- a/src/V3File.cpp +++ b/src/V3File.cpp @@ -146,7 +146,9 @@ inline void V3FileDependImp::writeTimes(const string& filename, const string& cm string cmdline = stripQuotes(cmdlineIn); *ofp<<"C \""<::iterator iter=m_filenameList.begin(); iter!=m_filenameList.end(); ++iter) { // Read stats of files we create after we're done making them (execpt for this file, of course) @@ -238,7 +240,11 @@ void V3File::createMakeDir() { static bool created = false; if (!created) { created = true; +#if !defined (__MINGW32__) mkdir(v3Global.opt.makeDir().c_str(), 0777); +#else + mkdir(v3Global.opt.makeDir().c_str()); +#endif } } diff --git a/src/V3Options.cpp b/src/V3Options.cpp index 7718ad3f1..cdb7f048d 100644 --- a/src/V3Options.cpp +++ b/src/V3Options.cpp @@ -23,7 +23,9 @@ #include "verilatedos.h" #include #include +#if !defined(__MINGW32__) #include +#endif #include #include #include @@ -318,7 +320,16 @@ void V3Options::setenvStr(const string& envvar, const string& value, const strin } else { UINFO(1,"export "<