[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] fclose: don't fail on non-seekable input stream
From: |
Bruno Haible |
Subject: |
Re: [PATCH] fclose: don't fail on non-seekable input stream |
Date: |
Sun, 1 May 2011 12:38:59 +0200 |
User-agent: |
KMail/1.9.9 |
Simon Josefsson wrote:
> Eric Blake <address@hidden> writes:
>
> > --- a/modules/fclose
> > +++ b/modules/fclose
> > @@ -8,6 +8,9 @@ m4/fclose.m4
> > Depends-on:
> > stdio
> > close
> > +fflush
> > +freading
> > +fseeko
>
> I'm using the fclose module in a LGPLv2+ library and now I get:
>
> /home/jas/bin/gnulib-tool: *** incompatible license on modules:
> fflush GPL
> fpurge LGPL
> freading LGPL
> /home/jas/bin/gnulib-tool: *** Stop.
In fact, the dependency on 'fflush' should not be needed, because the fixes
of that module are not relevant here:
! Portability problems fixed by Gnulib:
! @itemize
! @item
! @code{fflush} followed by @code{fseek} or @code{fseeko}, applied to an input
! stream, should have the effect of positioning the underlying file descriptor.
! It doesn't do this on some platforms.
Not relevant, because after the fflush() comes an fclose().
! @item
! @code{fflush} on an input stream changes the position of the stream to the
! end of the previous buffer, on some platforms: mingw.
Likewise not relevant: the position of the stream is irrelevant in fclose().
! @item
! @code{fflush} on an input stream right after @code{ungetc} does not discard
! the @code{ungetc} buffer, on some platforms:
! MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, Cygwin 1.5.25-10.
Likewise not relevant, because no ungetc will occur between fflush() and
the fclose() that follows it.
So, the remaining added dependency is 'freading'. lib/stdio-impl.h is already
under LGPLv2+ (as part of the modules freadahead, freadptr, freadseek, fseeko,
ftello). lib/freading.c was under LGPLv2+ until 2007-10-07 and since then
only modified by me and Eric. I'm willing to relicense my changes unter LGPLv2+.
Eric?
Bruno
--
In memoriam Itzhak Katzenelson <http://en.wikipedia.org/wiki/Itzhak_Katzenelson>