mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-22 05:47:31 +02:00
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:
committed by
Stephen Williams
parent
7aff1adf99
commit
11d7cbd3e2
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user