Mercurial > hg > nginx
comparison src/os/win32/ngx_win32_config.h @ 5360:3d2d3e1cf427
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 04 Sep 2013 20:48:28 +0400 |
parents | 2fda9065d0f4 |
children | 72e31d88defa |
comparison
equal
deleted
inserted
replaced
5359:2fda9065d0f4 | 5360:3d2d3e1cf427 |
---|---|
7 | 7 |
8 #ifndef _NGX_WIN32_CONFIG_H_INCLUDED_ | 8 #ifndef _NGX_WIN32_CONFIG_H_INCLUDED_ |
9 #define _NGX_WIN32_CONFIG_H_INCLUDED_ | 9 #define _NGX_WIN32_CONFIG_H_INCLUDED_ |
10 | 10 |
11 | 11 |
12 #undef WIN32 | |
12 #define WIN32 0x0400 | 13 #define WIN32 0x0400 |
13 #define _WIN32_WINNT 0x0501 | 14 #define _WIN32_WINNT 0x0501 |
14 | 15 |
15 | 16 |
16 #define STRICT | 17 #define STRICT |
33 #include <winsock2.h> | 34 #include <winsock2.h> |
34 #include <ws2tcpip.h> /* ipv6 */ | 35 #include <ws2tcpip.h> /* ipv6 */ |
35 #include <mswsock.h> | 36 #include <mswsock.h> |
36 #include <shellapi.h> | 37 #include <shellapi.h> |
37 #include <stddef.h> /* offsetof() */ | 38 #include <stddef.h> /* offsetof() */ |
39 | |
40 #ifdef __GNUC__ | |
41 /* GCC MinGW's stdio.h includes sys/types.h */ | |
42 #define _OFF_T_ | |
43 #endif | |
44 | |
38 #include <stdio.h> | 45 #include <stdio.h> |
39 #include <stdlib.h> | 46 #include <stdlib.h> |
40 #include <stdarg.h> | 47 #include <stdarg.h> |
41 #include <locale.h> | 48 #include <locale.h> |
42 | 49 |