diff options
Diffstat (limited to 'libio/iofgetpos.c')
-rw-r--r-- | libio/iofgetpos.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libio/iofgetpos.c b/libio/iofgetpos.c index c8eea79e9b..4b50898a07 100644 --- a/libio/iofgetpos.c +++ b/libio/iofgetpos.c @@ -35,7 +35,7 @@ _IO_new_fgetpos (fp, posp) _IO_FILE *fp; _IO_fpos_t *posp; { - _IO_off_t pos; + _IO_off64_t pos; int result = 0; CHECK_FILE (fp, EOF); _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); @@ -56,6 +56,13 @@ _IO_new_fgetpos (fp, posp) #endif result = EOF; } + else if ((_IO_off64_t) (__typeof (posp->__pos)) pos != pos) + { +#ifdef EOVERFLOW + __set_errno (EOVERFLOW); +#endif + result = EOF; + } else { posp->__pos = pos; |