the pthreqd library exposes a C API that is compatible to what other systems have. The fact that some of it is implemented in C++ (if any actually is) should not be a problem here.
I suspect you are looking at the wrong place by blaming C++ for the problem.
The only thing that changes between C and C++ is the way function names are converted to symbols in the executable.
For example consider a C function
int foo(int a, int b);
The symbol name will be “foo”.
Now consider these C++ functions. Note that in C++, several function can exist with the same name, but different parameters:
int foo(int a, int b);
int foo(int a, const char* b);
So, the C++ convert the function names in a way that also encodes the parameter. In this case:
_Z3fooii // _Z for a function, 3 for the name length, "foo", then two 'i' indicating that the parameters are int
_Z3fooiPKc // Starts the same, then one i for the first parameter, and PKc (pointer const char) for the second parameter
This is the only difference between C and C++ once the code is compiled. Indeed, if you declare a function named _Z3fooii in C and call it, the linker will find the C++ one. Or if you want to force one C++ function to use the C naming convention, you use extern “C” in the C++ code.
That’s all extern “C” does. Structure layouts are exactly the same between the two languages.
So if your layout is wrong, the problem comes from elsewhere. Maybe SBCL developpers hardcoded the layout of some structure by looking at how it is on another operating system, and in our case that structure has more or less fields, or in a different order. Maybe they are trying to generate such structure layouts by parsing our .h files and doing that incorrectly. Maybe some other problem, but in any case, C++ is not involved there.