Cassandra backends for Freeradius

Arran Cudbard-Bell a.cudbardb at freeradius.org
Mon Jul 13 16:27:23 CEST 2015


> On Jul 13, 2015, at 10:24 AM, Arran Cudbard-Bell <a.cudbardb at freeradius.org> wrote:
> 
> 
>> On Jul 2, 2015, at 4:20 PM, Alister Winfield <alister at ticklers.org> wrote:
>> 
>> From memory you can get away with compiling the 'main' as C++ and use C++
>> for the final linking phase.. That assumes you ensure the bits that link to
>> "C" compiled code have the extern "C" stuff in the right place to ensure
>> you don't get any C++ name mangling issues.
> 
> It seems fairly happy linking directly to the cassandra client library.
> 
> No odd crashes, memory leaks or SEGVs so far... It's actually a little confusing :)
> 
> It's in the v3.1.x branch if you felt like doing some light detective work.
> 

https://isocpp.org/wiki/faq/mixing-c-and-cpp

If you want to call overloaded functions from C, you must provide wrappers with distinct names for the C code to use. For example:

	•     // C++ code:
	•     void f(int);
	•     void f(double);
	•     extern "C" void f_i(int i) { f(i); }
	•     extern "C" void f_d(double d) { f(d); }

Maybe that's what's provided by the cassandra headers, they do advertise it as a C/C++ library.

-Arran
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20150713/b8b2566e/attachment.sig>


More information about the Freeradius-Devel mailing list