use int instead of long for ptrdiff_t on all 32-bit archs