On Wednesday 10 August 2011 15:47:36 Gisle Vanem wrote:
> "Heiko Hund" <heiko.h...@sophos.com> wrote:
> > +#ifndef IN6_ARE_ADDR_EQUAL
> > +#define IN6_ARE_ADDR_EQUAL(a,b) \
> > +    ((((__const uint32_t *) (a))[0] == ((__const uint32_t *) (b))[0]) \
> > +  && (((__const uint32_t *) (a))[1] == ((__const uint32_t *) (b))[1]) \
> > +  && (((__const uint32_t *) (a))[2] == ((__const uint32_t *) (b))[2]) \
> > +  && (((__const uint32_t *) (a))[3] == ((__const uint32_t *) (b))[3]))
> > +#endif
> 
> A little more readable:
>   #define IN6_ARE_ADDR_EQUAL(a, b)   \
>               (!memcmp ((const void*)(a), (const void*)(b), sizeof (struct
> in6_addr)))
> 
> (almost the same as in MingW's <ws2tcpip.h>).

The version I posted is taken from eglibc 2.13 on Debian testing, by the way.

Heiko
-- 
Heiko Hund | Software Engineer | Phone +49-721-25516-237 | Fax -200
Astaro a Sophos Company | Amalienbadstr. 41 Bau 52 | 76227 Karlsruhe | Germany
Commercial Register: Mannheim HRA 702710 | Headquarter Location: Karlsruhe
 
Represented by the General Partner Astaro Verwaltungs GmbH
Amalienbadstraße 41 Bau 52 | 76227 Karlsruhe | Germany 
Commercial Register: Mannheim HRB 708248 | Executive Board: Gert Hansen,
Markus Hennig, Jan Hichert, Günter Junk, Dr. Frank Nellissen

Reply via email to