// vim:fileencoding=utf-8:foldmethod=marker

#ifndef ALIASES_H
#define ALIASES_H

#include "../platform/platform.h"
#include <stdint.h>

#if defined(WP_PLATFORM_C) && WP_PLATFORM_C_VERSION >= WP_PLATFORM_C11_VERSION && !defined(WP_PLATFORM_APPLE)
	#include <uchar.h>

	#if WP_PLATFORM_C_VERSION >= WP_PLATFORM_C23_VERSION
		typedef char8_t c8;
	#else
		typedef uint8_t c8;
	#endif // !WP_PLATFORM_C23_VERSION

	typedef char16_t c16;
	typedef char32_t c32;
#else
	typedef uint8_t c8;
	typedef uint16_t c16;
	typedef uint32_t c32;
#endif // !WP_PLATFORM_C

typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;

typedef uint8_t b8;

#ifndef WP_PLATFORM_CPP

#ifndef false
#define false (b8)0
#endif // !false

#ifndef true
#define true (b8)1
#endif // !true

#endif // !WP_PLATFORM_CPP

typedef int8_t i8;
typedef int16_t i16;
typedef int32_t i32;
typedef int64_t i64;

typedef float f32;
typedef double f64;
typedef long double f128;

typedef uintptr_t uptr;
typedef intptr_t iptr;

#define wp_extern extern
#define wp_intern static
#define wp_persist static

#ifdef WP_PLATFORM_CPP
#define wp_class_mem static
#define BEGIN_C_LINKAGE wp_extern "C" {
#define END_C_LINKAGE }
#endif // WP_PLATFORM_CPP

#endif // !ALIASES_H
