#warning "Your <sys/types.h> may cause runtime problems with W32 sockets."
#endif /* !_SYS_TYPES_FD_SET */
-#if ! (defined __INSIDE_CYGWIN__ || defined __INSIDE_MSYS__)
+#ifndef __INSIDE_MSYS__
struct hostent
{ char *h_name;
u_short l_linger;
};
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
+#endif /* !__INSIDE_MSYS__ */
#define IOCPARM_MASK 0x7F
#define IOC_VOID 0x20000000
#define IOC_IN 0x80000000
#define IOC_INOUT (IOC_IN | IOC_OUT)
-#if ! (defined __INSIDE_CYGWIN__ || defined __INSIDE_MSYS__)
+#ifndef __INSIDE_MSYS__
#define _IO(x,y) (IOC_VOID|((x)<<8)|(y))
#define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
#define FIONBIO _IOW('f', 126, u_long)
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
+#endif /* !__INSIDE_MSYS__ */
#define FIONREAD _IOR('f', 127, u_long)
#define FIOASYNC _IOW('f', 125, u_long)
#define SIOCGLOWAT _IOR('s', 3, u_long)
#define SIOCATMARK _IOR('s', 7, u_long)
-#if ! ( defined __INSIDE_CYGWIN__ || defined __INSIDE_MSYS__)
+#ifndef __INSIDE_MSYS__
struct netent
{ char *n_name;
short p_proto;
};
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
+#endif /* !__INSIDE_MSYS__ */
#define IPPROTO_IP 0
#define IPPROTO_ICMP 1
#define AF_ATM 22
#define AF_INET6 23
-#if ! (defined __INSIDE_CYGWIN__ || defined __INSIDE_MSYS__)
+#ifndef __INSIDE_MSYS__
#define AF_MAX 24
char sa_data[14];
};
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
+#endif /* !__INSIDE_MSYS__ */
struct sockproto
{ u_short sp_family;
#define SOL_SOCKET 0xFFFF
-#ifndef _WINSOCK2_H
-/* FIXME: Is this behaviour correct?
- * Historically, <winsock.h> defined SOMAXCONN unconditionally, with a
- * value of 5. However, <winsock2.h> defines it, using a significantly
- * different value, only when compiling native Windows code, and doesn't
- * define it at all, when compiling for Cygwin or MSYS. To accommodate
- * this difference in philosophy, we must now suppress this definition
- * in <winsock.h>, when <winsock.h> has been included by <winsock2.h>
- */
-#define SOMAXCONN 5
-#endif /* !_WINSOCK2_H */
+#ifndef __INSIDE_MSYS__
-#if ! (defined __INSIDE_CYGWIN__ || defined __INSIDE_MSYS__)
+#define SOMAXCONN 5
#define MSG_OOB 1
#define MSG_PEEK 2
#define MSG_DONTROUTE 4
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
+#endif /* !__INSIDE_MSYS__ */
#define MSG_MAXIOVLEN 16
#define MSG_PARTIAL 0x8000
#define WSANO_ADDRESS WSANO_DATA
-#if ! (defined __INSIDE_CYGWIN__ || defined __INSIDE_MSYS__)
+#ifndef __INSIDE_MSYS__
#define h_errno WSAGetLastError()
#define HOST_NOT_FOUND WSAHOST_NOT_FOUND
#define NO_DATA WSANO_DATA
#define NO_ADDRESS WSANO_ADDRESS
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
+#endif /* !__INSIDE_MSYS__ */
WINSOCK_API_LINKAGE SOCKET PASCAL accept (SOCKET, struct sockaddr *, int *);
WINSOCK_API_LINKAGE int PASCAL WSACancelAsyncRequest (HANDLE);
WINSOCK_API_LINKAGE int PASCAL WSAAsyncSelect (SOCKET, HWND, u_int, long);
-#if ! (defined __INSIDE_CYGWIN__ || defined __INSIDE_MSYS__)
+#ifndef __INSIDE_MSYS__
WINSOCK_API_LINKAGE u_long PASCAL htonl (u_long);
WINSOCK_API_LINKAGE u_long PASCAL ntohl (u_long);
WINSOCK_API_LINKAGE u_short PASCAL ntohs (u_short);
WINSOCK_API_LINKAGE int PASCAL select (int nfds, fd_set *, fd_set *, fd_set *, const struct timeval *);
-/* FIXME: <winsock2.h> moves the following declaration out of the
- * !(__INSIDE_CYGWIN__||__INSIDE_MSYS__) filter; which is correct?
- * Furthermore, should this not also have WINSOCK_API_LINKAGE?
- */
-int PASCAL gethostname (char *, int);
+#endif /* !__INSIDE_MSYS__ */
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
+WINSOCK_API_LINKAGE int PASCAL gethostname (char *, int);
#define WSAMAKEASYNCREPLY(b,e) MAKELONG(b,e)
#define WSAMAKESELECTREPLY(e,error) MAKELONG(e,error)