summaryrefslogtreecommitdiffstats
path: root/chalk/sdk/kis_integer_maths.h
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-06-01 08:53:08 +0200
committerSlávek Banko <slavek.banko@axis.cz>2017-06-01 08:53:08 +0200
commitcbc1062ce2a32d52e55445d303b1adb4078f87ec (patch)
tree85e3d0563da491547196340205a57f7eaebf4895 /chalk/sdk/kis_integer_maths.h
parent91809c36a1048802fc9073b9237b4d54ed5e1f24 (diff)
downloadkoffice-cbc1062ce2a32d52e55445d303b1adb4078f87ec.tar.gz
koffice-cbc1062ce2a32d52e55445d303b1adb4078f87ec.zip
Fix FTBFS on redefinitions in chalk/sdk/kis_integer_maths.h
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'chalk/sdk/kis_integer_maths.h')
-rw-r--r--chalk/sdk/kis_integer_maths.h21
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)