| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- /*
- * Copyright (c) mlibc & plct lab
- *
- * SPDX-License-Identifier: MIT
- *
- * Change Logs:
- * Date Author Notes
- * 2023/06/16 bernard the first verison
- */
- #ifndef MLIBC_STDINT_H__
- #define MLIBC_STDINT_H__
- #ifdef __cplusplus
- #define NULL (0)
- #else
- #define NULL ((void*)0)
- #endif /*__cplusplus*/
- typedef signed char int8_t;
- typedef signed short int16_t;
- typedef signed int int32_t;
- typedef signed long long int64_t;
- typedef unsigned char uint8_t;
- typedef unsigned short uint16_t;
- typedef unsigned int uint32_t;
- typedef unsigned long long uint64_t;
- typedef unsigned long uintptr_t;
- #define INT8_MIN (-1-0x7f)
- #define INT16_MIN (-1-0x7fff)
- #define INT32_MIN (-1-0x7fffffff)
- #define INT64_MIN (-1-0x7fffffffffffffff)
- #define INT8_MAX (0x7f)
- #define INT16_MAX (0x7fff)
- #define INT32_MAX (0x7fffffff)
- #define INT64_MAX (0x7fffffffffffffff)
- #define UINT8_MAX (0xff)
- #define UINT16_MAX (0xffff)
- #define UINT32_MAX (0xffffffffu)
- #define UINT64_MAX (0xffffffffffffffffu)
- /* for 32bit */
- #define INTPTR_MIN INT32_MIN
- #define INTPTR_MAX INT32_MAX
- #define UINTPTR_MAX UINT32_MAX
- #define PTRDIFF_MIN INT32_MIN
- #define PTRDIFF_MAX INT32_MAX
- #define SIZE_MAX UINT32_MAX
- #endif /*MLIBC_STDINT_H__*/
|