Files
Espresso/include/types.h

36 lines
638 B
C
Raw Normal View History

2025-05-28 14:41:02 -05:00
#ifndef _TYPES_H
#define _TYPES_H
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
2026-03-20 16:57:08 -05:00
#define ARG64_LO(x) ((uint32_t)(x))
#define ARG64_HI(x) ((uint32_t)((x) >> 32))
#define TOGGLE_BIT(x, bit) ((x) ^= (1U << (bit)))
2025-07-03 20:30:21 -05:00
typedef unsigned char uchar;
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
2026-03-20 16:57:08 -05:00
typedef int8_t i8;
typedef int16_t i16;
typedef int32_t i32;
typedef int64_t i64;
/* this might not be POSIX compatable. */
typedef uint32_t size_t;
typedef int32_t ssize_t;
#if 0
#if sizeof(size_t) != sizeof(ssize_t)
#error "size_t is a different size than ssize_t"
#endif
#endif
2025-05-28 14:41:02 -05:00
#endif