c_types-c99_sdk_2.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. This patch fixes vendor SDK header "c_types.h" for C99 compatibility.
  2. --- ESP8266_NONOS_SDK_V2.0.0_16_07_19/include/c_types.h.orig 2016-07-18 07:16:07.000000000 -0700
  3. +++ ESP8266_NONOS_SDK_V2.0.0_16_07_19/include/c_types.h 2016-07-26 21:45:18.904657700 -0700
  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 int uint32_t;
  19. +//typedef signed short int16_t;
  20. +//typedef unsigned int uint32_t;
  21. typedef signed long sint32_t;
  22. -typedef signed int int32_t;
  23. +//typedef signed int 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. @@ -82,10 +84,10 @@
  31. #define STORE_ATTR __attribute__((aligned(4)))
  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