ReactOS 0.4.16-dev-2135-g2f5a67f
types.h
Go to the documentation of this file.
1#pragma once
2
3/*
4 * Platform-specific types go here. This is the default placeholder using
5 * types from the standard headers.
6 */
7
8#ifdef UACPI_OVERRIDE_TYPES
9#include "uacpi_types.h"
10#else
11
12#include <stdbool.h>
13#include <stdint.h>
14#include <stddef.h>
15#include <stdarg.h>
16
17#include <uacpi/helpers.h>
18
23
28
29#define UACPI_TRUE true
30#define UACPI_FALSE false
31typedef bool uacpi_bool;
32
33#define UACPI_NULL NULL
34
37typedef size_t uacpi_size;
38
40#define uacpi_va_start va_start
41#define uacpi_va_end va_end
42#define uacpi_va_arg va_arg
43
44typedef char uacpi_char;
45
46#define uacpi_offsetof offsetof
47
48/*
49 * We use unsignd long long for 64-bit number formatting because 64-bit types
50 * don't have a standard way to format them. The inttypes.h header is not
51 * freestanding therefore it's not practical to force the user to define the
52 * corresponding PRI macros. Moreover, unsignd long long is required to be
53 * at least 64-bits as per C99.
54 */
56 sizeof(unsigned long long) < 8,
57 "unsigned long long must be at least 64 bits large as per C99"
58);
59#define UACPI_PRIu64 "llu"
60#define UACPI_PRIx64 "llx"
61#define UACPI_PRIX64 "llX"
62#define UACPI_FMT64(val) ((unsigned long long)(val))
63
64#endif
INT32 int32_t
Definition: types.h:71
UINT32 uint32_t
Definition: types.h:75
INT16 int16_t
Definition: types.h:70
UINT64 uint64_t
Definition: types.h:77
INT64 int64_t
Definition: types.h:72
unsigned int uintptr_t
Definition: corecrt.h:185
unsigned short uint16_t
Definition: stdint.h:35
unsigned char uint8_t
Definition: stdint.h:33
signed char int8_t
Definition: stdint.h:32
char * va_list
Definition: vadefs.h:50
size_t uacpi_size
Definition: types.h:37
uint32_t uacpi_u32
Definition: types.h:21
bool uacpi_bool
Definition: types.h:31
int16_t uacpi_i16
Definition: types.h:25
va_list uacpi_va_list
Definition: types.h:39
uint64_t uacpi_u64
Definition: types.h:22
UACPI_BUILD_BUG_ON_WITH_MSG(sizeof(unsigned long long)< 8, "unsigned long long must be at least 64 bits large as per C99")
char uacpi_char
Definition: types.h:44
uint16_t uacpi_u16
Definition: types.h:20
int32_t uacpi_i32
Definition: types.h:26
int64_t uacpi_i64
Definition: types.h:27
int8_t uacpi_i8
Definition: types.h:24
uint8_t uacpi_u8
Definition: types.h:19
uacpi_uintptr uacpi_virt_addr
Definition: types.h:36
uintptr_t uacpi_uintptr
Definition: types.h:35