forked from phoenix-rtos/libphoenix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstdint.h
64 lines (49 loc) · 920 Bytes
/
stdint.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* Phoenix-RTOS
*
* libphoenix
*
* stdint.h
*
* Copyright 2017 Phoenix Systems
* Author: Pawel Pisarczyk
*
* This file is part of Phoenix-RTOS.
*
* %LICENSE%
*/
#ifndef _LIBPHOENIX_STDINT_H_
#define _LIBPHOENIX_STDINT_H_
#include <arch.h>
typedef u8 uint8_t;
typedef u16 uint16_t;
typedef u32 uint32_t;
typedef u64 uint64_t;
typedef s8 int8_t;
typedef s16 int16_t;
typedef s32 int32_t;
typedef s64 int64_t;
typedef uint64_t uintmax_t;
typedef int64_t intmax_t;
#ifndef INT64_MAX
#define INT64_MAX 0x7fffffffffffffffll
#endif
#ifndef INT64_MIN
#define INT64_MIN 0x8000000000000000ll
#endif
#ifndef UINT64_MAX
#define UINT64_MAX 0xffffffffffffffffll
#endif
#ifndef UINT64_MIN
#define UINT64_MIN 0x0000000000000000ll
#endif
#ifndef SIZE_MAX
#define SIZE_MAX (~(size_t)0)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX 0xffffffff
#endif
#ifndef UINT16_MAX
#define UINT16_MAX 0xffff
#endif
#endif