diff options
Diffstat (limited to 'chalk/sdk/kis_integer_maths.h')
-rw-r--r-- | chalk/sdk/kis_integer_maths.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/chalk/sdk/kis_integer_maths.h b/chalk/sdk/kis_integer_maths.h index c8db9aee..bd52c343 100644 --- a/chalk/sdk/kis_integer_maths.h +++ b/chalk/sdk/kis_integer_maths.h @@ -19,17 +19,38 @@ #ifndef KIS_INTEGER_MATHS_H #define KIS_INTEGER_MATHS_H +#include <config.h> +#if defined(HAVE_STDINT_H) +#include <stdint.h> +#endif + +#if !defined(UINT8_MAX) #define UINT8_MAX 255u +#endif +#if !defined(UINT8_MIN) #define UINT8_MIN 0u +#endif +#if !defined(UINT16_MAX) #define UINT16_MAX 65535u +#endif +#if !defined(UINT16_MIN) #define UINT16_MIN 0u +#endif +#if !defined(UINT32_MAX) #define UINT32_MAX (4294967295u) +#endif +#if !defined(UINT32_MIN) #define UINT32_MIN 0u +#endif +#if !defined(INT16_MAX) #define INT16_MAX 32767 +#endif +#if !defined(INT16_MIN) #define INT16_MIN -32768 +#endif /// take a and scale it up by 256*b/255 inline uint UINT8_SCALEBY(uint a, uint b) |