fix C/C++ incompatibilities
update generator scripts