stdint.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * This file is part of the coreboot project.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; version 2 of the License.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #ifndef RISCV_STDINT_H
  14. #define RISCV_STDINT_H
  15. /* Exact integral types */
  16. typedef unsigned char uint8_t;
  17. typedef signed char int8_t;
  18. typedef unsigned short uint16_t;
  19. typedef signed short int16_t;
  20. typedef unsigned int uint32_t;
  21. typedef signed int int32_t;
  22. typedef unsigned long long uint64_t;
  23. typedef signed long long int64_t;
  24. /* Small types */
  25. typedef unsigned char uint_least8_t;
  26. typedef signed char int_least8_t;
  27. typedef unsigned short uint_least16_t;
  28. typedef signed short int_least16_t;
  29. typedef unsigned int uint_least32_t;
  30. typedef signed int int_least32_t;
  31. typedef unsigned long long uint_least64_t;
  32. typedef signed long long int_least64_t;
  33. /* Fast Types */
  34. typedef unsigned char uint_fast8_t;
  35. typedef signed char int_fast8_t;
  36. typedef unsigned int uint_fast16_t;
  37. typedef signed int int_fast16_t;
  38. typedef unsigned int uint_fast32_t;
  39. typedef signed int int_fast32_t;
  40. typedef unsigned long long uint_fast64_t;
  41. typedef signed long long int_fast64_t;
  42. typedef long long int intmax_t;
  43. typedef unsigned long long uintmax_t;
  44. typedef uint8_t u8;
  45. typedef uint16_t u16;
  46. typedef uint32_t u32;
  47. typedef uint64_t u64;
  48. typedef int8_t s8;
  49. typedef int16_t s16;
  50. typedef int32_t s32;
  51. typedef int64_t s64;
  52. typedef uint8_t bool;
  53. #define true 1
  54. #define false 0
  55. /* Types for `void *' pointers. */
  56. typedef s64 intptr_t;
  57. typedef u64 uintptr_t;
  58. #endif /* RISCV_STDINT_H */