← Back to team overview

maria-developers team mailing list archive

Re: ad8b439: MDEV-9618 solaris sparc build fails on 10.1.

 

Hi, Alexey!

On May 03, Alexey Botchkov wrote:
> 
> > On the other hand, I don't see a point in moving casts from the
> > assignment to a new variable definition. So, I'd suggest to keep all
> > extern "C" hunks in the patch, but remove cast avoidance changes.
> 
> I don't know how can i do that nicely.
> What i tried by now -
>    change
>        (uint (*)(unsigned int, unsigned int))my_aes_ctx_size;
>    with
>        (extern "C" uint (*)(unsigned int, unsigned int))my_aes_ctx_size;
> that didn't compile.
> 
> Then i tried to put the 'extern "C" {" around the 
> initialize_encryption_plugin().
> It worked but then i needed to add the 'extern "C"' to the 
> initialize_encryption_plugin() declaration.
> 
> What would you suggest?

Oh, so you mean that

  (uint (*)(unsigned int, unsigned int))my_aes_ctx_size

assumes C++ linkage? Even if my_aes_ctx_size itself is extern "C" ?

Grrr. Okay, then, perhaps, use your second patch with if/else?
But still add extern "C" to include/mysql/*.h headers - that's a good
thing to have.

Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx


References