summaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/types.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/vppinfra/types.h b/src/vppinfra/types.h
index e098db5fbaf..78418239cd5 100644
--- a/src/vppinfra/types.h
+++ b/src/vppinfra/types.h
@@ -125,6 +125,24 @@ typedef u64 clib_address_t;
typedef u32 clib_address_t;
#endif
+#define CLIB_I8_MAX __INT8_MAX__
+#define CLIB_I16_MAX __INT16_MAX__
+#define CLIB_I32_MAX __INT32_MAX__
+#define CLIB_I64_MAX __INT64_MAX__
+
+#define CLIB_U8_MAX __UINT8_MAX__
+#define CLIB_U16_MAX __UINT16_MAX__
+#define CLIB_U32_MAX __UINT32_MAX__
+#define CLIB_U64_MAX __UINT64_MAX__
+
+#if clib_address_bits == 64
+#define CLIB_WORD_MAX CLIB_I64_MAX
+#define CLIB_UWORD_MAX CLIB_U64_MAX
+#else
+#define CLIB_WORD_MAX CLIB_I32_MAX
+#define CLIB_UWORD_MAX CLIB_U32_MAX
+#endif
+
/* These are needed to convert between pointers and machine words.
MIPS is currently the only machine that can have different sized
pointers and machine words (but only when compiling with 64 bit
ref='#n134'>134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194