Added ifdefs for C++.