]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2863: pt 1: Some Cygwin compile errors
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 20 Apr 2010 10:50:51 +0000 (22:50 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 20 Apr 2010 10:50:51 +0000 (22:50 +1200)
compat/os/mswin.h

index db5a7a72fdf0eeaefd99b699aa20421061abf3d6..35751b919fbd062507c2ea9499630fdf48bc9cdf 100644 (file)
@@ -166,8 +166,10 @@ typedef unsigned long ino_t;
 #define SIGUSR2 31     /* user defined signal 2 */
 
 typedef unsigned short int ushort;
+#if !_SQUID_CYGWIN_
 typedef int uid_t;
 typedef int gid_t;
+#endif
 
 struct passwd {
     char    *pw_name;      /* user name */
@@ -240,16 +242,37 @@ typedef char * caddr_t;
 #undef FD_OPEN
 #undef FD_READ
 #undef FD_WRITE
+
+#ifndef EISCONN
 #define EISCONN WSAEISCONN
+#endif
+#ifndef EINPROGRESS
 #define EINPROGRESS WSAEINPROGRESS
+#endif
+#ifndef EWOULDBLOCK
 #define EWOULDBLOCK WSAEWOULDBLOCK
+#endif
+#ifndef EALREADY
 #define EALREADY WSAEALREADY
+#endif
+#ifndef ETIMEDOUT
 #define ETIMEDOUT WSAETIMEDOUT
+#endif
+#ifndef ECONNREFUSED
 #define ECONNREFUSED WSAECONNREFUSED
+#endif
+#ifndef ECONNRESET
 #define ECONNRESET WSAECONNRESET
+#endif
+#ifndef ENOTCONN
 #define ENOTCONN WSAENOTCONN
+#endif
+#ifndef ERESTART
 #define ERESTART WSATRY_AGAIN
+#endif
+#ifndef EAFNOSUPPORT
 #define EAFNOSUPPORT WSAEAFNOSUPPORT
+#endif
 
 #undef h_errno
 #define h_errno errno /* we'll set it ourselves */
@@ -693,6 +716,9 @@ int WSASocket(int a, int t, int p, LPWSAPROTOCOL_INFO i, GROUP g, DWORD f)
 #define open       _open /* Needed in win32lib.c */
 #endif /* #ifdef __cplusplus */
 
+#if HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#else
 #define        RUSAGE_SELF     0               /* calling process */
 #define        RUSAGE_CHILDREN -1              /* terminated child processes */
 
@@ -714,6 +740,7 @@ struct rusage {
     long ru_nvcsw;                     /* voluntary context switches */
     long ru_nivcsw;                    /* involuntary context switches */
 };
+#endif /* HAVE_SYS_RESOURCE_H */
 
 #undef ACL