add platform and typedef.