--------------------- PatchSet 1547 Date: 2005/08/20 16:39:22 Author: serassio Branch: nt Tag: (none) Log: Forward port of latest nt-2_5 changes Members: port/win32/include/squid-mswin.h:1.3.18.22->1.3.18.23 Index: squid3/port/win32/include/squid-mswin.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/port/win32/include/Attic/squid-mswin.h,v retrieving revision 1.3.18.22 retrieving revision 1.3.18.23 diff -u -r1.3.18.22 -r1.3.18.23 --- squid3/port/win32/include/squid-mswin.h 20 Aug 2005 16:06:18 -0000 1.3.18.22 +++ squid3/port/win32/include/squid-mswin.h 20 Aug 2005 16:39:22 -0000 1.3.18.23 @@ -1,5 +1,5 @@ /* - * $Id: squid-mswin.h,v 1.3.18.22 2005/08/20 16:06:18 serassio Exp $ + * $Id: squid-mswin.h,v 1.3.18.23 2005/08/20 16:39:22 serassio Exp $ * * AUTHOR: Guido Serassio & Andrey Shorin * @@ -38,6 +38,13 @@ #pragma warning( disable : 4290 ) #pragma warning( disable : 4996 ) #endif +#endif + +#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 +# define __USE_FILE_OFFSET64 1 +#endif + +#if defined(_MSC_VER) /* Microsoft C Compiler ONLY */ typedef char int8_t; typedef unsigned char uint8_t; @@ -53,9 +60,22 @@ typedef unsigned __int64 u_int64_t; typedef long pid_t; -typedef long off_t; typedef int ssize_t; +#if defined __USE_FILE_OFFSET64 +typedef int64_t off_t; +typedef uint64_t ino_t; + +#else +typedef long off_t; +typedef unsigned long ino_t; + +#endif + +#define INT64_MAX _I64_MAX +#define INT64_MIN _I64_MIN +#define PRId64 "I64d" + #include "default_config_file.h" /* Some tricks for MS Compilers */ #define __STDC__ 1 @@ -660,7 +680,7 @@ (SOCKET_ERROR == connect(_get_osfhandle(s),n,l) ? \ (WSAEMFILE == (errno = WSAGetLastError()) ? errno = EMFILE : -1, -1) : 0) #define gethostbyname(n) \ - (NULL == ((HOSTENT FAR*)ws32_result = gethostbyname(n)) ? \ + (NULL == (ws32_result = gethostbyname(n)) ? \ (errno = WSAGetLastError()), (HOSTENT FAR*)NULL : (HOSTENT FAR*)ws32_result) #define gethostname(n,l) \ (SOCKET_ERROR == gethostname(n,l) ? \