Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type definitions on SDK 2.0.0 #32

Open
iia opened this issue Oct 26, 2016 · 3 comments
Open

Type definitions on SDK 2.0.0 #32

iia opened this issue Oct 26, 2016 · 3 comments

Comments

@iia
Copy link

iia commented Oct 26, 2016

When trying to compile libesphttpd using ESP8266 SDK 2.0.0 data type related error such as,

../esp-open-sdk/sdk//include/ets_sys.h:31:1: error: unknown type name 'uint32_t'
typedef uint32_t ETSSignal;

are reported. It seems like in SDK 2.0.0 they changed type definitions which causes this problem.

The following patch on the file located at <SDK_ROOT>/include/c_types.h seems to fix these issues.

--- ./c_types.h
+++ ./c_types.h
@@ -8,17 +8,17 @@

 #include <stdint.h>
 #include <stdbool.h>
-//typedef unsigned char       uint8_t;
+typedef unsigned char       uint8_t;
 typedef signed char         sint8_t;
-//typedef signed char         int8_t;
-//typedef unsigned short      uint16_t;
+typedef signed char         int8_t;
+typedef unsigned short      uint16_t;
 typedef signed short        sint16_t;
-//typedef signed short        int16_t;
-//typedef unsigned int        uint32_t;
+typedef signed short        int16_t;
+typedef unsigned int        uint32_t;
 typedef signed long         sint32_t;
-//typedef signed int          int32_t;
+typedef signed int          int32_t;
 typedef signed long long    sint64_t;
-//typedef unsigned long long  uint64_t;
+typedef unsigned long long  uint64_t;
 typedef unsigned long long  u_int64_t;
 typedef float               real32_t;
 typedef double              real64_t;

It would be nice to have this issue fixed in libesphttpd.

@valkuc
Copy link
Contributor

valkuc commented Oct 26, 2016

As I see there is present definition for uint32_t in SDK 2.0.0 c_types.h
Furthermore, I have switched from SDK 1.5.4 to 2.0.0 without any issues in libesphttpd.
Your c_types.h looks like not from SDK 2.0.0

@jacmet
Copy link
Contributor

jacmet commented Jul 16, 2017

@iia looks like you forgot to pass USE_OPENSDK=yes, otherwise libesphttpd passes -D_STDINT_H which causes stdint.h to get ignored

@jacmet
Copy link
Contributor

jacmet commented Jul 17, 2017

@iia FYI, I've recently submitted a fix for building against 2.x SDKs: #39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants