fix syntax, add platform specific for C/C++