fix defintion generation,seems to be working in c now