Fix windows compilation.
revert wrong fix visibility of return_http_status

Signed-off-by: Andy Green <andy.green@linaro.org>
unconfuse quoting in CMakeLists.txtt

via Marjan Tomas https://github.com/warmcat/libwebsockets/issues/67

Signed-off-by: Andy Green <andy.green@linaro.org>
Add missing LWS_VISIBLE to libwebsocket_set_timeout()

This aligns it with the style of all other function declarations.
Fix endian detection on non-linux systems

f975f736408f32e7384cf38270a7806e68d5e112 introduced inclusion of endian.h,
which is not a standard header. Only include it on Linux machines and
add similar includes for Apple and FreeBSD.
Replace perror() with lwsl_warn()

Use the general logging function for printing error messages.
Avoid calls to gettimeofday()

Add a new function to get the current time in microseconds, since gettimeofday() does not exist on Windows.
Keep the current implementation for the test applications.
Rename leave to cleanup

The name ‘leave’ can not be used on some Windows CE platforms, so rename it.
Use native file functions on Windows

Add a special implementation with CreateFile(), ReadFile() and CloseFile()
for serving HTTP file request to allow compilation on all Windows platforms.
Fix Content-Type header of http status response

The header for setting the mime type is called ‘Content-Type’ and not ‘Mime-Type’.
Add explicit cast to setsockopt() calls

Implicit cast from size_t* to const char* throws an error on some compilers.
Fix type checks in CMake

Use CHECK_TYPE_SIZE to check existence of types.
Cleanup include statements

Remove useless includes and add some preprocessor conditions for platform specific headers.
Add dummy implementation when strerror() is missing

Use a simple empty string for platforms without an implementation.
Correctly server non-ASCII filenames on Windows

Convert the filename from UTF-8 to UTF-16 and use CreateFileW() to open the file.
Enable compilation on Windows CE

Add a few ifdefs to support this additional platform.
fix missing include for time

Signed-off-by: Andy Green <andy.green@linaro.org>
Allow setting the HTTP proxy via creation info

If the user provides a proxy via the info object it is used
in favor over the http_proxy environment variable.
Check if getenv() exists

Do not call getenv() on platform which do not support it
WSAGetLastError() instead of errno on Windows

Error codes set by Windows Sockets are not made available through the errno
variable. Checking them via WSAGetLastError() is the corret solution.