From: Bruno Haible Date: Sat, 25 Jan 2020 20:00:31 +0000 (+0100) Subject: lseek: Fix the override to not undo the effects of AC_SYS_LARGEFILE. X-Git-Tag: v1.0~4321 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=a51a5f5d24ce8e9be82c6a564576500d0f4d4428;p=gnulib.git lseek: Fix the override to not undo the effects of AC_SYS_LARGEFILE. Reported by John Donoghue in . * lib/lseek.c (rpl_lseek): When AC_SYS_LARGEFILE has enabled a 64-bit off_t on mingw, invoke _lseeki64 instead of lseek. --- diff --git a/ChangeLog b/ChangeLog index 2a1fdd6842..c70358c7f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2020-01-25 Bruno Haible + + lseek: Fix the override to not undo the effects of AC_SYS_LARGEFILE. + Reported by John Donoghue in + . + * lib/lseek.c (rpl_lseek): When AC_SYS_LARGEFILE has enabled a 64-bit + off_t on mingw, invoke _lseeki64 instead of lseek. + 2020-01-25 Bruno Haible iswdigit tests: Avoid test failure on Cygwin. diff --git a/lib/lseek.c b/lib/lseek.c index 013f665d3e..b24983977e 100644 --- a/lib/lseek.c +++ b/lib/lseek.c @@ -63,7 +63,7 @@ rpl_lseek (int fd, off_t offset, int whence) return -1; } #endif -#if _GL_WINDOWS_64_BIT_OFF_T +#if _GL_WINDOWS_64_BIT_OFF_T || (defined __MINGW32__ && defined _FILE_OFFSET_BITS && (_FILE_OFFSET_BITS == 64)) return _lseeki64 (fd, offset, whence); #else return lseek (fd, offset, whence);