Fixed #endif and added uintptr_t