[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: m4 compile problem on NetBSD

From: Eric Blake
Subject: Re: m4 compile problem on NetBSD
Date: Thu, 04 Dec 2014 16:09:39 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

[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

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]