Commit 05d92d03 authored by Pekka Pessi's avatar Pekka Pessi

Renamed SU_SOCKADDR_INADDR_ANY as SU_HAS_INADDR_ANY() in su/su.h.

darcs-hash:20051101120421-65a35-9f3b605673b2a4ca656b1a45cdb123ce9f0001c5.gz
parent 9129860f
......@@ -308,18 +308,20 @@ const char *inet_ntop(int af, void const *src, char *dst, size_t size);
/**@HI Test if su_sockaddr_t is INADDR_ANY or IN6ADDR_ANY. */
#if SU_HAVE_IN6
#define SU_SOCKADDR_INADDR_ANY(su) \
#define SU_HAS_INADDR_ANY(su) \
((su)->su_family == AF_INET \
? ((su)->su_sin.sin_addr.s_addr == INADDR_ANY) \
: ((su)->su_family == AF_INET6 \
? (memcmp(&(su)->su_sin6.sin6_addr, su_in6addr_any(), \
sizeof(*su_in6addr_any())) == 0) : 0))
#else
#define SU_SOCKADDR_INADDR_ANY(su) \
#define SU_HAS_INADDR_ANY(su) \
((su)->su_family == AF_INET \
? ((su)->su_sin.sin_addr.s_addr == INADDR_ANY) : 0)
#endif
#define SU_SOCKADDR_INADDR_ANY(su) SU_HAS_INADDR_ANY(su)
/**@HI Calculate correct size of su_sockaddr_t structure. */
#if SU_HAVE_IN6
#define SU_SOCKADDR_SIZE(su) \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment