Re: Compiling GNU Sharutils on NetBSD

HIRAMATSU Yoshifumi <[email protected]> Tue, 07 Apr 2015 03:26:50 +0900
Newsgroups gmane.comp.gnu.utils.bugs,gmane.comp.lib.gnulib.bugs
Message-ID <[email protected]>
On Mon, 06 Apr 2015 23:54:07 +0900,
Eric Blake <[email protected]> wrote:
>
> When did this change occur?  Yes, gnulib should be taught to support it.

Changed when NetBSD 6 is released.

> Thanks for the patch; hopefully someone with more NetBSD familiarity
> will confirm if this works for both pre- and post-change NetBSD FILE
> definitions; otherwise, we may need to be a bit more careful to ensure
> that we aren't breaking older systems.

Yes, I agree. My previous patch broke for NetBSD 5.

I modified the patch to use "__NetBSD_Version__" macro, tested and confirmed
that compile succeeded both 5 and 6.

--- lib/fseeko.c.orig	2015-04-05 22:42:44.000000000 +0900
+++ lib/fseeko.c	2015-04-05 22:42:52.000000000 +0900
@@ -125,7 +125,7 @@
       fp->_flags &= ~_IO_EOF_SEEN;
       fp->_offset = pos;
 #elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
-# if defined __CYGWIN__
+# if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000)
       /* fp_->_offset is typed as an integer.  */
       fp_->_offset = pos;
 # else


Kind regards,
HIRAMATSU, Yoshifumi