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 | |
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>
108 files changed, 924 insertions, 936 deletions
diff --git a/include/arpa/inet.h b/include/arpa/inet.h index 96c9af96f..4a90cf2cf 100644 --- a/include/arpa/inet.h +++ b/include/arpa/inet.h @@ -31,7 +31,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; libc_hidden_proto(inet_addr) /* Return the local host address part of the Internet address in IN. */ @@ -49,7 +49,7 @@ libc_hidden_proto(inet_netof) /* 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; libc_hidden_proto(inet_network) /* Convert Internet number in IN to ASCII representation. The return value @@ -64,14 +64,14 @@ extern char *inet_ntoa_r (struct in_addr __in, char *__buf) __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; libc_hidden_proto(inet_pton) /* 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, +extern const char *inet_ntop (int __af, const void *__restrict __cp, char *__restrict __buf, socklen_t __len) __THROW; libc_hidden_proto(inet_ntop) @@ -81,7 +81,7 @@ libc_hidden_proto(inet_ntop) #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; libc_hidden_proto(inet_aton) #if 0 @@ -92,24 +92,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 #endif diff --git a/include/assert.h b/include/assert.h index 65159688f..ee8e85fa2 100644 --- a/include/assert.h +++ b/include/assert.h @@ -71,7 +71,7 @@ __END_DECLS # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L # define __ASSERT_FUNCTION __func__ # else -# define __ASSERT_FUNCTION ((__const char *) 0) +# define __ASSERT_FUNCTION ((const char *) 0) # endif # endif diff --git a/include/crypt.h b/include/crypt.h index 563f9b0fc..825e7eb57 100644 --- a/include/crypt.h +++ b/include/crypt.h @@ -25,11 +25,11 @@ __BEGIN_DECLS /* Encrypt characters from KEY using salt to perturb the encryption method. * If salt begins with "$1$", MD5 hashing is used instead of DES. */ -extern char *crypt (__const char *__key, __const char *__salt) +extern char *crypt (const char *__key, const char *__salt) __THROW __nonnull ((1, 2)); /* Setup DES tables according KEY. */ -extern void setkey (__const char *__key) __THROW __nonnull ((1)); +extern void setkey (const char *__key) __THROW __nonnull ((1)); /* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt block in place. */ diff --git a/include/dirent.h b/include/dirent.h index ff59b6b0a..00aa0773e 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -131,7 +131,7 @@ typedef struct __dirstream DIR; This function is a possible cancellation point and therefore not marked with __THROW. */ -extern DIR *opendir (__const char *__name) __nonnull ((1)); +extern DIR *opendir (const char *__name) __nonnull ((1)); libc_hidden_proto(opendir) #ifdef __USE_XOPEN2K8 @@ -255,20 +255,20 @@ libc_hidden_proto(dirfd) sorted using qsort with CMP, and collected in a malloc'd array in *NAMELIST. Returns the number of entries selected, or -1 on error. */ # ifndef __USE_FILE_OFFSET64 -extern int scandir (__const char *__restrict __dir, +extern int scandir (const char *__restrict __dir, struct dirent ***__restrict __namelist, - int (*__selector) (__const struct dirent *), - int (*__cmp) (__const struct dirent **, - __const struct dirent **)) + int (*__selector) (const struct dirent *), + int (*__cmp) (const struct dirent **, + const struct dirent **)) __nonnull ((1, 2)); # else # ifdef __REDIRECT extern int __REDIRECT (scandir, - (__const char *__restrict __dir, + (const char *__restrict __dir, struct dirent ***__restrict __namelist, - int (*__selector) (__const struct dirent *), - int (*__cmp) (__const struct dirent **, - __const struct dirent **)), + int (*__selector) (const struct dirent *), + int (*__cmp) (const struct dirent **, + const struct dirent **)), scandir64) __nonnull ((1, 2)); # else # define scandir scandir64 @@ -278,24 +278,24 @@ extern int __REDIRECT (scandir, # if defined __USE_GNU && defined __USE_LARGEFILE64 /* This function is like `scandir' but it uses the 64bit dirent structure. Please note that the CMP function must now work with struct dirent64 **. */ -extern int scandir64 (__const char *__restrict __dir, +extern int scandir64 (const char *__restrict __dir, struct dirent64 ***__restrict __namelist, - int (*__selector) (__const struct dirent64 *), - int (*__cmp) (__const struct dirent64 **, - __const struct dirent64 **)) + int (*__selector) (const struct dirent64 *), + int (*__cmp) (const struct dirent64 **, + const struct dirent64 **)) __nonnull ((1, 2)); # endif /* Function to compare two `struct dirent's alphabetically. */ # ifndef __USE_FILE_OFFSET64 -extern int alphasort (__const struct dirent **__e1, - __const struct dirent **__e2) +extern int alphasort (const struct dirent **__e1, + const struct dirent **__e2) __THROW __attribute_pure__ __nonnull ((1, 2)); # else # ifdef __REDIRECT extern int __REDIRECT_NTH (alphasort, - (__const struct dirent **__e1, - __const struct dirent **__e2), + (const struct dirent **__e1, + const struct dirent **__e2), alphasort64) __attribute_pure__ __nonnull ((1, 2)); # else # define alphasort alphasort64 @@ -303,8 +303,8 @@ extern int __REDIRECT_NTH (alphasort, # endif # if defined __USE_GNU && defined __USE_LARGEFILE64 -extern int alphasort64 (__const struct dirent64 **__e1, - __const struct dirent64 **__e2) +extern int alphasort64 (const struct dirent64 **__e1, + const struct dirent64 **__e2) __THROW __attribute_pure__ __nonnull ((1, 2)); # endif #endif /* Use BSD or misc or XPG7. */ @@ -343,14 +343,14 @@ extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf, #ifdef __USE_GNU /* Function to compare two `struct dirent's by name & version. */ # ifndef __USE_FILE_OFFSET64 -extern int versionsort (__const struct dirent **__e1, - __const struct dirent **__e2) +extern int versionsort (const struct dirent **__e1, + const struct dirent **__e2) __THROW __attribute_pure__ __nonnull ((1, 2)); # else # ifdef __REDIRECT extern int __REDIRECT_NTH (versionsort, - (__const struct dirent **__e1, - __const struct dirent **__e2), + (const struct dirent **__e1, + const struct dirent **__e2), versionsort64) |