Implemented fixes allowing libwebsockets to be built under Windows using MinGM/MSYS
authorStephan Eberle <stephaneberle9@gmail.com>
Fri, 23 Oct 2015 06:10:55 +0000 (08:10 +0200)
committerJoakim Söderberg <joakim.soderberg@gmail.com>
Thu, 29 Oct 2015 23:16:40 +0000 (00:16 +0100)
commitb820e2c2cc16620f6a664edf27377b3a7d9516a7
tree9bb300aa50fee9dec93cf91065feb63bd98479cf
parent1662c624efac21883809f3f58f98a37556bb0da4
Implemented fixes allowing libwebsockets to be built under Windows using MinGM/MSYS

Improvemed patches to address travis and appveyor build errors

Reduced WINVER and _WIN32_WINNT to 0x0501 to be less restrictive

Refined CMakeLists.txt to allow for normal Windows and MinGW-specific OpenSSL certificate generation

Simplified include path to gettimeofday.h

Removed unnecessary list(APPEND LWS_LIBRARIES zlib_internal) export

Added back #include <windows.h> to gettimeofday.c to fix build for normal Windows

Made sure that pollfd gets defined on libwebsockets side when _WIN32_WINNT < 0x0600

Made sure that WINVER and _WIN32_WINNT don't get overridden by libwebsockets headers when already set to something greater than 0x0501

Added missing declaration of WSAPoll function for WINVER < 0x0600 in libwebsockets.h, eliminated invalid usages of pollfd instead of libwebsocket_pollfd in test-server.c

Cleaned up duplicate content in gettimeofday.c, removed header inclusions from gettimeofday.h and fixed include order in test-echo.c, test-ping.c and test-server.c to enable build with normal Windows and MinGW

Re-enabled debug_level in test-echo.c and made sure that the call to lws_set_log_level() is also active under Windows (just like in test-server.c); replaced all WIN32 occurrences by _WIN32 in test-echo.c, test-ping.c, and test-server.c

Removed build-msys.sh and added new section about how to build libwebsockets using MinGW to README.build.md
16 files changed:
CMakeLists.txt
README.build.md
lib/client-handshake.c
lib/client.c
lib/context.c
lib/libwebsockets.h
lib/output.c
lib/private-libwebsockets.h
lib/ssl.c
test-server/test-echo.c
test-server/test-ping.c
test-server/test-server.c
win32port/win32helpers/gettimeofday.c
win32port/win32helpers/gettimeofday.h
win32port/zlib/gzguts.h
win32port/zlib/zutil.h