bug-gnulib
[Top][All Lists]
Advanced

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

Re: close_used_without_requesting_gnulib_module_close


From: Paolo Bonzini
Subject: Re: close_used_without_requesting_gnulib_module_close
Date: Mon, 10 Aug 2009 21:29:00 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2

On 08/10/2009 09:02 PM, Sam Steingold wrote:
What does this mean?
I did not request the close module, and it is not clear why I should.

(in fact, I don't see why pulling uname should change the semantics of
close.
yes, uname requires gethostname, which requires sockets &c, so I see the
dependency chain, but I think what I see is a dependency *creep*, which
I have been complaining about ever since I started using gnulib).

No, gethostname does not require sockets &c, it just requires sys/socket.h.

IIRC, something like this:

diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index 93edb48..733c8b6 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -137,7 +137,7 @@
 #  define close rpl_close
 extern int close (int);
 # endif
-#elif @UNISTD_H_HAVE_WINSOCK2_H@
+#elif @UNISTD_H_HAVE_WINSOCK2_H@ &&(@GNULIB_SOCKET@ || @GNULIB_ACCEPT@)
 # undef close
 # define close close_used_without_requesting_gnulib_module_close
 #elif defined GNULIB_POSIXCHECK

was not considered safe (?), but I would like to have something like this indeed.

Paolo




reply via email to

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