Win32: MinGW GCC compatibility.

Several warnings silenced, notably (ngx_socket_t) -1 is now checked
on socket operations instead of -1, as ngx_socket_t is unsigned on win32
and gcc complains on comparison.

With this patch, it's now possible to compile nginx using mingw gcc,
with options we normally compile on win32.
This commit is contained in:
Maxim Dounin
2013-09-04 20:48:28 +04:00
parent 74b7a91013
commit 48d96ced6f
19 changed files with 83 additions and 33 deletions

View File

@@ -33,6 +33,10 @@ if [ $OPENSSL != NONE ]; then
CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libssl.a"
CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libcrypto.a"
CORE_LIBS="$CORE_LIBS $NGX_LIBDL"
if [ "$NGX_PLATFORM" = win32 ]; then
CORE_LIBS="$CORE_LIBS -lgdi32 -lcrypt32 -lws2_32"
fi
;;
esac