Include limits.h where INT_MAX is used