logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0001-Use-fixed-type-integer-types-when-available.patch (1100B)


  1. From a53acabb2bade1d1934cc3a44f0174689255cf8a Mon Sep 17 00:00:00 2001
  2. From: Michael Forney <mforney@mforney.org>
  3. Date: Tue, 13 Aug 2019 22:20:39 +0000
  4. Subject: [PATCH] Use fixed-type integer types when available
  5. This avoids the use of gcc attributes to select the integer width.
  6. ---
  7. include/ffi_common.h | 12 +++++++++++-
  8. 1 file changed, 11 insertions(+), 1 deletion(-)
  9. diff --git a/include/ffi_common.h b/include/ffi_common.h
  10. index 76b9dd6..cfec340 100644
  11. --- a/include/ffi_common.h
  12. +++ b/include/ffi_common.h
  13. @@ -112,7 +112,17 @@ typedef struct
  14. } extended_cif;
  15. /* Terse sized type definitions. */
  16. -#if defined(_MSC_VER) || defined(__sgi) || defined(__SUNPRO_C)
  17. +#if __STDC_VERSION__ >= 199901L
  18. +# include <inttypes.h>
  19. +typedef uint8_t UINT8;
  20. +typedef int8_t SINT8;
  21. +typedef uint16_t UINT16;
  22. +typedef int16_t SINT16;
  23. +typedef uint32_t UINT32;
  24. +typedef int32_t SINT32;
  25. +typedef uint64_t UINT64;
  26. +typedef int64_t SINT64;
  27. +#elif defined(_MSC_VER) || defined(__sgi) || defined(__SUNPRO_C)
  28. typedef unsigned char UINT8;
  29. typedef signed char SINT8;
  30. typedef unsigned short UINT16;
  31. --
  32. 2.24.0