c_types-c99.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. This patch fixes vendor SDK header "c_types.h" for C99 compatibility.
  2. diff -ur esp_iot_sdk_v0.9.4.org/include/c_types.h esp_iot_sdk_v0.9.4/include/c_types.h
  3. --- esp_iot_sdk_v0.9.4.org/include/c_types.h 2014-12-19 18:07:46.000000000 +0200
  4. +++ esp_iot_sdk_v0.9.4/include/c_types.h 2015-01-17 19:43:49.258975759 +0200
  5. @@ -6,6 +6,9 @@
  6. #ifndef _C_TYPES_H_
  7. #define _C_TYPES_H_
  8. +#include <stdint.h>
  9. +#include <stdbool.h>
  10. +#if 0
  11. typedef unsigned char uint8_t;
  12. typedef signed char sint8_t;
  13. typedef signed char int8_t;
  14. @@ -20,6 +23,7 @@
  15. typedef unsigned long long u_int64_t;
  16. typedef float real32_t;
  17. typedef double real64_t;
  18. +#endif
  19. typedef unsigned char uint8;
  20. typedef unsigned char u8;
  21. @@ -78,10 +82,10 @@
  22. #endif /* ICACHE_FLASH */
  23. #ifndef __cplusplus
  24. -typedef unsigned char bool;
  25. +//typedef unsigned char bool;
  26. #define BOOL bool
  27. -#define true (1)
  28. -#define false (0)
  29. +//#define true (1)
  30. +//#define false (0)
  31. #define TRUE true
  32. #define FALSE false