Port types, add version(X86) blocks, and start fixing fpos_t