>Or
No, now you have a problem due to the C functions having "extern C" linkage and transform expecting C++ linkage. Yea, it's messed up, but that officially makes your casting solution non-portable.