diff options
author | Jeff Andersen <jeffandersen@google.com> | 2017-08-04 14:21:40 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-08-07 19:29:13 -0700 |
commit | 0d385e7e5754327dae713415d3b931172514eae9 (patch) | |
tree | 6e88c1233242058142dce891f36ac9ed64f64e08 /builtin | |
parent | bc23ce130567ac1fb71dfbfaf3596b8ef540af8e (diff) | |
download | chrome-ec-0d385e7e5754327dae713415d3b931172514eae9.tar.gz |
Add uint_(least|fast)*_t types
This commit adds typedefs for signed and unsigned variants of the
_fast and _least integer types.
BUG=None
BRANCH=None
TEST=make buildall -J
Change-Id: Idefc8f9529d22f17af57859be3c25c36a7f8ec25
Reviewed-on: https://chromium-review.googlesource.com/602870
Commit-Ready: Jeff Andersen <jeffandersen@google.com>
Tested-by: Jeff Andersen <jeffandersen@google.com>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/stdint.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/builtin/stdint.h b/builtin/stdint.h index ba73218273..ada936c2d3 100644 --- a/builtin/stdint.h +++ b/builtin/stdint.h @@ -18,10 +18,31 @@ typedef signed int int32_t; typedef unsigned long long uint64_t; typedef signed long long int64_t; -typedef int intptr_t; typedef unsigned int uintptr_t; +typedef int intptr_t; +/* uint_leastX_t represents the smallest type available with at least X bits. + * uint_fastX_t represents the fastest type available with at least X bits. + */ typedef uint8_t uint_least8_t; +typedef uint16_t uint_least16_t; +typedef uint32_t uint_least32_t; +typedef uint64_t uint_least64_t; + +typedef int8_t int_least8_t; +typedef int16_t int_least16_t; +typedef int32_t int_least32_t; +typedef int64_t int_least64_t; + +typedef uint8_t uint_fast8_t; +typedef uint16_t uint_fast16_t; +typedef uint32_t uint_fast32_t; +typedef uint64_t uint_fast64_t; + +typedef int8_t int_fast8_t; +typedef int16_t int_fast16_t; +typedef int32_t int_fast32_t; +typedef int64_t int_fast64_t; #ifndef UINT8_MAX #define UINT8_MAX (255U) |