mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 16:29:25 +02:00
Changes to vvp/vpi_mcd.cc
Changed for"Microsoft Visual Studio Express 2015 RC Web" so vpi/pr723.v would pass.
This commit is contained in:
committed by
Stephen Williams
parent
4cf4cdabcd
commit
a3728dcf20
+15
-1
@@ -161,7 +161,14 @@ extern "C" PLI_UINT32 vpi_mcd_open(char *name)
|
||||
return 0; /* too many open mcd's */
|
||||
|
||||
got_entry:
|
||||
#if defined(__GNUC__)
|
||||
mcd_table[i].fp = fopen(name, "w");
|
||||
#else
|
||||
if (strcmp(name, "/dev/null") != 0)
|
||||
mcd_table[i].fp = fopen(name, "w");
|
||||
else
|
||||
mcd_table[i].fp = fopen("nul", "w");
|
||||
#endif
|
||||
if(mcd_table[i].fp == NULL)
|
||||
return 0;
|
||||
mcd_table[i].filename = strdup(name);
|
||||
@@ -298,7 +305,14 @@ extern "C" PLI_INT32 vpi_fopen(const char*name, const char*mode)
|
||||
}
|
||||
|
||||
got_entry:
|
||||
fd_table[i].fp = fopen(name, mode);
|
||||
#ifndef _MSC_VER
|
||||
fd_table[i].fp = fopen(name, mode);
|
||||
#else // Changed for MSVC++ so vpi/pr723.v will pass.
|
||||
if(strcmp(name, "/dev/null") != 0)
|
||||
fd_table[i].fp = fopen(name, mode);
|
||||
else
|
||||
fd_table[i].fp = fopen("nul", mode);
|
||||
#endif
|
||||
if (fd_table[i].fp == NULL) return 0;
|
||||
fd_table[i].filename = strdup(name);
|
||||
return ((1U<<31)|i);
|
||||
|
||||
Reference in New Issue
Block a user