Ever wonder whether you should use #ifdef linux … or #ifdef __linux? Ever search /usr/include for the header file that defines __INT_MAX__ … and not find it? These are the little mysteries of gcc’s built-in #defines. However, there’s really no big mystery:
$ gcc -E -dM -</dev/null
will print the list of #defines that gcc provides.
PS you can find where __INT_MAX__ really comes from by using my stupid gcc trick #2.