From 79ba19fa8a5ade433e360d01a4912f39e2df2733 Mon Sep 17 00:00:00 2001 From: Baptiste Wicht Date: Fri, 22 Nov 2013 15:58:55 +0100 Subject: [PATCH] add size_t typedef --- kernel/include/types.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/include/types.hpp b/kernel/include/types.hpp index f627074b..ede658f0 100644 --- a/kernel/include/types.hpp +++ b/kernel/include/types.hpp @@ -15,11 +15,13 @@ typedef unsigned int uint32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int uint64_t __attribute__ ((__mode__ (__DI__))); typedef uint64_t uintptr_t; +typedef uint64_t size_t; static_assert(sizeof(uint8_t) == 1, "uint32_t must be 1 byte long"); static_assert(sizeof(uint16_t) == 2, "uint32_t must be 2 bytes long"); static_assert(sizeof(uint32_t) == 4, "uint32_t must be 4 bytes long"); static_assert(sizeof(uint64_t) == 8, "uint64_t must be 8 bytes long"); +static_assert(sizeof(size_t) == 8, "size_t must be 8 bytes long"); static_assert(sizeof(uintptr_t) == sizeof(uint64_t*), "uintptr_t must have the same size as a pointer"); #endif