summaryrefslogtreecommitdiffhomepage
path: root/auto/os/win32
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2013-09-04 20:48:28 +0400
committerMaxim Dounin <mdounin@mdounin.ru>2013-09-04 20:48:28 +0400
commit48d96ced6ff6cea533d56d0d09129f6632a19e4d (patch)
treef3196223e3dd9173aaf91dff959498799c0e3ea2 /auto/os/win32
parent74b7a910137a99b5fb073e7c27858c019f96a8cc (diff)
downloadnginx-48d96ced6ff6cea533d56d0d09129f6632a19e4d.tar.gz
nginx-48d96ced6ff6cea533d56d0d09129f6632a19e4d.tar.bz2
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.
Diffstat (limited to '')
-rw-r--r--auto/os/win3213
1 files changed, 12 insertions, 1 deletions
diff --git a/auto/os/win32 b/auto/os/win32
index 21a54ba11..0b9b46187 100644
--- a/auto/os/win32
+++ b/auto/os/win32
@@ -9,10 +9,21 @@ CORE_INCS="$WIN32_INCS"
CORE_DEPS="$WIN32_DEPS"
CORE_SRCS="$WIN32_SRCS $IOCP_SRCS"
OS_CONFIG="$WIN32_CONFIG"
-CORE_LIBS="$CORE_LIBS advapi32.lib ws2_32.lib"
NGX_ICONS="$NGX_WIN32_ICONS"
SELECT_SRCS=$WIN32_SELECT_SRCS
+case "$NGX_CC_NAME" in
+
+ gcc)
+ CORE_LIBS="$CORE_LIBS -ladvapi32 -lws2_32"
+ ;;
+
+ *)
+ CORE_LIBS="$CORE_LIBS advapi32.lib ws2_32.lib"
+ ;;
+
+esac
+
EVENT_MODULES="$EVENT_MODULES $IOCP_MODULE"
EVENT_FOUND=YES