+#if defined __sferror && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, MacOS X, Cygwin */
+
+ {
+ /* Disable seek optimization for the next fseeko call. This tells the
+ following fseeko call to seek to the desired position directly, rather
+ than to seek to a block-aligned boundary. */
+ int saved_flags = stream->_flags & (__SOPT | __SNPT);
+ stream->_flags = (stream->_flags & ~__SOPT) | __SNPT;
+
+ result = fseeko (stream, pos, SEEK_SET);
+
+ stream->_flags = (stream->_flags & ~(__SOPT | __SNPT)) | saved_flags;
+ }
+ return result;
+
+#else
+