diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2013-09-04 20:48:28 +0400 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2013-09-04 20:48:28 +0400 |
commit | 48d96ced6ff6cea533d56d0d09129f6632a19e4d (patch) | |
tree | f3196223e3dd9173aaf91dff959498799c0e3ea2 /src/os/win32/ngx_win32_config.h | |
parent | 74b7a910137a99b5fb073e7c27858c019f96a8cc (diff) | |
download | nginx-48d96ced6ff6cea533d56d0d09129f6632a19e4d.tar.gz nginx-48d96ced6ff6cea533d56d0d09129f6632a19e4d.zip |
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 'src/os/win32/ngx_win32_config.h')
-rw-r--r-- | src/os/win32/ngx_win32_config.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/os/win32/ngx_win32_config.h b/src/os/win32/ngx_win32_config.h index 193079230..67105f1af 100644 --- a/src/os/win32/ngx_win32_config.h +++ b/src/os/win32/ngx_win32_config.h @@ -9,6 +9,7 @@ #define _NGX_WIN32_CONFIG_H_INCLUDED_ +#undef WIN32 #define WIN32 0x0400 #define _WIN32_WINNT 0x0501 @@ -35,6 +36,12 @@ #include <mswsock.h> #include <shellapi.h> #include <stddef.h> /* offsetof() */ + +#ifdef __GNUC__ +/* GCC MinGW's stdio.h includes sys/types.h */ +#define _OFF_T_ +#endif + #include <stdio.h> #include <stdlib.h> #include <stdarg.h> |