aboutsummaryrefslogtreecommitdiff
path: root/inet
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2012-01-07 23:57:22 -0500
committerUlrich Drepper <drepper@gmail.com>2012-01-07 23:57:22 -0500
commita784e502472fb3a1afa4d01a47c66b52d23e00f6 (patch)
tree5ebaa084119dcffe41671a62e2e799b172c57d24 /inet
parent33808bf1164be2e7c8535bdd5ac398c75c33ed49 (diff)
downloadglibc-a784e502472fb3a1afa4d01a47c66b52d23e00f6.zip
glibc-a784e502472fb3a1afa4d01a47c66b52d23e00f6.tar.gz
glibc-a784e502472fb3a1afa4d01a47c66b52d23e00f6.tar.bz2
Remove pre-ISO C support
No more __const.
Diffstat (limited to 'inet')
-rw-r--r--inet/aliases.h6
-rw-r--r--inet/arpa/inet.h22
-rw-r--r--inet/netinet/ether.h16
-rw-r--r--inet/netinet/in.h94
4 files changed, 69 insertions, 69 deletions
diff --git a/inet/aliases.h b/inet/aliases.h
index 58dd8f0..073b1ad 100644
--- a/inet/aliases.h
+++ b/inet/aliases.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -51,10 +51,10 @@ extern int getaliasent_r (struct aliasent *__restrict __result_buf,
struct aliasent **__restrict __result) __THROW;
/* Get alias entry corresponding to NAME. */
-extern struct aliasent *getaliasbyname (__const char *__name) __THROW;
+extern struct aliasent *getaliasbyname (const char *__name) __THROW;
/* Get alias entry corresponding to NAME and put it in RESULT_BUF. */
-extern int getaliasbyname_r (__const char *__restrict __name,
+extern int getaliasbyname_r (const char *__restrict __name,
struct aliasent *__restrict __result_buf,
char *__restrict __buffer, size_t __buflen,
struct aliasent **__restrict __result) __THROW;
diff --git a/inet/arpa/inet.h b/inet/arpa/inet.h
index 5b1154e..0a0179f 100644
--- a/inet/arpa/inet.h
+++ b/inet/arpa/inet.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1999-2001, 2004, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ __BEGIN_DECLS
/* Convert Internet host address from numbers-and-dots notation in CP
into binary data in network byte order. */
-extern in_addr_t inet_addr (__const char *__cp) __THROW;
+extern in_addr_t inet_addr (const char *__cp) __THROW;
/* Return the local host address part of the Internet address in IN. */
extern in_addr_t inet_lnaof (struct in_addr __in) __THROW;
@@ -47,7 +47,7 @@ extern in_addr_t inet_netof (struct in_addr __in) __THROW;
/* Extract the network number in network byte order from the address
in numbers-and-dots natation starting at CP. */
-extern in_addr_t inet_network (__const char *__cp) __THROW;
+extern in_addr_t inet_network (const char *__cp) __THROW;
/* Convert Internet number in IN to ASCII representation. The return value
is a pointer to an internal array containing the string. */
@@ -56,14 +56,14 @@ extern char *inet_ntoa (struct in_addr __in) __THROW;
/* Convert from presentation format of an Internet number in buffer
starting at CP to the binary network format and store result for
interface type AF in buffer starting at BUF. */
-extern int inet_pton (int __af, __const char *__restrict __cp,
+extern int inet_pton (int __af, const char *__restrict __cp,
void *__restrict __buf) __THROW;
/* Convert a Internet address in binary network format for interface
type AF in buffer starting at CP to presentation form and place
result in buffer of length LEN astarting at BUF. */
-extern __const char *inet_ntop (int __af, __const void *__restrict __cp,
- char *__restrict __buf, socklen_t __len)
+extern const char *inet_ntop (int __af, const void *__restrict __cp,
+ char *__restrict __buf, socklen_t __len)
__THROW;
@@ -71,7 +71,7 @@ extern __const char *inet_ntop (int __af, __const void *__restrict __cp,
#ifdef __USE_MISC
/* Convert Internet host address from numbers-and-dots notation in CP
into binary data and store the result in the structure INP. */
-extern int inet_aton (__const char *__cp, struct in_addr *__inp) __THROW;
+extern int inet_aton (const char *__cp, struct in_addr *__inp) __THROW;
/* Format a network number NET into presentation format and place result
in buffer starting at BUF with length of LEN bytes. */
@@ -80,24 +80,24 @@ extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __THROW;
/* Convert network number for interface type AF in buffer starting at
CP to presentation format. The result will specifiy BITS bits of
the number. */
-extern char *inet_net_ntop (int __af, __const void *__cp, int __bits,
+extern char *inet_net_ntop (int __af, const void *__cp, int __bits,
char *__buf, size_t __len) __THROW;
/* Convert network number for interface type AF from presentation in
buffer starting at CP to network format and store result int
buffer starting at BUF of size LEN. */
-extern int inet_net_pton (int __af, __const char *__cp,
+extern int inet_net_pton (int __af, const char *__cp,
void *__buf, size_t __len) __THROW;
/* Convert ASCII representation in hexadecimal form of the Internet
address to binary form and place result in buffer of length LEN
starting at BUF. */
-extern unsigned int inet_nsap_addr (__const char *__cp,
+extern unsigned int inet_nsap_addr (const char *__cp,
unsigned char *__buf, int __len) __THROW;
/* Convert internet address in binary form in LEN bytes starting at CP
a presentation form and place result in BUF. */
-extern char *inet_nsap_ntoa (int __len, __const unsigned char *__cp,
+extern char *inet_nsap_ntoa (int __len, const unsigned char *__cp,
char *__buf) __THROW;
#endif
diff --git a/inet/netinet/ether.h b/inet/netinet/ether.h
index ca780e2..0c2a9d9 100644
--- a/inet/netinet/ether.h
+++ b/inet/netinet/ether.h
@@ -1,5 +1,5 @@
/* Functions for storing Ethernet addresses in ASCII and mapping to hostnames.
- Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,25 +28,25 @@
__BEGIN_DECLS
/* Convert 48 bit Ethernet ADDRess to ASCII. */
-extern char *ether_ntoa (__const struct ether_addr *__addr) __THROW;
-extern char *ether_ntoa_r (__const struct ether_addr *__addr, char *__buf)
+extern char *ether_ntoa (const struct ether_addr *__addr) __THROW;
+extern char *ether_ntoa_r (const struct ether_addr *__addr, char *__buf)
__THROW;
/* Convert ASCII string S to 48 bit Ethernet address. */
-extern struct ether_addr *ether_aton (__const char *__asc) __THROW;
-extern struct ether_addr *ether_aton_r (__const char *__asc,
+extern struct ether_addr *ether_aton (const char *__asc) __THROW;
+extern struct ether_addr *ether_aton_r (const char *__asc,
struct ether_addr *__addr) __THROW;
/* Map 48 bit Ethernet number ADDR to HOSTNAME. */
-extern int ether_ntohost (char *__hostname, __const struct ether_addr *__addr)
+extern int ether_ntohost (char *__hostname, const struct ether_addr *__addr)
__THROW;
/* Map HOSTNAME to 48 bit Ethernet address. */
-extern int ether_hostton (__const char *__hostname, struct ether_addr *__addr)
+extern int ether_hostton (const char *__hostname, struct ether_addr *__addr)
__THROW;
/* Scan LINE and set ADDR and HOSTNAME. */
-extern int ether_line (__const char *__line, struct ether_addr *__addr,
+extern int ether_line (const char *__line, struct ether_addr *__addr,
char *__hostname) __THROW;
__END_DECLS
diff --git a/inet/netinet/in.h b/inet/netinet/in.h
index 2c2c184..c975656 100644
--- a/inet/netinet/in.h
+++ b/inet/netinet/in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2001, 2003, 2004, 2006, 2007, 2008, 2011
+/* Copyright (C) 1991-2001, 2003, 2004, 2006, 2007, 2008, 2011, 2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -399,7 +399,7 @@ extern uint16_t htons (uint16_t __hostshort)
#ifdef __GNUC__
# define IN6_IS_ADDR_UNSPECIFIED(a) \
(__extension__ \
- ({ __const struct in6_addr *__a = (__const struct in6_addr *) (a); \
+ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \
__a->s6_addr32[0] == 0 \
&& __a->s6_addr32[1] == 0 \
&& __a->s6_addr32[2] == 0 \
@@ -407,7 +407,7 @@ extern uint16_t htons (uint16_t __hostshort)
# define IN6_IS_ADDR_LOOPBACK(a) \
(__extension__ \
- ({ __const struct in6_addr *__a = (__const struct in6_addr *) (a); \
+ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \
__a->s6_addr32[0] == 0 \
&& __a->s6_addr32[1] == 0 \
&& __a->s6_addr32[2] == 0 \
@@ -415,24 +415,24 @@ extern uint16_t htons (uint16_t __hostshort)
# define IN6_IS_ADDR_LINKLOCAL(a) \
(__extension__ \
- ({ __const struct in6_addr *__a = (__const struct in6_addr *) (a); \
+ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \
(__a->s6_addr32[0] & htonl (0xffc00000)) == htonl (0xfe800000); }))
# define IN6_IS_ADDR_SITELOCAL(a) \
(__extension__ \
- ({ __const struct in6_addr *__a = (__const struct in6_addr *) (a); \
+ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \
(__a->s6_addr32[0] & htonl (0xffc00000)) == htonl (0xfec00000); }))
# define IN6_IS_ADDR_V4MAPPED(a) \
(__extension__ \
- ({ __const struct in6_addr *__a = (__const struct in6_addr *) (a); \
+ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \
__a->s6_addr32[0] == 0 \
&& __a->s6_addr32[1] == 0 \
&& __a->s6_addr32[2] == htonl (0xffff); }))
# define IN6_IS_ADDR_V4COMPAT(a) \
(__extension__ \
- ({ __const struct in6_addr *__a = (__const struct in6_addr *) (a); \
+ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \
__a->s6_addr32[0] == 0 \
&& __a->s6_addr32[1] == 0 \
&& __a->s6_addr32[2] == 0 \
@@ -440,52 +440,52 @@ extern uint16_t htons (uint16_t __hostshort)
# define IN6_ARE_ADDR_EQUAL(a,b) \
(__extension__ \
- ({ __const struct in6_addr *__a = (__const struct in6_addr *) (a); \
- __const struct in6_addr *__b = (__const struct in6_addr *) (b); \
+ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \
+ const struct in6_addr *__b = (const struct in6_addr *) (b); \
__a->s6_addr32[0] == __b->s6_addr32[0] \
&& __a->s6_addr32[1] == __b->s6_addr32[1] \
&& __a->s6_addr32[2] == __b->s6_addr32[2] \
&& __a->s6_addr32[3] == __b->s6_addr32[3]; }))
#else
# 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_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
-#define IN6_IS_ADDR_MULTICAST(a) (((__const uint8_t *) (a))[0] == 0xff)
+#define IN6_IS_ADDR_MULTICAST(a) (((const uint8_t *) (a))[0] == 0xff)
#if defined __USE_MISC || defined __USE_GNU
/* Bind socket to a privileged IP port. */
@@ -499,23 +499,23 @@ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
#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))
#ifdef __USE_GNU
@@ -540,15 +540,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__;
@@ -576,10 +576,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;
@@ -595,23 +595,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 /* use GNU */
__END_DECLS