fix c/c++ difference on stdio