X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=lib%2Ffseeko.c;fp=lib%2Ffseeko.c;h=5bd7d66d9029460141e655743df3978ad648a0ab;hb=dc02bf0d39a3ae0d90d9b7b0feb32c2cc7cdff86;hp=56cdc596a6b195cc179102030cb91c27d3eb8e7f;hpb=a8a88eddaa90432e6ec1b8d9d5c9842bc91afd1d;p=debian%2Fgzip diff --git a/lib/fseeko.c b/lib/fseeko.c index 56cdc59..5bd7d66 100644 --- a/lib/fseeko.c +++ b/lib/fseeko.c @@ -33,9 +33,9 @@ fseeko (FILE *fp, off_t offset, int whence) #endif #if _GL_WINDOWS_64_BIT_OFF_T # undef fseeko -# if HAVE__FSEEKI64 /* msvc, mingw64 */ +# if HAVE__FSEEKI64 && HAVE_DECL__FSEEKI64 /* msvc, mingw since msvcrt8.0, mingw64 */ # define fseeko _fseeki64 -# else /* mingw */ +# else /* mingw before msvcrt8.0 */ # define fseeko fseeko64 # endif #endif @@ -47,7 +47,8 @@ fseeko (FILE *fp, off_t offset, int whence) #endif /* These tests are based on fpurge.c. */ -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 + /* GNU libc, BeOS, Haiku, Linux libc5 */ if (fp->_IO_read_end == fp->_IO_read_ptr && fp->_IO_write_ptr == fp->_IO_write_base && fp->_IO_save_base == NULL) @@ -123,7 +124,8 @@ fseeko (FILE *fp, off_t offset, int whence) return -1; } -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 + /* GNU libc, BeOS, Haiku, Linux libc5 */ fp->_flags &= ~_IO_EOF_SEEN; fp->_offset = pos; #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__