[Libwebsockets] Recent refactor
andy at warmcat.com
Wed Apr 2 15:39:51 CEST 2014
I pushed some refactor patches that get rid of almost all #ifdef WIN32
and #ifndef LWS_NO_EXTENSIONS in the code.
It's untested for Win32, I basically moved existing code around and made
some generic macros, so any damage is hopefully limited.
The main idea of the patches is now, if we're adding code that is
significantly different for different platforms, we should handle that
by adding a new function in lws-plat-*.c and implement it suitably for
each platform. CMake just builds one of the lws-plat-*.c files.
Currently there are only "win32" and "unix" platforms. New functions in
there should start lws_plat_ so we can easily see what's going on.
There's still a LOT of #ifdefs in there but that has significantly
reduced it, and given us a way to keep on top of platform-related
defines going on.
More information about the Libwebsockets