Re: /bzr/squid3/trunk/ r10615: Define MSG_NOSIGNAL if it is missing.

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 08 Jul 2010 18:06:18 +1200

Alex Rousskov wrote:
> On 07/07/2010 05:14 PM, Amos Jeffries wrote:
>> On Wed, 07 Jul 2010 11:39:21 -0600, Alex Rousskov
>> <rousskov_at_measurement-factory.com> wrote:
>>> ------------------------------------------------------------
>>> revno: 10615
>>> committer: Alex Rousskov <rousskov_at_measurement-factory.com>
>>> branch nick: trunk
>>> timestamp: Wed 2010-07-07 11:39:21 -0600
>>> message:
>>> Define MSG_NOSIGNAL if it is missing.
>>>
>>> Solaris and possibly others do not provide this optional optimization.
>>> modified:
>>> src/fd.cc
>> As per your code comment. Yes please use compat/os/solaris.h for these.
>
> But what if other OSes need the same? The MSG_NOSIGNAL defining hack
> does not seem to be specific to Solaris.

The Solaris OS defines so far only seem to be shared by the older BSD OS
(OpenBSD, FreeBSD).

>
> Also, if I put this into compat/os/solaris.h or compat/*shared*h, it
> will suck in sys/types.h and sys/socket.h into every Squid source file,
> right? That also does not seem like a good idea...

sys/types.h is already sucked in through compat.
sys/socket.h is already sucked in through squid.h now.

The impact will be low. Though yes the socket.h really should not be
needed most places.

>
> On the other hand, creating a special compat/uds.h file for just one
> tiny hack that is used in only one place also seems like an overkill.

If its only needed in one place and multiple OS need it then that one
.cc file can be used as you do now and remove the comment.

If you still think it should be widely available, then compat is the place.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.5
Received on Thu Jul 08 2010 - 06:06:30 MDT

This archive was generated by hypermail 2.2.0 : Thu Jul 08 2010 - 12:00:08 MDT