diff --git a/lib/libwebsockets.h b/lib/libwebsockets.h index 457f6859..eb0f6f80 100644 --- a/lib/libwebsockets.h +++ b/lib/libwebsockets.h @@ -151,6 +151,10 @@ struct sockaddr_in; #define snprintf _snprintf #endif +#ifndef __func__ +#define __func__ __FUNCTION__ +#endif + #else /* NOT WIN32 */ #include @@ -1368,7 +1372,7 @@ extern int lws_extension_callback_pm_deflate( struct lws *wsi, enum lws_extension_callback_reasons reason, void *user, void *in, size_t len); -LWS_EXTERN int +LWS_VISIBLE LWS_EXTERN int lws_set_extension_option(struct lws *wsi, const char *ext_name, const char *opt_name, const char *opt_val); @@ -1609,10 +1613,10 @@ enum { LWSMPRO_CALLBACK = 6, }; -LWS_EXTERN int +LWS_VISIBLE LWS_EXTERN int lws_json_dump_vhost(const struct lws_vhost *vh, char *buf, int len); -LWS_EXTERN int +LWS_VISIBLE LWS_EXTERN int lws_json_dump_context(const struct lws_context *context, char *buf, int len); LWS_VISIBLE LWS_EXTERN void @@ -1627,24 +1631,24 @@ lws_create_context(struct lws_context_creation_info *info); struct lws_vhost; -LWS_VISIBLE struct lws_vhost * +LWS_EXTERN LWS_VISIBLE struct lws_vhost * lws_create_vhost(struct lws_context *context, struct lws_context_creation_info *info); -LWS_VISIBLE int +LWS_VISIBLE LWS_EXTERN int lws_init_vhost_client_ssl(const struct lws_context_creation_info *info, struct lws_vhost *vhost); -LWS_VISIBLE struct lws_vhost * +LWS_VISIBLE LWS_EXTERN struct lws_vhost * lws_vhost_get(struct lws *wsi); -LWS_VISIBLE const struct lws_protocols * +LWS_VISIBLE LWS_EXTERN const struct lws_protocols * lws_protocol_get(struct lws *wsi); -LWS_VISIBLE void * +LWS_VISIBLE LWS_EXTERN void * lws_protocol_vh_priv_zalloc(struct lws_vhost *vhost, const struct lws_protocols *prot, int size); -LWS_VISIBLE void * +LWS_VISIBLE LWS_EXTERN void * lws_protocol_vh_priv_get(struct lws_vhost *vhost, const struct lws_protocols *prot); LWS_VISIBLE LWS_EXTERN int @@ -1714,7 +1718,7 @@ lws_ev_sigint_cfg(struct lws_context *context, int use_ev_sigint, LWS_VISIBLE LWS_EXTERN int lws_ev_initloop(struct lws_context *context, struct ev_loop *loop, int tsi); -LWS_VISIBLE void +LWS_VISIBLE LWS_EXTERN void lws_ev_sigint_cb(struct ev_loop *loop, struct ev_signal *watcher, int revents); #endif /* LWS_USE_LIBEV */ @@ -1726,7 +1730,7 @@ lws_uv_sigint_cfg(struct lws_context *context, int use_uv_sigint, LWS_VISIBLE LWS_EXTERN void lws_libuv_run(const struct lws_context *context, int tsi); -LWS_VISIBLE void +LWS_VISIBLE LWS_EXTERN void lws_libuv_stop(struct lws_context *context); LWS_VISIBLE LWS_EXTERN int @@ -1735,7 +1739,7 @@ lws_uv_initloop(struct lws_context *context, uv_loop_t *loop, int tsi); LWS_VISIBLE LWS_EXTERN uv_loop_t * lws_uv_getloop(struct lws_context *context, int tsi); -LWS_VISIBLE void +LWS_VISIBLE LWS_EXTERN void lws_uv_sigint_cb(uv_signal_t *watcher, int signum); #endif /* LWS_USE_LIBUV */ @@ -1889,7 +1893,7 @@ LWS_VISIBLE LWS_EXTERN int lws_callback_on_writable_all_protocol(const struct lws_context *context, const struct lws_protocols *protocol); -LWS_VISIBLE int +LWS_VISIBLE LWS_EXTERN int lws_callback_on_writable_all_protocol_vhost(const struct lws_vhost *vhost, const struct lws_protocols *protocol); @@ -1897,7 +1901,7 @@ LWS_VISIBLE LWS_EXTERN int lws_callback_all_protocol(struct lws_context *context, const struct lws_protocols *protocol, int reason); -LWS_VISIBLE int +LWS_VISIBLE LWS_EXTERN int lws_callback_all_protocol_vhost(struct lws_vhost *vh, const struct lws_protocols *protocol, int reason); diff --git a/plugins/protocol_lws_server_status.c b/plugins/protocol_lws_server_status.c index b41a719a..e2e27e71 100644 --- a/plugins/protocol_lws_server_status.c +++ b/plugins/protocol_lws_server_status.c @@ -39,7 +39,7 @@ struct per_session_data__server_status { int pos; }; -static const struct lws_protocols protocols[]; +static const struct lws_protocols protocols[1]; static void uv_timeout_cb_server_status(uv_timer_t *w diff --git a/plugins/protocol_lws_status.c b/plugins/protocol_lws_status.c index 38281b76..29e1d65f 100644 --- a/plugins/protocol_lws_status.c +++ b/plugins/protocol_lws_status.c @@ -20,6 +20,10 @@ #include "../lib/libwebsockets.h" #include #include +#ifdef WIN32 +#include +#endif + struct per_session_data__lws_status { struct per_session_data__lws_status *list; diff --git a/test-server/test-server-v2.0.c b/test-server/test-server-v2.0.c index ae170783..e1442d56 100644 --- a/test-server/test-server-v2.0.c +++ b/test-server/test-server-v2.0.c @@ -20,7 +20,9 @@ #include #include +#ifndef WIN32 #include +#endif int debug_level = 7; struct lws_context *context;