diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-11-18 06:17:03 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-11-18 06:17:03 -0500 |
commit | 290e19f8147d9b3c0166d3520e718ae5603e4cef (patch) | |
tree | 3c77d58f8cd8115b861809560e644699341c14ee /include/netinet/in.h | |
parent | 266bdc1f623fe6fe489e5115e0f8ef723705d949 (diff) |
drop support for pre ISO-C compilers
This drops __signed, __volatile, and __const. Only the latter was
used in the code base, and for uClibc, not consistently. Much of
the code used plain "const" which meant "__const" was useless.
Really, the point of this is to stay in sync with what glibc did.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'include/netinet/in.h')
-rw-r--r-- | include/netinet/in.h | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/include/netinet/in.h b/include/netinet/in.h index 41bbe0780..884d925c9 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -414,43 +414,43 @@ libc_hidden_proto(htons) #if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__ #define IN6_IS_ADDR_UNSPECIFIED(a) \ - (((__const uint32_t *) (a))[0] == 0 \ - && ((__const uint32_t *) (a))[1] == 0 \ - && ((__const uint32_t *) (a))[2] == 0 \ - && ((__const uint32_t *) (a))[3] == 0) + (((const uint32_t *) (a))[0] == 0 \ + && ((const uint32_t *) (a))[1] == 0 \ + && ((const uint32_t *) (a))[2] == 0 \ + && ((const uint32_t *) (a))[3] == 0) #define IN6_IS_ADDR_LOOPBACK(a) \ - (((__const uint32_t *) (a))[0] == 0 \ - && ((__const uint32_t *) (a))[1] == 0 \ - && ((__const uint32_t *) (a))[2] == 0 \ - && ((__const uint32_t *) (a))[3] == htonl (1)) + (((const uint32_t *) (a))[0] == 0 \ + && ((const uint32_t *) (a))[1] == 0 \ + && ((const uint32_t *) (a))[2] == 0 \ + && ((const uint32_t *) (a))[3] == htonl (1)) -#define IN6_IS_ADDR_MULTICAST(a) (((__const uint8_t *) (a))[0] == 0xff) +#define IN6_IS_ADDR_MULTICAST(a) (((const uint8_t *) (a))[0] == 0xff) #define IN6_IS_ADDR_LINKLOCAL(a) \ - ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \ + ((((const uint32_t *) (a))[0] & htonl (0xffc00000)) \ == htonl (0xfe800000)) #define IN6_IS_ADDR_SITELOCAL(a) \ - ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \ + ((((const uint32_t *) (a))[0] & htonl (0xffc00000)) \ == htonl (0xfec00000)) #define IN6_IS_ADDR_V4MAPPED(a) \ - ((((__const uint32_t *) (a))[0] == 0) \ - && (((__const uint32_t *) (a))[1] == 0) \ - && (((__const uint32_t *) (a))[2] == htonl (0xffff))) + ((((const uint32_t *) (a))[0] == 0) \ + && (((const uint32_t *) (a))[1] == 0) \ + && (((const uint32_t *) (a))[2] == htonl (0xffff))) #define IN6_IS_ADDR_V4COMPAT(a) \ - ((((__const uint32_t *) (a))[0] == 0) \ - && (((__const uint32_t *) (a))[1] == 0) \ - && (((__const uint32_t *) (a))[2] == 0) \ - && (ntohl (((__const uint32_t *) (a))[3]) > 1)) + ((((const uint32_t *) (a))[0] == 0) \ + && (((const uint32_t *) (a))[1] == 0) \ + && (((const uint32_t *) (a))[2] == 0) \ + && (ntohl (((const uint32_t *) (a))[3]) > 1)) #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])) + ((((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 #if defined __USE_MISC || defined __USE_GNU @@ -469,23 +469,23 @@ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) #if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__ #define IN6_IS_ADDR_MC_NODELOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ - && ((((__const uint8_t *) (a))[1] & 0xf) == 0x1)) + && ((((const uint8_t *) (a))[1] & 0xf) == 0x1)) #define IN6_IS_ADDR_MC_LINKLOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ - && ((((__const uint8_t *) (a))[1] & 0xf) == 0x2)) + && ((((const uint8_t *) (a))[1] & 0xf) == 0x2)) #define IN6_IS_ADDR_MC_SITELOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ - && ((((__const uint8_t *) (a))[1] & 0xf) == 0x5)) + && ((((const uint8_t *) (a))[1] & 0xf) == 0x5)) #define IN6_IS_ADDR_MC_ORGLOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ - && ((((__const uint8_t *) (a))[1] & 0xf) == 0x8)) + && ((((const uint8_t *) (a))[1] & 0xf) == 0x8)) #define IN6_IS_ADDR_MC_GLOBAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ - && ((((__const uint8_t *) (a))[1] & 0xf) == 0xe)) + && ((((const uint8_t *) (a))[1] & 0xf) == 0xe)) #endif @@ -513,15 +513,15 @@ extern int inet6_option_space (int __nbytes) extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp, int __type) __THROW __attribute_deprecated__; extern int inet6_option_append (struct cmsghdr *__cmsg, - __const uint8_t *__typep, int __multx, + const uint8_t *__typep, int __multx, int __plusy) __THROW __attribute_deprecated__; extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen, int __multx, int __plusy) __THROW __attribute_deprecated__; -extern int inet6_option_next (__const struct cmsghdr *__cmsg, +extern int inet6_option_next (const struct cmsghdr *__cmsg, uint8_t **__tptrp) __THROW __attribute_deprecated__; -extern int inet6_option_find (__const struct cmsghdr *__cmsg, +extern int inet6_option_find (const struct cmsghdr *__cmsg, uint8_t **__tptrp, int __type) __THROW __attribute_deprecated__; @@ -549,10 +549,10 @@ extern int inet6_opt_get_val (void *__databuf, int __offset, void *__val, extern socklen_t inet6_rth_space (int __type, int __segments) __THROW; extern void *inet6_rth_init (void *__bp, socklen_t __bp_len, int __type, int __segments) __THROW; -extern int inet6_rth_add (void *__bp, __const struct in6_addr *__addr) __THROW; -extern int inet6_rth_reverse (__const void *__in, void *__out) __THROW; -extern int inet6_rth_segments (__const void *__bp) __THROW; -extern struct in6_addr *inet6_rth_getaddr (__const void *__bp, int __index) +extern int inet6_rth_add (void *__bp, const struct in6_addr *__addr) __THROW; +extern int inet6_rth_reverse (const void *__in, void *__out) __THROW; +extern int inet6_rth_segments (const void *__bp) __THROW; +extern struct in6_addr *inet6_rth_getaddr (const void *__bp, int __index) __THROW; # endif # endif @@ -571,23 +571,23 @@ extern int getipv4sourcefilter (int __s, struct in_addr __interface_addr, extern int setipv4sourcefilter (int __s, struct in_addr __interface_addr, struct in_addr __group, uint32_t __fmode, uint32_t __numsrc, - __const struct in_addr *__slist) + const struct in_addr *__slist) __THROW; /* Get source filter. */ extern int getsourcefilter (int __s, uint32_t __interface_addr, - __const struct sockaddr *__group, + const struct sockaddr *__group, socklen_t __grouplen, uint32_t *__fmode, uint32_t *__numsrc, struct sockaddr_storage *__slist) __THROW; /* Set source filter. */ extern int setsourcefilter (int __s, uint32_t __interface_addr, - __const struct sockaddr *__group, + const struct sockaddr *__group, socklen_t __grouplen, uint32_t __fmode, uint32_t __numsrc, - __const struct sockaddr_storage *__slist) __THROW; + const struct sockaddr_storage *__slist) __THROW; # endif #endif /* use GNU */ |