plugins add win modifiers before libwebsockets.h for dll export flag
authorAndy Green <andy@warmcat.com>
Wed, 25 May 2016 23:51:58 +0000 (07:51 +0800)
committerAndy Green <andy@warmcat.com>
Wed, 25 May 2016 23:52:20 +0000 (07:52 +0800)
Signed-off-by: Andy Green <andy@warmcat.com>
CMakeLists.txt
plugin-standalone/protocol_example_standalone.c
plugins/protocol_client_loopback_test.c
plugins/protocol_dumb_increment.c
plugins/protocol_lws_mirror.c
plugins/protocol_lws_server_status.c
plugins/protocol_lws_status.c
plugins/protocol_post_demo.c

index 4424728..7e28b7a 100644 (file)
@@ -1509,6 +1509,7 @@ message(" PLUGINS = ${PLUGINS_LIST}")
 message(" LWS_WITH_ACCESS_LOG = ${LWS_WITH_ACCESS_LOG}")
 message(" LWS_WITH_SERVER_STATUS = ${LWS_WITH_SERVER_STATUS}")
 message(" LWS_WITH_LEJP = ${LWS_WITH_LEJP}")
+message(" LWS_WITH_GENERIC_SESSIONS = ${LWS_WITH_GENERIC_SESSIONS}")
 message("---------------------------------------------------------------------")
 
 # These will be available to parent projects including libwebsockets using add_subdirectory()
index c74bbf9..36172d4 100644 (file)
  * "example-standalone-protocol", to show how to build protocol plugins
  * outside the library easily.
  */
+
+#define LWS_DLL
+#define LWS_INTERNAL
 #include "../lib/libwebsockets.h"
+
 #include <string.h>
 
 struct per_vhost_data__dumb_increment {
index d03aae6..6468aa1 100644 (file)
@@ -17,6 +17,9 @@
  * may be proprietary.  So unlike the library itself, they are licensed
  * Public Domain.
  */
+
+#define LWS_DLL
+#define LWS_INTERNAL
 #include "../lib/libwebsockets.h"
 #include <string.h>
 
@@ -169,7 +172,7 @@ static const struct lws_protocols protocols[] = {
        },
 };
 
-LWS_VISIBLE int
+LWS_EXTERN LWS_VISIBLE int
 init_protocol_client_loopback_test(struct lws_context *context,
                                   struct lws_plugin_capability *c)
 {
@@ -187,7 +190,7 @@ init_protocol_client_loopback_test(struct lws_context *context,
        return 0;
 }
 
-LWS_VISIBLE int
+LWS_EXTERN LWS_VISIBLE int
 destroy_protocol_client_loopback_test(struct lws_context *context)
 {
        return 0;
index ad5837a..d8d7257 100644 (file)
@@ -17,6 +17,8 @@
  * may be proprietary.  So unlike the library itself, they are licensed
  * Public Domain.
  */
+#define LWS_DLL
+#define LWS_INTERNAL
 #include "../lib/libwebsockets.h"
 #include <string.h>
 
@@ -119,7 +121,7 @@ static const struct lws_protocols protocols[] = {
        },
 };
 
-LWS_VISIBLE int
+LWS_EXTERN LWS_VISIBLE int
 init_protocol_dumb_increment(struct lws_context *context,
                             struct lws_plugin_capability *c)
 {
@@ -137,7 +139,7 @@ init_protocol_dumb_increment(struct lws_context *context,
        return 0;
 }
 
-LWS_VISIBLE int
+LWS_EXTERN LWS_VISIBLE int
 destroy_protocol_dumb_increment(struct lws_context *context)
 {
        return 0;
index 45a15a5..c275ed4 100644 (file)
@@ -17,6 +17,8 @@
  * may be proprietary.  So unlike the library itself, they are licensed
  * Public Domain.
  */
+#define LWS_DLL
+#define LWS_INTERNAL
 #include "../lib/libwebsockets.h"
 #include <string.h>
 #include <stdlib.h>
@@ -155,7 +157,7 @@ static const struct lws_protocols protocols[] = {
        },
 };
 
-LWS_VISIBLE int
+LWS_EXTERN LWS_VISIBLE int
 init_protocol_lws_mirror(struct lws_context *context,
                             struct lws_plugin_capability *c)
 {
@@ -173,7 +175,7 @@ init_protocol_lws_mirror(struct lws_context *context,
        return 0;
 }
 
-LWS_VISIBLE int
+LWS_EXTERN LWS_VISIBLE int
 destroy_protocol_lws_mirror(struct lws_context *context)
 {
        return 0;
index e2e27e7..926623c 100644 (file)
@@ -17,6 +17,9 @@
  * may be proprietary.  So unlike the library itself, they are licensed
  * Public Domain.
  */
+
+#define LWS_DLL
+#define LWS_INTERNAL
 #include "../lib/libwebsockets.h"
 #include <string.h>
 #include <stdlib.h>
@@ -122,7 +125,7 @@ static const struct lws_protocols protocols[] = {
        },
 };
 
-LWS_VISIBLE int
+LWS_EXTERN LWS_VISIBLE int
 init_protocol_lws_server_status(struct lws_context *context,
                             struct lws_plugin_capability *c)
 {
@@ -140,7 +143,7 @@ init_protocol_lws_server_status(struct lws_context *context,
        return 0;
 }
 
-LWS_VISIBLE int
+LWS_EXTERN LWS_VISIBLE int
 destroy_protocol_lws_server_status(struct lws_context *context)
 {
        return 0;
index 29e1d65..817fe76 100644 (file)
  * may be proprietary.  So unlike the library itself, they are licensed
  * Public Domain.
  */
+
+#define LWS_DLL
+#define LWS_INTERNAL
 #include "../lib/libwebsockets.h"
+
 #include <time.h>
 #include <string.h>
 #ifdef WIN32
@@ -182,7 +186,7 @@ static const struct lws_protocols protocols[] = {
        },
 };
 
-LWS_VISIBLE int
+LWS_EXTERN LWS_VISIBLE int
 init_protocol_lws_status(struct lws_context *context,
                             struct lws_plugin_capability *c)
 {
@@ -200,7 +204,7 @@ init_protocol_lws_status(struct lws_context *context,
        return 0;
 }
 
-LWS_VISIBLE int
+LWS_EXTERN LWS_VISIBLE int
 destroy_protocol_lws_status(struct lws_context *context)
 {
        return 0;
index 29145a6..e2e0b73 100644 (file)
  * may be proprietary.  So unlike the library itself, they are licensed
  * Public Domain.
  */
+
+#define LWS_DLL
+#define LWS_INTERNAL
 #include "../lib/libwebsockets.h"
+
 #include <string.h>
 
 struct per_session_data__post_demo {
@@ -114,7 +118,7 @@ static const struct lws_protocols protocols[] = {
        },
 };
 
-LWS_VISIBLE int
+LWS_EXTERN LWS_VISIBLE int
 init_protocol_post_demo(struct lws_context *context,
                        struct lws_plugin_capability *c)
 {
@@ -132,7 +136,7 @@ init_protocol_post_demo(struct lws_context *context,
        return 0;
 }
 
-LWS_VISIBLE int
+LWS_EXTERN LWS_VISIBLE int
 destroy_protocol_post_demo(struct lws_context *context)
 {
        return 0;