Mercurial > hg > nginx
annotate auto/os/win32 @ 7444:4089b3d2cb59
Win32: added WSAPoll() support.
WSAPoll() is only available with Windows Vista and newer (and only
available during compilation if _WIN32_WINNT >= 0x0600). To make
sure the code works with Windows XP, we do not redefine _WIN32_WINNT,
but instead load WSAPoll() dynamically if it is not available during
compilation.
Also, sockets are not guaranteed to be small integers on Windows.
So an index array is used instead of NGX_USE_FD_EVENT to map
events to connections.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 24 Jan 2019 21:51:21 +0300 |
parents | f3ff79ae31d9 |
children | c9235164bbf1 |
rev | line source |
---|---|
455 | 1 |
2 # Copyright (C) Igor Sysoev | |
4412 | 3 # Copyright (C) Nginx, Inc. |
455 | 4 |
5 | |
509 | 6 have=NGX_WIN32 . auto/have_headers |
455 | 7 |
8 CORE_INCS="$WIN32_INCS" | |
9 CORE_DEPS="$WIN32_DEPS" | |
10 CORE_SRCS="$WIN32_SRCS $IOCP_SRCS" | |
11 OS_CONFIG="$WIN32_CONFIG" | |
461 | 12 NGX_ICONS="$NGX_WIN32_ICONS" |
2813
c00763aa5e1b
divide select module into two modules: Unix and Win32 ones
Igor Sysoev <igor@sysoev.ru>
parents:
2731
diff
changeset
|
13 SELECT_SRCS=$WIN32_SELECT_SRCS |
7444
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
7443
diff
changeset
|
14 POLL_SRCS=$WIN32_POLL_SRCS |
455 | 15 |
6383 | 16 ngx_pic_opt= |
7031
b7b7f3a0cc28
Configure: use .exe for binaries for all win32 compilers.
Orgad Shaneh <orgads@gmail.com>
parents:
6724
diff
changeset
|
17 ngx_binext=".exe" |
6383 | 18 |
5360
3d2d3e1cf427
Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
19 case "$NGX_CC_NAME" in |
3d2d3e1cf427
Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
20 |
3d2d3e1cf427
Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
21 gcc) |
3d2d3e1cf427
Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
22 CORE_LIBS="$CORE_LIBS -ladvapi32 -lws2_32" |
6383 | 23 MAIN_LINK="$MAIN_LINK -Wl,--export-all-symbols" |
24 MAIN_LINK="$MAIN_LINK -Wl,--out-implib=$NGX_OBJS/libnginx.a" | |
25 MODULE_LINK="-shared -L $NGX_OBJS -lnginx" | |
5360
3d2d3e1cf427
Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
26 ;; |
3d2d3e1cf427
Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
27 |
3d2d3e1cf427
Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
28 *) |
3d2d3e1cf427
Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
29 CORE_LIBS="$CORE_LIBS advapi32.lib ws2_32.lib" |
3d2d3e1cf427
Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
30 ;; |
3d2d3e1cf427
Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
31 |
3d2d3e1cf427
Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
32 esac |
3d2d3e1cf427
Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
33 |
455 | 34 EVENT_MODULES="$EVENT_MODULES $IOCP_MODULE" |
35 EVENT_FOUND=YES | |
36 | |
37 if [ $EVENT_SELECT = NO ]; then | |
7443
f3ff79ae31d9
Win32: properly enabled select on Windows.
Maxim Dounin <mdounin@mdounin.ru>
parents:
7031
diff
changeset
|
38 have=NGX_HAVE_SELECT . auto/have |
455 | 39 CORE_SRCS="$CORE_SRCS $SELECT_SRCS" |
40 EVENT_MODULES="$EVENT_MODULES $SELECT_MODULE" | |
41 fi | |
42 | |
6724
a6d116645c51
Configure: removed the --with-ipv6 option.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
43 have=NGX_HAVE_INET6 . auto/have |
2814 | 44 |
469 | 45 have=NGX_HAVE_IOCP . auto/have |