On Tue, 10 Nov 2009 16:46:37 +0100, Kinkie <gkinkie_at_gmail.com> wrote:
> On Sat, Nov 7, 2009 at 2:28 AM, Amos Jeffries <squid3_at_treenet.co.nz>
wrote:
>> Francesco Chemolli wrote:
>>>
>>> ------------------------------------------------------------
>>> revno: 10095
>>> committer: Francesco Chemolli <kinkie_at_squid-cache.org>
>>> branch nick: trunk
>>> timestamp: Fri 2009-11-06 17:12:48 +0100
>>> message:
>>> Fixed linking convention mismatch in Asn ACL
>>> modified:
>>> src/acl/Asn.cc
>>>
>>
>> This is what SQUIDCEXTERN is for.
>> ... working towards not needing it as all code converges on C++ builds.
>
> I can confirm that SQUIDCEXTERN is not working here: the referred-to
> function are static, and they need C linkage as they are defined in a
> .cc file, but passed as pointers to the radix tree c library.
>
> Solutions I can see are:
> - leaving the extern "C" definition block as is (possbly remove the
> #ifdefs, as that file will always be compiled with c++)
> - un-static-ify the functions and let them pollute the namespace
> - convert the radix-tree library to c++ so no more C linkage will be
> needed.
>
> Opinions?
With the move to convenience libraries we have been taking the approach of
removing static for things which are in any of the library API. If it does
not need to be visible outside the convenience library then its defined
internal to the .cc instead and the static maybe kept.
Converting the radix code to C++ matches the end-goal of fully C++ code.
If you want to take it on go ahead. It is a larger change though and
outside the scope of simply fixing build issues.
Tumbling down to a second side project of implementing inside configure
'benchmark' micro- unit tests that compare performance and size of several
implementations (STL, Boost, Squid custom, other) and makes Squid build
with the a) fastest, or b) smallest footprint. This is a major side project
though.
Amos
Received on Tue Nov 10 2009 - 21:51:18 MST
This archive was generated by hypermail 2.2.0 : Wed Nov 11 2009 - 12:00:05 MST