Part one of case change of platform.h.
Part one of case change of endian.h.
Convert code to C++.