diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2016-01-27 18:53:26 +0200 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2016-01-27 18:53:26 +0200 |
commit | fa45589d5736d2ce7f37ddd03daad2c638e38848 (patch) | |
tree | 0cf927425dee4d64a1d0f77c138853e49a2ed4fd /extra/pb_syshdr.h | |
parent | abdb59410091e295e99dac4b9d581d77273f9d71 (diff) |
Replace uint8_t with a pb_byte_t typedef.
This supports platforms where uint8_t does not exist.
If you are using a custom pb_syshdr.h, this may require adding
definitions for uint_least8_t etc.
Diffstat (limited to 'extra/pb_syshdr.h')
-rw-r--r-- | extra/pb_syshdr.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/extra/pb_syshdr.h b/extra/pb_syshdr.h index 1ff48230..55d06a3a 100644 --- a/extra/pb_syshdr.h +++ b/extra/pb_syshdr.h @@ -24,6 +24,14 @@ typedef signed int int32_t; typedef unsigned int uint32_t; typedef signed long long int64_t; typedef unsigned long long uint64_t; + +/* These are ok for most platforms, unless uint8_t is actually not available, + * in which case you should give the smallest available type. */ +typedef int8_t int_least8_t; +typedef uint8_t uint_least8_t; +typedef uint8_t uint_fast8_t; +typedef int16_t int_least16_t; +typedef uint16_t uint_least16_t; #endif /* stddef.h subset */ |