lws_intptr_t: fix ordering
authorAndy Green <andy@warmcat.com>
Fri, 21 Jul 2017 11:25:41 +0000 (19:25 +0800)
committerAndy Green <andy@warmcat.com>
Fri, 21 Jul 2017 11:25:41 +0000 (19:25 +0800)
https://github.com/warmcat/libwebsockets/issues/973

lib/libwebsockets.h

index 5e897b1..48ef9e2 100644 (file)
@@ -33,12 +33,11 @@ extern "C" {
 #include <stdarg.h>
 #endif
 
-#if defined(LWS_HAS_INTPTR_T)
-#include <stdint.h>
-#define lws_intptr_t intptr_t
-#else
-typedef unsigned long long lws_intptr_t;
-#endif
+#include "lws_config.h"
+
+/*
+ * CARE: everything using cmake defines needs to be below here
+ */
 
 #if defined(LWS_WITH_ESP8266)
 struct sockaddr_in;
@@ -47,7 +46,12 @@ struct sockaddr_in;
 #define LWS_POSIX 1
 #endif
 
-#include "lws_config.h"
+#if defined(LWS_HAS_INTPTR_T)
+#include <stdint.h>
+#define lws_intptr_t intptr_t
+#else
+typedef unsigned long long lws_intptr_t;
+#endif
 
 #if defined(WIN32) || defined(_WIN32)
 #ifndef WIN32_LEAN_AND_MEAN