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 | |
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')
70 files changed, 747 insertions, 759 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) __attribute_pure__ __nonnull ((1, 2)); # else @@ -359,8 +359,8 @@ extern int __REDIRECT_NTH (versionsort, # endif # ifdef __USE_LARGEFILE64 -extern int versionsort64 (__const struct dirent64 **__e1, - __const struct dirent64 **__e2) +extern int versionsort64 (const struct dirent64 **__e1, + const struct dirent64 **__e2) __THROW __attribute_pure__ __nonnull ((1, 2)); # endif #endif /* Use GNU. */ diff --git a/include/dlfcn.h b/include/dlfcn.h index 90a5d18fc..41d0d6fa4 100644 --- a/include/dlfcn.h +++ b/include/dlfcn.h @@ -55,7 +55,7 @@ __BEGIN_DECLS /* Open the shared object FILE and map it in; return a handle that can be passed to `dlsym' to get symbol values from it. */ -extern void *dlopen (__const char *__file, int __mode) __THROW; +extern void *dlopen (const char *__file, int __mode) __THROW; /* Unmap and close a shared object opened by `dlopen'. The handle cannot be used again after calling `dlclose'. */ @@ -64,17 +64,17 @@ extern int dlclose (void *__handle) __THROW __nonnull ((1)); /* Find the run-time address in the shared object HANDLE refers to of the symbol called NAME. */ extern void *dlsym (void *__restrict __handle, - __const char *__restrict __name) __THROW __nonnull ((2)); + const char *__restrict __name) __THROW __nonnull ((2)); #if 0 /*def __USE_GNU*/ /* Like `dlopen', but request object to be allocated in a new namespace. */ -extern void *dlmopen (Lmid_t __nsid, __const char *__file, int __mode) __THROW; +extern void *dlmopen (Lmid_t __nsid, const char *__file, int __mode) __THROW; /* Find the run-time address in the shared object HANDLE refers to of the symbol called NAME with VERSION. */ extern void *dlvsym (void *__restrict __handle, - __const char *__restrict __name, - __const char *__restrict __version) + const char *__restrict __name, + const char *__restrict __version) __THROW __nonnull ((2, 3)); #endif @@ -89,20 +89,20 @@ extern char *dlerror (void) __THROW; `dladdr'. */ typedef struct { - __const char *dli_fname; /* File name of defining object. */ + const char *dli_fname; /* File name of defining object. */ void *dli_fbase; /* Load address of that object. */ - __const char *dli_sname; /* Name of nearest symbol. */ + const char *dli_sname; /* Name of nearest symbol. */ void *dli_saddr; /* Exact value of nearest symbol. */ } Dl_info; /* Fill in *INFO with the following information about ADDRESS. Returns 0 iff no shared object's segments contain that address. */ -extern int dladdr (__const void *__address, Dl_info *__info) +extern int dladdr (const void *__address, Dl_info *__info) __THROW __nonnull ((2)); #if 0 /* not supported by uClibc */ /* Same as `dladdr', but additionally sets *EXTRA_INFO according to FLAGS. */ -extern int dladdr1 (__const void *__address, Dl_info *__info, +extern int dladdr1 (const void *__address, Dl_info *__info, void **__extra_info, int __flags) __THROW __nonnull ((2)); /* These are the possible values for the FLAGS argument to `dladdr1'. diff --git a/include/err.h b/include/err.h index 77b7a1b18..25ff4e957 100644 --- a/include/err.h +++ b/include/err.h @@ -31,25 +31,25 @@ __BEGIN_DECLS /* Print "program: ", FORMAT, ": ", the standard error string for errno, and a newline, on stderr. */ -extern void warn (__const char *__format, ...) +extern void warn (const char *__format, ...) __attribute__ ((__format__ (__printf__, 1, 2))); -extern void vwarn (__const char *__format, __gnuc_va_list) +extern void vwarn (const char *__format, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 1, 0))); /* Likewise, but without ": " and the standard error string. */ -extern void warnx (__const char *__format, ...) +extern void warnx (const char *__format, ...) __attribute__ ((__format__ (__printf__, 1, 2))); -extern void vwarnx (__const char *__format, __gnuc_va_list) +extern void vwarnx (const char *__format, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 1, 0))); /* Likewise, and then exit with STATUS. */ -extern void err (int __status, __const char *__format, ...) +extern void err (int __status, const char *__format, ...) __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3))); -extern void verr (int __status, __const char *__format, __gnuc_va_list) +extern void verr (int __status, const char *__format, __gnuc_va_list) __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0))); -extern void errx (int __status, __const char *__format, ...) +extern void errx (int __status, const char *__format, ...) __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3))); -extern void verrx (int __status, __const char *, __gnuc_va_list) +extern void verrx (int __status, const char *, __gnuc_va_list) __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0))); __END_DECLS diff --git a/include/execinfo.h b/include/execinfo.h index 66cfb9366..503c84662 100644 --- a/include/execinfo.h +++ b/include/execinfo.h @@ -29,13 +29,13 @@ extern int backtrace (void **__array, int __size) __nonnull ((1)); /* Return names of functions from the backtrace list in ARRAY in a newly malloc()ed memory block. */ -extern char **backtrace_symbols (void *__const *__array, int __size) +extern char **backtrace_symbols (void *const *__array, int __size) __THROW __nonnull ((1)); /* This function is similar to backtrace_symbols() but it writes the result immediately to a file. */ -extern void backtrace_symbols_fd (void *__const *__array, int __size, int __fd) +extern void backtrace_symbols_fd (void *const *__array, int __size, int __fd) __THROW __nonnull ((1)); __END_DECLS diff --git a/include/fcntl.h b/include/fcntl.h index 315395d36..ed009dd9a 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -100,7 +100,7 @@ libc_hidden_proto(fcntl64) This function is a cancellation point and therefore not marked with __THROW. */ #ifndef __USE_FILE_OFFSET64 -extern int open (__const char *__file, int __oflag, ...) __nonnull ((1)); +extern int open (const char *__file, int __oflag, ...) __nonnull ((1)); libc_hidden_proto(open) # ifdef _LIBC extern int __open2_nocancel(const char *, int) __nonnull ((1)) attribute_hidden; @@ -108,14 +108,14 @@ extern int __open_nocancel(const char *, int, mode_t) __nonnull ((1)) attribute_ # endif #else # ifdef __REDIRECT -extern int __REDIRECT (open, (__const char *__file, int __oflag, ...), open64) +extern int __REDIRECT (open, (const char *__file, int __oflag, ...), open64) __nonnull ((1)); # else # define open open64 # endif #endif #ifdef __USE_LARGEFILE64 -extern int open64 (__const char *__file, int __oflag, ...) __nonnull ((1)); +extern int open64 (const char *__file, int __oflag, ...) __nonnull ((1)); libc_hidden_proto(open64) #endif @@ -130,19 +130,19 @@ libc_hidden_proto(open64) This function is a cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 -extern int openat (int __fd, __const char *__file, int __oflag, ...) +extern int openat (int __fd, const char *__file, int __oflag, ...) __nonnull ((2)); libc_hidden_proto(openat) # else # ifdef __REDIRECT -extern int __REDIRECT (openat, (int __fd, __const char *__file, int __oflag, +extern int __REDIRECT (openat, (int __fd, const char *__file, int __oflag, ...), openat64) __nonnull ((2)); # else # define openat openat64 # endif # endif -extern int openat64 (int __fd, __const char *__file, int __oflag, ...) +extern int openat64 (int __fd, const char *__file, int __oflag, ...) __nonnull ((2)); #endif @@ -152,17 +152,17 @@ extern int openat64 (int __fd, __const char *__file, int __oflag, ...) This function is a cancellation point and therefore not marked with __THROW. */ #ifndef __USE_FILE_OFFSET64 -extern int creat (__const char *__file, __mode_t __mode) __nonnull ((1)); +extern int creat (const char *__file, __mode_t __mode) __nonnull ((1)); #else # ifdef __REDIRECT -extern int __REDIRECT (creat, (__const char *__file, __mode_t __mode), +extern int __REDIRECT (creat, (const char *__file, __mode_t __mode), creat64) __nonnull ((1)); # else # define creat creat64 # endif #endif #ifdef __USE_LARGEFILE64 -extern int creat64 (__const char *__file, __mode_t __mode) __nonnull ((1)); +extern int creat64 (const char *__file, __mode_t __mode) __nonnull ((1)); #endif #if !defined F_LOCK && (defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \ diff --git a/include/fenv.h b/include/fenv.h index 77fc060a0..9ba384756 100644 --- a/include/fenv.h +++ b/include/fenv.h @@ -72,7 +72,7 @@ extern int feraiseexcept (int __excepts) __THROW; /* Set complete status for exceptions indicated by EXCEPTS according to the representation in the object pointed to by FLAGP. */ -extern int fesetexceptflag (__const fexcept_t *__flagp, int __excepts) __THROW; +extern int fesetexceptflag (const fexcept_t *__flagp, int __excepts) __THROW; /* Determine which of subset of the exceptions specified by EXCEPTS are currently set. */ @@ -101,12 +101,12 @@ extern int feholdexcept (fenv_t *__envp) __THROW; /* Establish the floating-point environment represented by the object pointed to by ENVP. */ -extern int fesetenv (__const fenv_t *__envp) __THROW; +extern int fe |