bug-gnulib
[Top][All Lists]
Advanced

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

Re: close depends on fclose?!


From: Eric Blake
Subject: Re: close depends on fclose?!
Date: Thu, 21 Jul 2011 06:45:08 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.11

On 07/20/2011 06:00 PM, Bruno Haible wrote:
Hi Sam,

Why does close depend on fclose?!

The justification was in
<http://lists.gnu.org/archive/html/bug-gnulib/2008-10/msg00201.html>.

It seems that, close being a system call and fclose being a C library
function, the dependency should be the other way around: fclose should
depend on close, but _NOT_ vice versa.

Yes, 'fclose' also depends on 'close'.

E.g., CLISP uses close but never FILE or fclose et al, so, when pulling
close, which pulled fclose, I got all these files which I will NEVER need

The assumption was that the vast majority of programs use stdio and fclose().
But I agree with you, it would be more in line with the gnulib principles
to let the programmer who needs specific features from fclose() to explicitly
request the 'fclose' module.

Any objections to removing this dependency?

None by me, as long as the fdopen/fclose pair still works on mingw sockets.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

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