c_types-c99.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. This patch fixes vendor SDK header "c_types.h" for C99 compatibility.
  2. --- esp_iot_sdk_v0.9.4.org/include/c_types.h.orig 2015-08-07 19:56:56.000000000 +0300
  3. +++ esp_iot_sdk_v0.9.4.org/include/c_types.h 2015-12-30 02:23:54.605439011 +0200
  4. @@ -6,17 +6,19 @@
  5. #ifndef _C_TYPES_H_
  6. #define _C_TYPES_H_
  7. -typedef unsigned char uint8_t;
  8. +#include <stdint.h>
  9. +#include <stdbool.h>
  10. +//typedef unsigned char uint8_t;
  11. typedef signed char sint8_t;
  12. -typedef signed char int8_t;
  13. -typedef unsigned short uint16_t;
  14. +//typedef signed char int8_t;
  15. +//typedef unsigned short uint16_t;
  16. typedef signed short sint16_t;
  17. -typedef signed short int16_t;
  18. -typedef unsigned long uint32_t;
  19. +//typedef signed short int16_t;
  20. +//typedef unsigned long uint32_t;
  21. typedef signed long sint32_t;
  22. -typedef signed long int32_t;
  23. +//typedef signed long int32_t;
  24. typedef signed long long sint64_t;
  25. -typedef unsigned long long uint64_t;
  26. +//typedef unsigned long long uint64_t;
  27. typedef unsigned long long u_int64_t;
  28. typedef float real32_t;
  29. typedef double real64_t;
  30. @@ -80,10 +82,10 @@
  31. #endif /* ICACHE_FLASH */
  32. #ifndef __cplusplus
  33. -typedef unsigned char bool;
  34. +//typedef unsigned char bool;
  35. #define BOOL bool
  36. -#define true (1)
  37. -#define false (0)
  38. +//#define true (1)
  39. +//#define false (0)
  40. #define TRUE true
  41. #define FALSE false