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: Sam Steingold
Subject: Re: close_used_without_requesting_gnulib_module_close
Date: Mon, 10 Aug 2009 16:08:27 -0400

On Mon, Aug 10, 2009 at 3:29 PM, Paolo Bonzini<address@hidden> wrote:
> 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.

then I do not see why close has to be redefined.

> 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.

well, maybe it is time to apply your patch...


-- 
Sam Steingold <http://sds.podval.org>




reply via email to

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