basic memory functions
This commit is contained in:
1 parent
79bc676f49
commit
edc5325a33
23 files changed
+145
-9
No files matched your search
@@ -4,8 +4,8 @@
|
||||
|
||||
//defined like stdint to avoid confilict
|
||||
|
||||
#ifndef _STDINT_H
|
||||
#define _STDINT_H 1
|
||||
#ifndef _STDWULLIEINT_H
|
||||
#define _STDWULLIEINT_H 1
|
||||
|
||||
// create the types for signed ints using base structures
|
||||
typedef signed char int8_t;
|
||||
@@ -22,10 +22,14 @@ typedef unsigned long long int uint64_t;
|
||||
// misc int types
|
||||
typedef unsigned long size_t;
|
||||
|
||||
// intptr
|
||||
typedef long int intptr_t;
|
||||
typedef unsigned long int uintptr_t;
|
||||
|
||||
// macros for long long, unsigned and unsigned long long
|
||||
#define U unsigned
|
||||
#define LL long long
|
||||
#define ULL unsigned long long
|
||||
#define U unsigned
|
||||
#define LL long long
|
||||
#define ULL unsigned long long
|
||||
|
||||
// int max values
|
||||
#define INT8_MAX ((int8_t)0x7F)
|
||||
@@ -50,5 +54,10 @@ typedef unsigned long size_t;
|
||||
#define INT16_MIN ((int16_t)(-INT16_MAX - 1))
|
||||
#define INT32_MIN ((int32_t)(-INT32_MAX - 1))
|
||||
#define INT64_MIN ((int64_t)(-INT64_MAX - 1))
|
||||
#endif
|
||||
|
||||
// intptr and uintptr min and max because its just a fucking int
|
||||
#define INTPTR_MIN (INT64_MIN -1)
|
||||
#define INTPTR_MAX (INT64_MAX)
|
||||
#define UINTPTR_MIN (UINT64_MIN)
|
||||
#define UINTPTR_MAX (UINT64_MAX)
|
||||
#endif
|
||||
Reference in new issue
Block a user