[adding gnulib] On 12/04/2014 03:36 PM, Stephen Fisher wrote: > m4 1.4.17 fails to compile on NetBSD 6.1.5 amd64: > > fseeko.c: In function 'rpl_fseeko': > fseeko.c:143:22: error: incompatible types when assigning to type > '__off_t' from type 'fpos_t' > > The attached patch allows compilation to complete.
Thanks for the report. This should be fixed in upstream gnulib, so that it will be picked up by other projects also using gnulib's fseeko replacement. (Meanwhile, it would be nice if NetBSD could fix their fseeko() bugs to not need replacing by gnulib). > > > fseeko.c.patch > > > --- lib/fseeko.c 2014-12-04 15:23:21.000000000 -0700 > +++ lib/fseeko.c.orig 2014-12-04 15:08:07.000000000 -0700 > @@ -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__ || __NetBSD__ > +# if defined __CYGWIN__ This doesn't look quite right. It means that NetBSD has changed their definition of FILE over time, and that to compile on both pre- and post-patch NetBSD, we probably need some sort of configure-time probe for the correct field and type to be assigning, rather than a blind trust of the platform being compiled for. > /* fp_->_offset is typed as an integer. */ > fp_->_offset = pos; > # else > -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature