Changes to vpi/sys_fileio.c

Changed for "Microsoft Visual Studio Express 2015 RC Web" so running vvp on pr2800985a.v won't crash.
This commit is contained in:
Frederick C. Kurz
2015-07-22 09:53:42 -07:00
committed by Stephen Williams
parent 7aff1adf99
commit 11d7cbd3e2
+9
View File
@@ -880,7 +880,16 @@ static PLI_INT32 sys_fseek_calltf(ICARUS_VPI_CONST PLI_BYTE8*name)
} }
val.format = vpiIntVal; val.format = vpiIntVal;
#if defined(__GNUC__)
val.value.integer = fseek(fp, offset, oper); val.value.integer = fseek(fp, offset, oper);
#else
if(oper < 0) {
val.value.integer = EOF;
errno = EINVAL;
}
else
val.value.integer = fseek(fp, offset, oper);
#endif
vpi_put_value(callh, &val, 0 , vpiNoDelay); vpi_put_value(callh, &val, 0 , vpiNoDelay);
return 0; return 0;