added __C30__ ifdef around functions