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:
parent
7aff1adf99
commit
11d7cbd3e2
|
|
@ -880,7 +880,16 @@ static PLI_INT32 sys_fseek_calltf(ICARUS_VPI_CONST PLI_BYTE8*name)
|
|||
}
|
||||
|
||||
val.format = vpiIntVal;
|
||||
#if defined(__GNUC__)
|
||||
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);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue