X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Ftypes.h;h=bb4aa79f2092982c9b414c865413462d7b5bea9f;hb=5e9b43efe4fb475b81870d21bdb92985827cbbef;hp=252d77a9796764ce929bbcb46dd6b09d67b3f1a1;hpb=c98d648bb4da97fbb3e0249f7901bb2f04b9baf1;p=bertos.git diff --git a/bertos/cpu/types.h b/bertos/cpu/types.h index 252d77a9..bb4aa79f 100644 --- a/bertos/cpu/types.h +++ b/bertos/cpu/types.h @@ -207,6 +207,11 @@ /*\}*/ +#ifndef INT_MAX + #define INT_MAX ((int)((unsigned int)~0 >> 1)) + #define INT_MIN (-INT_MAX - 1) +#endif + /* Sanity checks for the above definitions */ STATIC_ASSERT(sizeof(char) == SIZEOF_CHAR); STATIC_ASSERT(sizeof(short) == SIZEOF_SHORT);