backport FP_* fixes and revert FPCLASSIFY fix since there the FP_* values are defines.