Kernel+AK: Add/fix uintptr_t and intptr_t definitions

We should move towards using uintptr_t instead of u32 for pointers
everywhere, to prepare for an eventual 64-bit port.
This commit is contained in:
Andreas Kling 2020-01-20 13:05:55 +01:00
parent 68d5b39942
commit e07b34b9b8
Notes: sideshowbarker 2024-07-19 09:56:49 +09:00
2 changed files with 5 additions and 2 deletions

View file

@ -56,6 +56,9 @@ static_assert(sizeof(ssize_t) == sizeof(i32));
typedef __PTRDIFF_TYPE__ ptrdiff_t;
typedef __INTPTR_TYPE__ intptr_t;
typedef __UINTPTR_TYPE__ uintptr_t;
typedef u8 uint8_t;
typedef u16 uint16_t;
typedef u32 uint32_t;

View file

@ -69,8 +69,8 @@ typedef __INT_LEAST64_TYPE__ int_least64_t;
#define __int64_t_defined 1
#define __uint64_t_defined 1
typedef __PTRDIFF_TYPE__ uintptr_t;
typedef __PTRDIFF_TYPE__ intptr_t;
typedef __UINTPTR_TYPE__ uintptr_t;
typedef __INTPTR_TYPE__ intptr_t;
typedef __UINTMAX_TYPE__ uintmax_t;
#define UINTMAX_MAX __UINTMAX_MAX__