diff src/os/win32/ngx_atomic.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 d620f497c50f
children 2cd019520210
line wrap: on
line diff
--- a/src/os/win32/ngx_atomic.h
+++ b/src/os/win32/ngx_atomic.h
@@ -21,7 +21,8 @@ typedef volatile ngx_atomic_uint_t  ngx_
 #define NGX_ATOMIC_T_LEN            (sizeof("-2147483648") - 1)
 
 
-#if defined( __WATCOMC__ ) || defined( __BORLANDC__ ) || ( _MSC_VER >= 1300 )
+#if defined( __WATCOMC__ ) || defined( __BORLANDC__ ) || defined(__GNUC__)    \
+    || ( _MSC_VER >= 1300 )
 
 /* the new SDK headers */