diff src/os/win32/ngx_win32_config.h @ 5359:2fda9065d0f4

Win32: Borland C compatibility fixes. Several false positive warnings silenced, notably W8012 "Comparing signed and unsigned" (due to u_short values promoted to int), and W8072 "Suspicious pointer arithmetic" (due to large type values added to pointers). With this patch, it's now again possible to compile nginx using bcc32, with options we normally compile on win32 minus ipv6 and ssl.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 04 Sep 2013 20:48:23 +0400
parents 670ceaba03d8
children 3d2d3e1cf427
line wrap: on
line diff
--- a/src/os/win32/ngx_win32_config.h
+++ b/src/os/win32/ngx_win32_config.h
@@ -146,6 +146,14 @@ typedef __int64             off_t;
 typedef int                 dev_t;
 typedef unsigned int        ino_t;
 
+#elif __BORLANDC__
+
+/* off_t is redefined by sys/types.h used by zlib.h */
+#define __TYPES_H
+
+typedef int                 dev_t;
+typedef unsigned int        ino_t;
+
 #endif