1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00

Merge from stable-2.2

This commit is contained in:
Andy Wingo 2019-08-02 15:04:20 +02:00
commit b3b14fe6a2

View file

@ -626,18 +626,13 @@ static scm_t_off
fport_seek (SCM port, scm_t_off offset, int whence) fport_seek (SCM port, scm_t_off offset, int whence)
{ {
scm_t_fport *fp = SCM_FSTREAM (port); scm_t_fport *fp = SCM_FSTREAM (port);
off_t_or_off64_t result; scm_t_off result;
result = lseek_or_lseek64 (fp->fdes, offset, whence); result = lseek (fp->fdes, offset, whence);
if (result == -1) if (result == -1)
scm_syserror ("fport_seek"); scm_syserror ("fport_seek");
/* Check to make sure the result fits in scm_t_off,
which might be smaller than off_t_or_off64_t. */
if (result > SCM_T_OFF_MAX)
scm_num_overflow ("fport_seek");
return result; return result;
} }