introduce win32 build capability
authorPeter Hinz <cerebusrc@gmail.com>
Wed, 2 Mar 2011 22:03:47 +0000 (22:03 +0000)
committerAndy Green <andy@warmcat.com>
Wed, 2 Mar 2011 22:03:47 +0000 (22:03 +0000)
commit56885f308437645d75f9cae9c6c5cdcbeaa7371d
treea0a9ba7444220b7d05704af08b1944e5665ec4f8
parent385e7ad0344f740ef4edb1790827096df96d5583
introduce win32 build capability

This adds win32 build compatability to libwebsockets.

The patch is from Peter Hinz, Andy Green has cleaned it up a bit and
possibly broken win32 compatability since I can't test it, so there
may be followup patches.  It compiles fine under Linux after this
patch anyway.

Much of the patch is changing a reserved keyword for Visual C compiler
"this" to "context", but there is no real C99 support in the MSFT
compiler even though it is 2011 so C99 style array declarations
have been mangled back into "ancient C" style.

Some windows-isms are also added like closesocket() but these are
quite localized.  Win32 random is just using C library random() call
at the moment vs Linux /dev/urandom.  canonical hostname detection is
broken in win32 at the moment.

Signed-off-by: Peter Hinz <cerebusrc@gmail.com>
Signed-off-by: Andy Green <andy@warmcat.com>
32 files changed:
lib/client-handshake.c
lib/handshake.c
lib/libwebsockets.c
lib/libwebsockets.h
lib/parsers.c
lib/private-libwebsockets.h
lib/sha-1.c
libwebsockets-api-doc.html
test-server/test-client.c
test-server/test-server-extpoll.c
test-server/test-server.c
win32port/client/client.vcxproj [new file with mode: 0644]
win32port/client/client.vcxproj.filters [new file with mode: 0644]
win32port/client/client.vcxproj.user [new file with mode: 0644]
win32port/libwebsocketswin32/libwebsocketswin32.vcxproj [new file with mode: 0644]
win32port/libwebsocketswin32/libwebsocketswin32.vcxproj.filters [new file with mode: 0644]
win32port/libwebsocketswin32/libwebsocketswin32.vcxproj.user [new file with mode: 0644]
win32port/server/server.vcxproj [new file with mode: 0644]
win32port/server/server.vcxproj.filters [new file with mode: 0644]
win32port/server/server.vcxproj.user [new file with mode: 0644]
win32port/win32helpers/getopt.c [new file with mode: 0644]
win32port/win32helpers/getopt.h [new file with mode: 0644]
win32port/win32helpers/getopt_long.c [new file with mode: 0644]
win32port/win32helpers/gettimeofday.c [new file with mode: 0644]
win32port/win32helpers/gettimeofday.h [new file with mode: 0644]
win32port/win32helpers/netdb.h [new file with mode: 0644]
win32port/win32helpers/strings.h [new file with mode: 0644]
win32port/win32helpers/sys/time.h [new file with mode: 0644]
win32port/win32helpers/unistd.h [new file with mode: 0644]
win32port/win32helpers/websock-w32.h [new file with mode: 0644]
win32port/win32port.sln [new file with mode: 0644]
win32port/win32port.suo [new file with mode: 0644]