C++ -> Portable C99 &| C++

Needs feedback obviously.