forked from boostorg/core
Apparently, gcc < 4.7 on Linux also don't have __cxa_get_globals declaration in cxxabi.h. Declare the function ourselves. Also, on OpenBSD it seems there is no declaration either, and on that platform the function implementation has no exception specification, like on FreeBSD. Add a declaration of that platform. Lastly, changed __cxa_get_globals and _getptd-based implementations to avoid violating strict aliasing rules. This is still formally UB to access structure fields like we do, but this is one less reason to cause miscompilation or compiler warnings.