win32 more build fixes
authorAndy Green <andy@warmcat.com>
Fri, 13 May 2016 22:56:31 +0000 (06:56 +0800)
committerAndy Green <andy@warmcat.com>
Fri, 13 May 2016 22:56:31 +0000 (06:56 +0800)
After alexgille

https://github.com/warmcat/libwebsockets/issues/526

Signed-off-by: Andy Green <andy@warmcat.com>
CMakeLists.txt
lib/libwebsockets.h
lib/private-libwebsockets.h
lwsws/lejp.h

index 3a77471..ae7ba3c 100644 (file)
@@ -1177,7 +1177,7 @@ if (NOT LWS_WITHOUT_TESTAPPS)
                set(PLUGIN_SRCS ${MAIN_SRC})
 
                if (WIN32)
-                       list(APPEND PLUGIN_SRCSset_property
+                       list(APPEND PLUGIN_SRCS
                                ${WIN32_HELPERS_PATH}/getopt.c
                                ${WIN32_HELPERS_PATH}/getopt_long.c
                                ${WIN32_HELPERS_PATH}/gettimeofday.c
index b407c62..4256c5b 100644 (file)
@@ -1367,7 +1367,8 @@ struct lws_plugin {
  * If we add more extensions, publish the callback here  ------v
  */
 
-extern int lws_extension_callback_pm_deflate(
+LWS_EXTERN
+int lws_extension_callback_pm_deflate(
        struct lws_context *context, const struct lws_extension *ext,
        struct lws *wsi, enum lws_extension_callback_reasons reason,
        void *user, void *in, size_t len);
index 23ec9e3..e05bda6 100644 (file)
@@ -82,6 +82,7 @@
 #include <in6addr.h>
 #endif
 #include <mstcpip.h>
+#include <io.h>
 
 #ifndef __func__
 #define __func__ __FUNCTION__
index bbed300..d3d5f29 100644 (file)
@@ -1,3 +1,5 @@
+#include "../lib/libwebsockets.h"
+
 
 struct lejp_ctx;
 
@@ -140,7 +142,7 @@ enum lejp_callbacks {
  *
  *  LEJPCB_OBJECT_END: An object ended
  */
-extern char _lejp_callback(struct lejp_ctx *ctx, char reason);
+LWS_EXTERN char _lejp_callback(struct lejp_ctx *ctx, char reason);
 
 typedef char (*lejp_callback)(struct lejp_ctx *ctx, char reason);
 
@@ -213,20 +215,20 @@ struct lejp_ctx {
        unsigned char wildcount;
 };
 
-extern void
+LWS_EXTERN void
 lejp_construct(struct lejp_ctx *ctx,
               char (*callback)(struct lejp_ctx *ctx, char reason), void *user,
               const char * const *paths, unsigned char paths_count);
 
-extern void
+LWS_EXTERN void
 lejp_destruct(struct lejp_ctx *ctx);
 
-extern int
+LWS_EXTERN int
 lejp_parse(struct lejp_ctx *ctx, const unsigned char *json, int len);
 
-extern void
+LWS_EXTERN void
 lejp_change_callback(struct lejp_ctx *ctx,
                       char (*callback)(struct lejp_ctx *ctx, char reason));
 
-extern int
+LWS_EXTERN int
 lejp_get_wildcard(struct lejp_ctx *ctx, int wildcard, char *dest, int len);