From: Mumit Khan Date: Tue, 29 Feb 2000 03:13:40 +0000 (+0000) Subject: 2000-02-28 Mumit Khan X-Git-Tag: cygwin-1_1_1~197 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=bb76eb243f0136af8e14c14279ced9b620220955;p=newlib-cygwin.git 2000-02-28 Mumit Khan Patches from Jan Nijtmans : * include/winsock.h (FD_CLR): Add missing ')'. (timercmp): Fix macro to handle all 6 comparison operators. (AF_FIREFOX, AF_UNKNOWN1, AF_BAN, AF_ATM, AF_INET6): Define. (AF_MAX): Update. (PF_FIREFOX, PF_UNKNOWN1, PF_BAN, PF_ATM, PF_INET6): Define. --- diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog index e92864233..ea8cf766f 100644 --- a/winsup/w32api/ChangeLog +++ b/winsup/w32api/ChangeLog @@ -1,5 +1,12 @@ 2000-02-28 Mumit Khan + Patches from Jan Nijtmans : + * include/winsock.h (FD_CLR): Add missing ')'. + (timercmp): Fix macro to handle all 6 comparison operators. + (AF_FIREFOX, AF_UNKNOWN1, AF_BAN, AF_ATM, AF_INET6): Define. + (AF_MAX): Update. + (PF_FIREFOX, PF_UNKNOWN1, PF_BAN, PF_ATM, PF_INET6): Define. + * include/largeint.h: Rename HAVE_INT64 macro to _HAVE_INT64 to avoid namespace pollution. * include/rpcndr.h: Likewise. diff --git a/winsup/w32api/include/winsock.h b/winsup/w32api/include/winsock.h index 93986d02e..e4891b5f1 100644 --- a/winsup/w32api/include/winsock.h +++ b/winsup/w32api/include/winsock.h @@ -46,7 +46,7 @@ int PASCAL __WSAFDIsSet(SOCKET,fd_set*); #ifndef FD_CLR #define FD_CLR(fd,set) do { u_int __i;\ for (__i = 0; __i < ((fd_set *)(set))->fd_count ; __i++) {\ - if (((fd_set *)(set))->fd_array[__i] == fd) {\ + if (((fd_set *)(set))->fd_array[__i] == (fd)) {\ while (__i < ((fd_set *)(set))->fd_count-1) {\ ((fd_set*)(set))->fd_array[__i] = ((fd_set*)(set))->fd_array[__i+1];\ __i++;\ @@ -90,8 +90,9 @@ struct linger { #endif /* ndef __INSIDE_CYGWIN__ */ #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) #define timercmp(tvp, uvp, cmp) \ - ((tvp)->tv_sec cmp (uvp)->tv_sec || \ - (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) + (((tvp)->tv_sec != (uvp)->tv_sec) ? \ + ((tvp)->tv_sec cmp (uvp)->tv_sec) : \ + ((tvp)->tv_usec cmp (uvp)->tv_usec)) #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 #define IOCPARM_MASK 0x7f #define IOC_VOID 0x20000000 @@ -300,8 +301,13 @@ struct ip_mreq { #define AF_APPLETALK 16 #define AF_NETBIOS 17 #define AF_VOICEVIEW 18 +#define AF_FIREFOX 19 +#define AF_UNKNOWN1 20 +#define AF_BAN 21 +#define AF_ATM 22 +#define AF_INET6 23 #ifndef __INSIDE_CYGWIN__ -#define AF_MAX 19 +#define AF_MAX 24 struct sockaddr { u_short sa_family; char sa_data[14]; @@ -332,6 +338,11 @@ struct sockproto { #define PF_HYLINK AF_HYLINK #define PF_APPLETALK AF_APPLETALK #define PF_VOICEVIEW AF_VOICEVIEW +#define PF_FIREFOX AF_FIREFOX +#define PF_UNKNOWN1 AF_UNKNOWN1 +#define PF_BAN AF_BAN +#define PF_ATM AF_ATM +#define PF_INET6 AF_INET6 #define PF_MAX AF_MAX #define SOL_SOCKET 0xffff #define SOMAXCONN 5