Changed ifdef to if and changed long to intptr_t