You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
567 B
37 lines
567 B
4 years ago
|
#ifndef _INTS_H
|
||
|
#define _INTS_H
|
||
|
|
||
|
#include <stdint.h>
|
||
|
#include <stddef.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
|
||
|
#define DEF(s, n) typedef s ## int ## n ## _t s ## n
|
||
|
#define DEFINT(n) typedef uint ## n ## _t u ## n; \
|
||
|
typedef int ## n ## _t i ## n
|
||
|
|
||
|
DEFINT(8);
|
||
|
DEFINT(16);
|
||
|
DEFINT(32);
|
||
|
DEFINT(64);
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
#else
|
||
|
#include <bool.h>
|
||
|
typedef signed __int128 i128;
|
||
|
typedef unsigned __int128 u128;
|
||
|
#endif
|
||
|
typedef float f32;
|
||
|
typedef double f64;
|
||
|
|
||
|
typedef size_t usize;
|
||
|
typedef ssize_t isize;
|
||
|
|
||
|
typedef bool u1;
|
||
|
typedef bool i1;
|
||
|
|
||
|
#undef DEFINT
|
||
|
#undef DEF
|
||
|
|
||
|
#endif /* _INTS_H */
|