1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

win32 libuv related build fixes

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

On master, cleanups and refactor mean the last two problems already
don't exist (array is gone from main.c and http.c is deleted)

Signed-off-by: Andy Green <andy@warmcat.com>
This commit is contained in:
Andy Green 2016-05-13 08:20:12 +08:00
parent 2700d1c0c3
commit bf31c1bc87
4 changed files with 25 additions and 15 deletions

View file

@ -151,6 +151,10 @@ struct sockaddr_in;
#define snprintf _snprintf
#endif
#ifndef __func__
#define __func__ __FUNCTION__
#endif
#else /* NOT WIN32 */
#include <unistd.h>
@ -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);

View file

@ -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

View file

@ -20,6 +20,10 @@
#include "../lib/libwebsockets.h"
#include <time.h>
#include <string.h>
#ifdef WIN32
#include <gettimeofday.h>
#endif
struct per_session_data__lws_status {
struct per_session_data__lws_status *list;

View file

@ -20,7 +20,9 @@
#include <libwebsockets.h>
#include <getopt.h>
#ifndef WIN32
#include <syslog.h>
#endif
int debug_level = 7;
struct lws_context *context;