Make sure BN_DIV2W is not defining when defining it, and remove the declarations of bn_add_part_words() and bn_sub_part_words() since they do not exist.