/*
	This file is part of Fennix Kernel.

	Fennix Kernel is free software: you can redistribute it and/or
	modify it under the terms of the GNU General Public License as
	published by the Free Software Foundation, either version 3 of
	the License, or (at your option) any later version.

	Fennix Kernel is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with Fennix Kernel. If not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

namespace std
{
	typedef __INT8_TYPE__ int8_t;
	typedef __INT16_TYPE__ int16_t;
	typedef __INT32_TYPE__ int32_t;
	typedef __INT64_TYPE__ int64_t;

	typedef __UINT8_TYPE__ uint8_t;
	typedef __UINT16_TYPE__ uint16_t;
	typedef __UINT32_TYPE__ uint32_t;
	typedef __UINT64_TYPE__ uint64_t;

	typedef __INT_LEAST8_TYPE__ int_least8_t;
	typedef __INT_LEAST16_TYPE__ int_least16_t;
	typedef __INT_LEAST32_TYPE__ int_least32_t;
	typedef __INT_LEAST64_TYPE__ int_least64_t;

	typedef __UINT_LEAST8_TYPE__ uint_least8_t;
	typedef __UINT_LEAST16_TYPE__ uint_least16_t;
	typedef __UINT_LEAST32_TYPE__ uint_least32_t;
	typedef __UINT_LEAST64_TYPE__ uint_least64_t;

	typedef __INT_FAST8_TYPE__ int_fast8_t;
	typedef __INT_FAST16_TYPE__ int_fast16_t;
	typedef __INT_FAST32_TYPE__ int_fast32_t;
	typedef __INT_FAST64_TYPE__ int_fast64_t;

	typedef __UINT_FAST8_TYPE__ uint_fast8_t;
	typedef __UINT_FAST16_TYPE__ uint_fast16_t;
	typedef __UINT_FAST32_TYPE__ uint_fast32_t;
	typedef __UINT_FAST64_TYPE__ uint_fast64_t;

	typedef __INTPTR_TYPE__ intptr_t;
	typedef __UINTPTR_TYPE__ uintptr_t;

#define INT8_C(val) static_cast<int_least8_t>(val)
#define INT16_C(val) static_cast<int_least16_t>(val)
#define INT32_C(val) static_cast<int_least32_t>(val)
#define INT64_C(val) static_cast<int_least64_t>(val)

#define INTMAX_C(val) static_cast<intmax_t>(val)

#define UINT8_C(val) static_cast<unsigned int_least8_t>(val)
#define UINT16_C(val) static_cast<unsigned int_least16_t>(val)
#define UINT32_C(val) static_cast<unsigned int_least32_t>(val)
#define UINT64_C(val) static_cast<unsigned int_least64_t>(val)

#define UINTMAX_C(val) static_cast<uintmax_t>(val)
}
