forked from enlightenment/evisum
macros: underflow, overflow, wombling free....
I can see this happening elsewhere, we'll need to use these in other parts where struct members are of varying signage...
This commit is contained in:
parent
a46f2718ca
commit
8f2a25ccfb
|
@ -62,6 +62,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "machine.h"
|
#include "machine.h"
|
||||||
|
#include "macros.h"
|
||||||
|
|
||||||
#if defined(__OpenBSD__)
|
#if defined(__OpenBSD__)
|
||||||
# define CPU_STATES 6
|
# define CPU_STATES 6
|
||||||
|
@ -69,15 +70,6 @@
|
||||||
# define CPU_STATES 5
|
# define CPU_STATES 5
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define U64(n) (uint64_t) n
|
|
||||||
#define I64(n) (int64_t) n
|
|
||||||
#define U32(n) (uint32_t) n
|
|
||||||
#define I32(n) (int32_t) n
|
|
||||||
#define U16(n) (uint16_t) n
|
|
||||||
#define I16(n) (int16_t) n
|
|
||||||
#define U8(n) (uint8_t) n
|
|
||||||
#define I8(n) (int8_t) n
|
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
static char *
|
static char *
|
||||||
file_contents(const char *path)
|
file_contents(const char *path)
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
#ifndef __MACROS_H__
|
||||||
|
#define __MACROS_H__
|
||||||
|
|
||||||
|
#define U64(n) (uint64_t) n
|
||||||
|
#define I64(n) (int64_t) n
|
||||||
|
#define U32(n) (uint32_t) n
|
||||||
|
#define I32(n) (int32_t) n
|
||||||
|
#define U16(n) (uint16_t) n
|
||||||
|
#define I16(n) (int16_t) n
|
||||||
|
#define U8(n) (uint8_t) n
|
||||||
|
#define I8(n) (int8_t) n
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue