aboutsummaryrefslogtreecommitdiff
path: root/win32port
diff options
context:
space:
mode:
authorJoakim Soderberg <joakim.soderberg@gmail.com>2013-02-06 15:26:58 +0900
committerAndy Green <andy.green@linaro.org>2013-02-06 15:49:12 +0900
commit4c53123677178b3f9f6a41a1e5910688cbd6a148 (patch)
treebc62efc41af7fb42d1402e25c02561cf653e5d47 /win32port
parentadd3926b17e374f8adcd5121cf53f1c7d7bb442c (diff)
downloadlibwebsockets-4c53123677178b3f9f6a41a1e5910688cbd6a148.tar.gz
CMake support + fixed windows build.
- Finalized CMake support (tested on windows only so far). - Uses a generated lws_config.h that is included in private-libwebsocket to pass defines, only used if CMAKE_BUILD is set. - Support for SSL on Windows. - Initial support for CyaSSL replacement of OpenSSL (This has been added to my older CMake-fork but haven't been tested on this version yet). - Fixed windows build (see below for details). - Fixed at least the 32-bit Debug build for the existing Visual Studio Project. (Not to keen fixing all the others when we have CMake support anyway (which can generate much better project files)...) - BUGFIXES: - handshake.c - used C99 definition of handshake_0405 function - libwebsocket.c - syslog not available on windows, put in ifdefs. - Fixed previous known crash bug on Windows where WSAPoll in Ws2_32.dll would not be present, causing the poll function pointer being set to NULL. - Uninitialized variable context->listen_service_extraseen would result in stack overflow because of infinite recursion. Fixed by initializing in libwebsocket_create_context - SO_REUSADDR means something different on Windows compared to Unix. - Setting a socket to nonblocking is done differently on Windows. (This should probably broken out into a helper function instead) - lwsl_emit_syslog -> lwsl_emit_stderr on Windows. - private-libwebsocket.h - PATH_MAX is not available on Windows, define as MAX_PATH - Always define LWS_NO_DAEMONIZE on windows. - Don't define lws_latency as inline that does nothing. inline is not support by the Microsoft compiler, replaced with an empty define instead. (It's __inline in MSVC) - server.c - Fixed nonblock call on windows - test-ping.c - Don't use C99 features (Microsoft compiler does not support it). - Move non-win32 headers into ifdefs. - Skip use of sighandler on Windows. - test-server.c - ifdef syslog parts on Windows.
Diffstat (limited to 'win32port')
-rw-r--r--win32port/libwebsocketswin32/libwebsocketswin32.vcxproj12
-rw-r--r--win32port/libwebsocketswin32/libwebsocketswin32.vcxproj.filters23
2 files changed, 28 insertions, 7 deletions
diff --git a/win32port/libwebsocketswin32/libwebsocketswin32.vcxproj b/win32port/libwebsocketswin32/libwebsocketswin32.vcxproj
index e199c14b..76787662 100644
--- a/win32port/libwebsocketswin32/libwebsocketswin32.vcxproj
+++ b/win32port/libwebsocketswin32/libwebsocketswin32.vcxproj
@@ -108,6 +108,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LibraryPath>D:\Libraries\libwebsockets\output\;$(LibraryPath)</LibraryPath>
+ <IncludePath>lib;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LibraryPath>D:\Libraries\libwebsockets\output\;$(LibraryPath)</LibraryPath>
@@ -121,7 +122,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;LWS_LIBRARY_VERSION="1.1";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../win32helpers;../zlib</AdditionalIncludeDirectories>
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
@@ -253,13 +254,18 @@
<ItemGroup>
<ClCompile Include="..\..\lib\base64-decode.c" />
<ClCompile Include="..\..\lib\client-handshake.c" />
+ <ClCompile Include="..\..\lib\client-parser.c" />
+ <ClCompile Include="..\..\lib\client.c" />
<ClCompile Include="..\..\lib\extension-deflate-frame.c" />
<ClCompile Include="..\..\lib\extension-deflate-stream.c" />
<ClCompile Include="..\..\lib\extension.c" />
<ClCompile Include="..\..\lib\handshake.c" />
<ClCompile Include="..\..\lib\libwebsockets.c" />
- <ClCompile Include="..\..\lib\md5.c" />
+ <ClCompile Include="..\..\lib\minilex.c" />
+ <ClCompile Include="..\..\lib\output.c" />
<ClCompile Include="..\..\lib\parsers.c" />
+ <ClCompile Include="..\..\lib\server-handshake.c" />
+ <ClCompile Include="..\..\lib\server.c" />
<ClCompile Include="..\..\lib\sha-1.c" />
<ClCompile Include="..\win32helpers\gettimeofday.c" />
<ClCompile Include="..\win32helpers\websock-w32.c" />
@@ -276,4 +282,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project> \ No newline at end of file
diff --git a/win32port/libwebsocketswin32/libwebsocketswin32.vcxproj.filters b/win32port/libwebsocketswin32/libwebsocketswin32.vcxproj.filters
index 05ff11a2..f90a2329 100644
--- a/win32port/libwebsocketswin32/libwebsocketswin32.vcxproj.filters
+++ b/win32port/libwebsocketswin32/libwebsocketswin32.vcxproj.filters
@@ -27,9 +27,6 @@
<ClCompile Include="..\..\lib\libwebsockets.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\lib\md5.c">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\..\lib\parsers.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -51,6 +48,24 @@
<ClCompile Include="..\..\lib\extension-deflate-frame.c">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\lib\server-handshake.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\lib\client.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\lib\client-parser.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\lib\minilex.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\lib\output.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\lib\server.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\lib\libwebsockets.h">
@@ -75,4 +90,4 @@
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
-</Project>
+</Project> \ No newline at end of file