typecasting with intptr_t to remove warnings
Update platform files