Re: /bzr/squid3/trunk/ r10096: Bug 2778: fix linking issues using SunCC

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Mon, 09 Nov 2009 22:25:06 +1300

Kinkie wrote:
> Ok, I will asap.
> Regarding the #defines: autoconf does it, so it's probably the most
> portable way, and it doesn't hurt anyways.
> I wouldn't go as far as defining this in a style guide, but converting
> stuff as it is touched may help portability-wise.
> the first input to me to do this was because sun cpp complained about
> non-constant symbols as I converted from #ifdef to #if. It was not the
> root cause, but I decided to let it in for the above reasons.

Nevermind. Halfway through the unit-tests to check for viability I
re-discovered we do indeed have to define to one, zero, or undefined for
#if to work.

Amos

>
> On 11/7/09, Amos Jeffries <squid3_at_treenet.co.nz> wrote:
>> Francesco Chemolli wrote:
>>> ------------------------------------------------------------
>>> revno: 10096
>>> committer: Francesco Chemolli <kinkie_at_squid-cache.org>
>>> branch nick: trunk
>>> timestamp: Fri 2009-11-06 17:22:16 +0100
>>> message:
>>> Bug 2778: fix linking issues using SunCC
>>>
>>> SunCC doesn't handle inline extern functions, and misses some duplicate
>>> code detection features gcc has; as a result squid-specific operator new
>>> and
>>> operator delete get defined multiple times and fail linking.
>>> Implemented a compiler-specific workaround by de-inlining the code.
>>> Improved Solaris OS detection logic (and dropped _SQUID_SUNOS_ which was
>>> not
>>> used anyways)
>>> modified:
>>> compat/compat.h
>>> compat/os/solaris.h
>>> compat/osdetect.h
>>> include/SquidNew.h
>>> src/SquidNew.cc
>>>
>> Oops. _SQUID_SUNOS_ is used. _SQUID_SUN_ was the unused one.
>>
>> Please also revert the bit changing compat/compat.h. It's not relevant.
>>
>> Also, were the added 1's in osdetect.h actually required? There may be
>> many other places in the code hitting the same problem if so.
>> (I'm now converting my old pre-compiler test app into unit-tests so we
>> can easily identify this)
>>
>> Amos
>> --
>> Please be using
>> Current Stable Squid 2.7.STABLE7 or 3.0.STABLE20
>> Current Beta Squid 3.1.0.14
>>
>
>

-- 
Please be using
   Current Stable Squid 2.7.STABLE7 or 3.0.STABLE20
   Current Beta Squid 3.1.0.14
Received on Mon Nov 09 2009 - 09:25:35 MST

This archive was generated by hypermail 2.2.0 : Tue Nov 10 2009 - 12:00:04 MST