Fix mkdir on MSYS2, msg2614.

This commit is contained in:
Wilson Snyder
2018-08-27 18:07:52 -04:00
parent 15abb4d590
commit c93d28050e
5 changed files with 21 additions and 7 deletions
+13
View File
@@ -26,6 +26,11 @@
#define _VERILATED_CPP_
#include "verilated_imp.h"
#include <cctype>
#include <sys/stat.h> // mkdir
#if defined(WIN32) || defined(__MINGW32__)
# include <direct.h> // mkdir
#endif
#define VL_VALUE_STRING_MAX_WIDTH 8192 ///< Max static char array for VL_VALUE_STRING
@@ -1741,6 +1746,14 @@ void Verilated::overWidthError(const char* signame) VL_MT_SAFE {
VL_FATAL_MT("unknown",0,"", msg.c_str());
}
void Verilated::mkdir(const char* dirname) VL_MT_UNSAFE {
#if defined(_WIN32) || defined(__MINGW32__)
::mkdir(dirname);
#else
::mkdir(dirname, 0777);
#endif
}
void Verilated::quiesce() VL_MT_SAFE {
#ifdef VL_THREADED
// Wait until all threads under this evaluation are quiet