From 290e19f8147d9b3c0166d3520e718ae5603e4cef Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 18 Nov 2012 06:17:03 -0500 Subject: 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 --- include/arpa/inet.h | 18 +-- include/assert.h | 2 +- include/crypt.h | 4 +- include/dirent.h | 50 +++---- include/dlfcn.h | 18 +-- include/err.h | 16 +-- include/execinfo.h | 4 +- include/fcntl.h | 18 +-- include/fenv.h | 6 +- include/fnmatch.h | 10 +- include/ftw.h | 28 ++-- include/glob.h | 34 ++--- include/grp.h | 12 +- include/iconv.h | 2 +- include/inttypes.h | 40 +++--- include/libintl.h | 34 ++--- include/locale.h | 4 +- include/mntent.h | 8 +- include/net/if.h | 2 +- include/netdb.h | 84 +++++------ include/netinet/ether.h | 14 +- include/netinet/in.h | 76 +++++----- include/nl_types.h | 4 +- include/printf.h | 14 +- include/pwd.h | 6 +- include/regexp.h | 10 +- include/rpc/auth.h | 8 +- include/rpc/auth_des.h | 8 +- include/rpc/clnt.h | 24 ++-- include/rpc/netdb.h | 4 +- include/rpc/pmap_clnt.h | 20 +-- include/rpc/xdr.h | 12 +- include/sched.h | 6 +- include/search.h | 16 +-- include/sgtty.h | 2 +- include/shadow.h | 10 +- include/signal.h | 42 +++--- include/stdio.h | 108 +++++++------- include/stdlib.h | 76 +++++----- include/string.h | 106 +++++++------- include/strings.h | 16 +-- include/sys/cdefs.h | 4 - include/sys/ipc.h | 2 +- include/sys/mman.h | 12 +- include/sys/mount.h | 10 +- include/sys/msg.h | 2 +- include/sys/poll.h | 4 +- include/sys/resource.h | 6 +- include/sys/sem.h | 2 +- include/sys/shm.h | 4 +- include/sys/socket.h | 12 +- include/sys/stat.h | 42 +++--- include/sys/statfs.h | 6 +- include/sys/statvfs.h | 6 +- include/sys/swap.h | 4 +- include/sys/syslog.h | 6 +- include/sys/time.h | 18 +-- include/sys/uio.h | 4 +- include/sys/wait.h | 2 +- include/sys/xattr.h | 26 ++-- include/termios.h | 6 +- include/time.h | 50 +++---- include/ttyent.h | 2 +- include/unistd.h | 88 ++++++------ include/utime.h | 4 +- include/utmp.h | 22 +-- include/utmpx.h | 16 +-- include/wchar.h | 158 ++++++++++----------- include/wctype.h | 10 +- include/wordexp.h | 2 +- ldso/include/dlfcn.h | 4 +- libc/misc/search/_tsearch.c | 12 +- libc/stdio/_scanf.c | 6 +- libc/stdlib/stdlib.c | 2 +- libc/sysdeps/linux/alpha/bits/fenv.h | 6 +- libc/sysdeps/linux/alpha/sys/acct.h | 2 +- libc/sysdeps/linux/bfin/sys/cachectl.h | 2 +- libc/sysdeps/linux/common/bits/fenv.h | 2 +- libc/sysdeps/linux/common/bits/mathcalls.h | 2 +- libc/sysdeps/linux/common/bits/sigset.h | 4 +- libc/sysdeps/linux/common/bits/sigthread.h | 2 +- libc/sysdeps/linux/common/bits/uClibc_pthread.h | 2 +- libc/sysdeps/linux/common/bits/uClibc_stdio.h | 2 +- libc/sysdeps/linux/common/epoll.c | 6 +- libc/sysdeps/linux/common/futimens.c | 8 +- libc/sysdeps/linux/common/sys/acct.h | 2 +- libc/sysdeps/linux/i386/bits/fenv.h | 4 +- libc/sysdeps/linux/ia64/bits/fenv.h | 6 +- libc/sysdeps/linux/m68k/bits/fenv.h | 4 +- libc/sysdeps/linux/mips/bits/fenv.h | 4 +- libc/sysdeps/linux/mips/sys/cachectl.h | 8 +- libc/sysdeps/linux/mips/sys/sysmips.h | 4 +- libc/sysdeps/linux/powerpc/fenv.h | 6 +- libc/sysdeps/linux/sparc/bits/fenv.h | 4 +- libc/sysdeps/linux/x86_64/bits/fenv.h | 4 +- libc/unistd/exec.c | 2 +- libpthread/linuxthreads.old/internals.h | 6 +- libpthread/linuxthreads.old/semaphore.h | 6 +- .../sysdeps/pthread/bits/libc-lock.h | 6 +- .../linuxthreads.old/sysdeps/pthread/pthread.h | 54 +++---- libpthread/linuxthreads/internals.h | 8 +- libpthread/linuxthreads/semaphore.h | 6 +- .../linuxthreads/sysdeps/pthread/bits/libc-lock.h | 6 +- libpthread/linuxthreads/sysdeps/pthread/pthread.h | 54 +++---- libpthread/nptl/pthreadP.h | 12 +- libpthread/nptl/semaphore.h | 6 +- libpthread/nptl/sysdeps/pthread/bits/libc-lock.h | 6 +- libpthread/nptl/sysdeps/pthread/pthread.h | 74 +++++----- 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) __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 fesetenv (const fenv_t *__envp) __THROW; /* Save current exceptions in temporary storage, install environment represented by object pointed to by ENVP and raise exceptions according to saved exceptions. */ -extern int feupdateenv (__const fenv_t *__envp) __THROW; +extern int feupdateenv (const fenv_t *__envp) __THROW; /* Include optimization. */ diff --git a/include/fnmatch.h b/include/fnmatch.h index d6e1dca86..d77e4b6b0 100644 --- a/include/fnmatch.h +++ b/include/fnmatch.h @@ -22,14 +22,6 @@ extern "C" { #endif -#ifndef const -# if (defined __STDC__ && __STDC__) || defined __cplusplus -# define __const const -# else -# define __const -# endif -#endif - /* We #undef these before defining them because some losing systems (HP-UX A.08.07 for example) define these in . */ #undef FNM_PATHNAME @@ -61,7 +53,7 @@ extern "C" { /* Match NAME against the filename pattern PATTERN, returning zero if it matches, FNM_NOMATCH if not. */ -extern int fnmatch (__const char *__pattern, __const char *__name, +extern int fnmatch (const char *__pattern, const char *__name, int __flags); libc_hidden_proto(fnmatch) diff --git a/include/ftw.h b/include/ftw.h index 4ccc8a742..528db404d 100644 --- a/include/ftw.h +++ b/include/ftw.h @@ -111,19 +111,19 @@ struct FTW /* Convenient types for callback functions. */ -typedef int (*__ftw_func_t) (__const char *__filename, - __const struct stat *__status, int __flag); +typedef int (*__ftw_func_t) (const char *__filename, + const struct stat *__status, int __flag); #ifdef __USE_LARGEFILE64 -typedef int (*__ftw64_func_t) (__const char *__filename, - __const struct stat64 *__status, int __flag); +typedef int (*__ftw64_func_t) (const char *__filename, + const struct stat64 *__status, int __flag); #endif #ifdef __USE_XOPEN_EXTENDED -typedef int (*__nftw_func_t) (__const char *__filename, - __const struct stat *__status, int __flag, +typedef int (*__nftw_func_t) (const char *__filename, + const struct stat *__status, int __flag, struct FTW *__info); # ifdef __USE_LARGEFILE64 -typedef int (*__nftw64_func_t) (__const char *__filename, - __const struct stat64 *__status, +typedef int (*__nftw64_func_t) (const char *__filename, + const struct stat64 *__status, int __flag, struct FTW *__info); # endif #endif @@ -134,18 +134,18 @@ typedef int (*__nftw64_func_t) (__const char *__filename, This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 -extern int ftw (__const char *__dir, __ftw_func_t __func, int __descriptors) +extern int ftw (const char *__dir, __ftw_func_t __func, int __descriptors) __nonnull ((1, 2)); # else # ifdef __REDIRECT -extern int __REDIRECT (ftw, (__const char *__dir, __ftw_func_t __func, +extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func, int __descriptors), ftw64) __nonnull ((1, 2)); # else # define ftw ftw64 # endif # endif # ifdef __USE_LARGEFILE64 -extern int ftw64 (__const char *__dir, __ftw64_func_t __func, +extern int ftw64 (const char *__dir, __ftw64_func_t __func, int __descriptors) __nonnull ((1, 2)); # endif #endif @@ -157,11 +157,11 @@ extern int ftw64 (__const char *__dir, __ftw64_func_t __func, This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 -extern int nftw (__const char *__dir, __nftw_func_t __func, int __descriptors, +extern int nftw (const char *__dir, __nftw_func_t __func, int __descriptors, int __flag) __nonnull ((1, 2)); # else # ifdef __REDIRECT -extern int __REDIRECT (nftw, (__const char *__dir, __nftw_func_t __func, +extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func, int __descriptors, int __flag), nftw64) __nonnull ((1, 2)); # else @@ -169,7 +169,7 @@ extern int __REDIRECT (nftw, (__const char *__dir, __nftw_func_t __func, # endif # endif # ifdef __USE_LARGEFILE64 -extern int nftw64 (__const char *__dir, __nftw64_func_t __func, +extern int nftw64 (const char *__dir, __nftw64_func_t __func, int __descriptors, int __flag) __nonnull ((1, 2)); # endif #endif diff --git a/include/glob.h b/include/glob.h index aa87438f8..6d712e56d 100644 --- a/include/glob.h +++ b/include/glob.h @@ -109,13 +109,13 @@ typedef struct #else void *(*gl_readdir) (void *); #endif - void *(*gl_opendir) (__const char *); + void *(*gl_opendir) (const char *); #ifdef __USE_GNU - int (*gl_lstat) (__const char *__restrict, struct stat *__restrict); - int (*gl_stat) (__const char *__restrict, struct stat *__restrict); + int (*gl_lstat) (const char *__restrict, struct stat *__restrict); + int (*gl_stat) (const char *__restrict, struct stat *__restrict); #else - int (*gl_lstat) (__const char *__restrict, void *__restrict); - int (*gl_stat) (__const char *__restrict, void *__restrict); + int (*gl_lstat) (const char *__restrict, void *__restrict); + int (*gl_stat) (const char *__restrict, void *__restrict); #endif #endif #endif /* __UCLIBC_HAS_GNU_GLOB__ */ @@ -142,13 +142,13 @@ typedef struct # else void *(*gl_readdir) (void *); # endif - void *(*gl_opendir) (__const char *); + void *(*gl_opendir) (const char *); # ifdef __USE_GNU - int (*gl_lstat) (__const char *__restrict, struct stat64 *__restrict); - int (*gl_stat) (__const char *__restrict, struct stat64 *__restrict); + int (*gl_lstat) (const char *__restrict, struct stat64 *__restrict); + int (*gl_stat) (const char *__restrict, struct stat64 *__restrict); # else - int (*gl_lstat) (__const char *__restrict, void *__restrict); - int (*gl_stat) (__const char *__restrict, void *__restrict); + int (*gl_lstat) (const char *__restrict, void *__restrict); + int (*gl_stat) (const char *__restrict, void *__restrict); # endif #endif #endif /* __UCLIBC_HAS_GNU_GLOB__ */ @@ -169,8 +169,8 @@ typedef struct If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. Otherwise, `glob' returns zero. */ #if !defined __USE_FILE_OFFSET64 || __GNUC__ < 2 -extern int glob (__const char *__restrict __pattern, int __flags, - int (*__errfunc) (__const char *, int), +extern int glob (const char *__restrict __pattern, int __flags, + int (*__errfunc) (const char *, int), glob_t *__restrict __pglob) __THROW; libc_hidden_proto(glob) @@ -178,17 +178,17 @@ libc_hidden_proto(glob) extern void globfree (glob_t *__pglob) __THROW; libc_hidden_proto(globfree) #else -extern int __REDIRECT_NTH (glob, (__const char *__restrict __pattern, +extern int __REDIRECT_NTH (glob, (const char *__restrict __pattern, int __flags, - int (*__errfunc) (__const char *, int), + int (*__errfunc) (const char *, int), glob_t *__restrict __pglob), glob64); extern void __REDIRECT_NTH (globfree, (glob_t *__pglob), globfree64); #endif #ifdef __USE_LARGEFILE64 -extern int glob64 (__const char *__restrict __pattern, int __flags, - int (*__errfunc) (__const char *, int), +extern int glob64 (const char *__restrict __pattern, int __flags, + int (*__errfunc) (const char *, int), glob64_t *__restrict __pglob) __THROW; libc_hidden_proto(glob64) @@ -203,7 +203,7 @@ libc_hidden_proto(globfree64) This function is not part of the interface specified by POSIX.2 but several programs want to use it. */ -extern int glob_pattern_p (__const char *__pattern, int __quote) __THROW; +extern int glob_pattern_p (const char *__pattern, int __quote) __THROW; libc_hidden_proto(glob_pattern_p) #endif diff --git a/include/grp.h b/include/grp.h index b84ca46dd..676100eb0 100644 --- a/include/grp.h +++ b/include/grp.h @@ -91,7 +91,7 @@ extern struct group *fgetgrent (FILE *__stream); cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern int putgrent (__const struct group *__restrict __p, +extern int putgrent (const struct group *__restrict __p, FILE *__restrict __f); #endif @@ -105,7 +105,7 @@ extern struct group *getgrgid (__gid_t __gid); This function is a possible cancellation point and therefore not marked with __THROW. */ -extern struct group *getgrnam (__const char *__name); +extern struct group *getgrnam (const char *__name); #if defined __USE_POSIX || defined __USE_MISC @@ -148,7 +148,7 @@ libc_hidden_proto(getgrgid_r) This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int getgrnam_r (__const char *__restrict __name, +extern int getgrnam_r (const char *__restrict __name, struct group *__restrict __resultbuf, char *__restrict __buffer, size_t __buflen, struct group **__restrict __result); @@ -186,7 +186,7 @@ libc_hidden_proto(fgetgrent_r) cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern int getgrouplist (__const char *__user, __gid_t __group, +extern int getgrouplist (const char *__user, __gid_t __group, __gid_t *__groups, int *__ngroups); #endif @@ -194,7 +194,7 @@ extern int getgrouplist (__const char *__user, __gid_t __group, #if defined __USE_BSD /* Set the group set for the current user to GROUPS (N of them). */ -extern int setgroups (size_t __n, __const __gid_t *__groups) __THROW; +extern int setgroups (size_t __n, const __gid_t *__groups) __THROW; libc_hidden_proto(setgroups) /* Initialize the group set for the current user @@ -205,7 +205,7 @@ libc_hidden_proto(setgroups) cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern int initgroups (__const char *__user, __gid_t __group); +extern int initgroups (const char *__user, __gid_t __group); #endif /* Use BSD. */ diff --git a/include/iconv.h b/include/iconv.h index 847ada64e..d850de56e 100644 --- a/include/iconv.h +++ b/include/iconv.h @@ -38,7 +38,7 @@ typedef void *iconv_t; This function is a possible cancellation points and therefore not marked with __THROW. */ -extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode); +extern iconv_t iconv_open (const char *__tocode, const char *__fromcode); /* Convert at most *INBYTESLEFT bytes from *INBUF according to the code conversion algorithm specified by CD and place up to diff --git a/include/inttypes.h b/include/inttypes.h index 554efdc3f..fa6339869 100644 --- a/include/inttypes.h +++ b/include/inttypes.h @@ -303,21 +303,21 @@ extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) __THROW __attribute__ ((__const__)); /* Like `strtol' but convert to `intmax_t'. */ -extern intmax_t strtoimax (__const char *__restrict __nptr, +extern intmax_t strtoimax (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW; /* Like `strtoul' but convert to `uintmax_t'. */ -extern uintmax_t strtoumax (__const char *__restrict __nptr, +extern uintmax_t strtoumax (const char *__restrict __nptr, char ** __restrict __endptr, int __base) __THROW; #ifdef __UCLIBC_HAS_WCHAR__ /* Like `wcstol' but convert to `intmax_t'. */ -extern intmax_t wcstoimax (__const __gwchar_t *__restrict __nptr, +extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr, __gwchar_t **__restrict __endptr, int __base) __THROW; /* Like `wcstoul' but convert to `uintmax_t'. */ -extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr, +extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr, __gwchar_t ** __restrict __endptr, int __base) __THROW; #endif @@ -326,44 +326,44 @@ extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr, # if __WORDSIZE == 64 -extern long int __strtol_internal (__const char *__restrict __nptr, +extern long int __strtol_internal (const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) __THROW __nonnull ((1)) __wur; /* Like `strtol' but convert to `intmax_t'. */ __extern_inline intmax_t -__NTH (strtoimax (__const char *__restrict nptr, char **__restrict endptr, +__NTH (strtoimax (const char *__restrict nptr, char **__restrict endptr, int base)) { return __strtol_internal (nptr, endptr, base, 0); } -extern unsigned long int __strtoul_internal (__const char * +extern unsigned long int __strtoul_internal (const char * __restrict __nptr, char ** __restrict __endptr, int __base, int __group) __THROW __nonnull ((1)) __wur; /* Like `strtoul' but convert to `uintmax_t'. */ __extern_inline uintmax_t -__NTH (strtoumax (__const char *__restrict nptr, char **__restrict endptr, +__NTH (strtoumax (const char *__restrict nptr, char **__restrict endptr, int base)) { return __strtoul_internal (nptr, endptr, base, 0); } -extern long int __wcstol_internal (__const __gwchar_t * __restrict __nptr, +extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr, __gwchar_t **__restrict __endptr, int __base, int __group) __THROW __nonnull ((1)) __wur; /* Like `wcstol' but convert to `intmax_t'. */ __extern_inline intmax_t -__NTH (wcstoimax (__const __gwchar_t *__restrict nptr, +__NTH (wcstoimax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)) { return __wcstol_internal (nptr, endptr, base, 0); } -extern unsigned long int __wcstoul_internal (__const __gwchar_t * +extern unsigned long int __wcstoul_internal (const __gwchar_t * __restrict __nptr, __gwchar_t ** __restrict __endptr, @@ -371,7 +371,7 @@ extern unsigned long int __wcstoul_internal (__const __gwchar_t * __THROW __nonnull ((1)) __wur; /* Like `wcstoul' but convert to `uintmax_t'. */ __extern_inline uintmax_t -__NTH (wcstoumax (__const __gwchar_t *__restrict nptr, +__NTH (wcstoumax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)) { return __wcstoul_internal (nptr, endptr, base, 0); @@ -380,20 +380,20 @@ __NTH (wcstoumax (__const __gwchar_t *__restrict nptr, # else /* __WORDSIZE == 32 */ __extension__ -extern long long int __strtoll_internal (__const char *__restrict __nptr, +extern long long int __strtoll_internal (const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) __THROW __nonnull ((1)) __wur; /* Like `strtol' but convert to `intmax_t'. */ __extern_inline intmax_t -__NTH (strtoimax (__const char *__restrict nptr, char **__restrict endptr, +__NTH (strtoimax (const char *__restrict nptr, char **__restrict endptr, int base)) { return __strtoll_internal (nptr, endptr, base, 0); } __extension__ -extern unsigned long long int __strtoull_internal (__const char * +extern unsigned long long int __strtoull_internal (const char * __restrict __nptr, char ** __restrict __endptr, @@ -402,21 +402,21 @@ extern unsigned long long int __strtoull_internal (__const char * __THROW __nonnull ((1)) __wur; /* Like `strtoul' but convert to `uintmax_t'. */ __extern_inline uintmax_t -__NTH (strtoumax (__const char *__restrict nptr, char **__restrict endptr, +__NTH (strtoumax (const char *__restrict nptr, char **__restrict endptr, int base)) { return __strtoull_internal (nptr, endptr, base, 0); } __extension__ -extern long long int __wcstoll_internal (__const __gwchar_t * +extern long long int __wcstoll_internal (const __gwchar_t * __restrict __nptr, __gwchar_t **__restrict __endptr, int __base, int __group) __THROW __nonnull ((1)) __wur; /* Like `wcstol' but convert to `intmax_t'. */ __extern_inline intmax_t -__NTH (wcstoimax (__const __gwchar_t *__restrict nptr, +__NTH (wcstoimax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)) { return __wcstoll_internal (nptr, endptr, base, 0); @@ -424,7 +424,7 @@ __NTH (wcstoimax (__const __gwchar_t *__restrict nptr, __extension__ -extern unsigned long long int __wcstoull_internal (__const __gwchar_t * +extern unsigned long long int __wcstoull_internal (const __gwchar_t * __restrict __nptr, __gwchar_t ** __restrict __endptr, @@ -433,7 +433,7 @@ extern unsigned long long int __wcstoull_internal (__const __gwchar_t * __THROW __nonnull ((1)) __wur; /* Like `wcstoul' but convert to `uintmax_t'. */ __extern_inline uintmax_t -__NTH (wcstoumax (__const __gwchar_t *__restrict nptr, +__NTH (wcstoumax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)) { return __wcstoull_internal (nptr, endptr, base, 0); diff --git a/include/libintl.h b/include/libintl.h index feadc3e5e..0cbf758ed 100644 --- a/include/libintl.h +++ b/include/libintl.h @@ -38,46 +38,46 @@ __BEGIN_DECLS /* Look up MSGID in the current default message catalog for the current LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ -extern char *gettext (__const char *__msgid) +extern char *gettext (const char *__msgid) __THROW __attribute_format_arg__ (1); /* Look up MSGID in the DOMAINNAME message catalog for the current LC_MESSAGES locale. */ -extern char *dgettext (__const char *__domainname, __const char *__msgid) +extern char *dgettext (const char *__domainname, const char *__msgid) __THROW __attribute_format_arg__ (2); #if 0 /* uClibc: disabled */ -extern char *__dgettext (__const char *__domainname, __const char *__msgid) +extern char *__dgettext (const char *__domainname, const char *__msgid) __THROW __attribute_format_arg__ (2); #endif /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ -extern char *dcgettext (__const char *__domainname, - __const char *__msgid, int __category) +extern char *dcgettext (const char *__domainname, + const char *__msgid, int __category) __THROW __attribute_format_arg__ (2); #if 0 /* uClibc: disabled */ -extern char *__dcgettext (__const char *__domainname, - __const char *__msgid, int __category) +extern char *__dcgettext (const char *__domainname, + const char *__msgid, int __category) __THROW __attribute_format_arg__ (2); #endif /* Similar to `gettext' but select the plural form corresponding to the number N. */ -extern char *ngettext (__const char *__msgid1, __const char *__msgid2, +extern char *ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n) __THROW __attribute_format_arg__ (1) __attribute_format_arg__ (2); /* Similar to `dgettext' but select the plural form corresponding to the number N. */ -extern char *dngettext (__const char *__domainname, __const char *__msgid1, - __const char *__msgid2, unsigned long int __n) +extern char *dngettext (const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n) __THROW __attribute_format_arg__ (2) __attribute_format_arg__ (3); /* Similar to `dcgettext' but select the plural form corresponding to the number N. */ -extern char *dcngettext (__const char *__domainname, __const char *__msgid1, - __const char *__msgid2, unsigned long int __n, +extern char *dcngettext (const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n, int __category) __THROW __attribute_format_arg__ (2) __attribute_format_arg__ (3); @@ -85,17 +85,17 @@ extern char *dcngettext (__const char *__domainname, __const char *__msgid1, /* Set the current default message catalog to DOMAINNAME. If DOMAINNAME is null, return the current default. If DOMAINNAME is "", reset to the default of "messages". */ -extern char *textdomain (__const char *__domainname) __THROW; +extern char *textdomain (const char *__domainname) __THROW; /* Specify that the DOMAINNAME message catalog will be found in DIRNAME rather than in the system locale data base. */ -extern char *bindtextdomain (__const char *__domainname, - __const char *__dirname) __THROW; +extern char *bindtextdomain (const char *__domainname, + const char *__dirname) __THROW; /* Specify the character encoding in which the messages from the DOMAINNAME message catalog will be returned. */ -extern char *bind_textdomain_codeset (__const char *__domainname, - __const char *__codeset) __THROW; +extern char *bind_textdomain_codeset (const char *__domainname, + const char *__codeset) __THROW; /* Optimized version of the function above. */ diff --git a/include/locale.h b/include/locale.h index 49db759be..3cd6f5ef3 100644 --- a/include/locale.h +++ b/include/locale.h @@ -123,7 +123,7 @@ struct lconv /* Set and/or return the current locale. */ -extern char *setlocale (int __category, __const char *__locale) __THROW; +extern char *setlocale (int __category, const char *__locale) __THROW; /* Return the numeric/monetary information for the current locale. */ extern struct lconv *localeconv (void) __THROW; @@ -151,7 +151,7 @@ __END_NAMESPACE_STD datasets. Unlike for the CATEGORY parameter for `setlocale' the CATEGORY_MASK parameter here uses a single bit for each category, made by OR'ing together LC_*_MASK bits above. */ -extern __locale_t newlocale (int __category_mask, __const char *__locale, +extern __locale_t newlocale (int __category_mask, const char *__locale, __locale_t __base) __THROW; libc_hidden_proto(newlocale) diff --git a/include/mntent.h b/include/mntent.h index daa0a60ea..f9f119db5 100644 --- a/include/mntent.h +++ b/include/mntent.h @@ -63,7 +63,7 @@ struct mntent /* Prepare to begin reading and/or writing mount table entries from the beginning of FILE. MODE is as for `fopen'. */ -extern FILE *setmntent (__const char *__file, __const char *__mode) __THROW; +extern FILE *setmntent (const char *__file, const char *__mode) __THROW; libc_hidden_proto(setmntent) /* Read one mount table entry from STREAM. Returns a pointer to storage @@ -83,7 +83,7 @@ libc_hidden_proto(getmntent_r) /* Write the mount table entry described by MNT to STREAM. Return zero on success, nonzero on failure. */ extern int addmntent (FILE *__restrict __stream, - __const struct mntent *__restrict __mnt) __THROW; + const struct mntent *__restrict __mnt) __THROW; /* Close a stream opened with `setmntent'. */ extern int endmntent (FILE *__stream) __THROW; @@ -91,8 +91,8 @@ libc_hidden_proto(endmntent) /* Search MNT->mnt_opts for an option matching OPT. Returns the address of the substring, or null if none found. */ -extern char *hasmntopt (__const struct mntent *__mnt, - __const char *__opt) __THROW; +extern char *hasmntopt (const struct mntent *__mnt, + const char *__opt) __THROW; __END_DECLS diff --git a/include/net/if.h b/include/net/if.h index 4cb641407..67636e0fc 100644 --- a/include/net/if.h +++ b/include/net/if.h @@ -190,7 +190,7 @@ struct ifconf __BEGIN_DECLS /* Convert an interface name to an index, and vice versa. */ -extern unsigned int if_nametoindex (__const char *__ifname) __THROW; +extern unsigned int if_nametoindex (const char *__ifname) __THROW; libc_hidden_proto(if_nametoindex) extern char *if_indextoname (unsigned int __ifindex, char *__ifname) __THROW; diff --git a/include/netdb.h b/include/netdb.h index 91c9dcd65..14cf3d24d 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -118,11 +118,11 @@ extern int h_errno; #if defined __USE_MISC || defined __USE_GNU /* Print error indicated by `h_errno' variable on standard error. STR if non-null is printed before the error string. */ -extern void herror (__const char *__str) __THROW; +extern void herror (const char *__str) __THROW; libc_hidden_proto(herror) /* Return string associated with error ERR_NUM. */ -extern __const char *hstrerror (int __err_num) __THROW; +extern const char *hstrerror (int __err_num) __THROW; #endif @@ -164,7 +164,7 @@ extern struct hostent *gethostent (void); This function is a possible cancellation point and therefore not marked with __THROW. */ -extern struct hostent *gethostbyaddr (__const void *__addr, __socklen_t __len, +extern struct hostent *gethostbyaddr (const void *__addr, __socklen_t __len, int __type); libc_hidden_proto(gethostbyaddr) @@ -172,7 +172,7 @@ libc_hidden_proto(gethostbyaddr) This function is a possible cancellation point and therefore not marked with __THROW. */ -extern struct hostent *gethostbyname (__const char *__name); +extern struct hostent *gethostbyname (const char *__name); libc_hidden_proto(gethostbyname) #ifdef __USE_MISC @@ -184,7 +184,7 @@ libc_hidden_proto(gethostbyname) cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern struct hostent *gethostbyname2 (__const char *__name, int __af); +extern struct hostent *gethostbyname2 (const char *__name, int __af); libc_hidden_proto(gethostbyname2) /* Reentrant versions of the functions above. The additional @@ -203,7 +203,7 @@ extern int gethostent_r (struct hostent *__restrict __result_buf, int *__restrict __h_errnop); libc_hidden_proto(gethostent_r) -extern int gethostbyaddr_r (__const void *__restrict __addr, __socklen_t __len, +extern int gethostbyaddr_r (const void *__restrict __addr, __socklen_t __len, int __type, struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, @@ -211,14 +211,14 @@ extern int gethostbyaddr_r (__const void *__restrict __addr, __socklen_t __len, int *__restrict __h_errnop); libc_hidden_proto(gethostbyaddr_r) -extern int gethostbyname_r (__const char *__restrict __name, +extern int gethostbyname_r (const char *__restrict __name, struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, int *__restrict __h_errnop); libc_hidden_proto(gethostbyname_r) -extern int gethostbyname2_r (__const char *__restrict __name, int __af, +extern int gethostbyname2_r (const char *__restrict __name, int __af, struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, @@ -260,7 +260,7 @@ extern struct netent *getnetbyaddr (uint32_t __net, int __type); This function is a possible cancellation point and therefore not marked with __THROW. */ -extern struct netent *getnetbyname (__const char *__name); +extern struct netent *getnetbyname (const char *__name); #ifdef __USE_MISC /* Reentrant versions of the functions above. The additional @@ -286,7 +286,7 @@ extern int getnetbyaddr_r (uint32_t __net, int __type, int *__restrict __h_errnop); libc_hidden_proto(getnetbyaddr_r) -extern int getnetbyname_r (__const char *__restrict __name, +extern int getnetbyname_r (const char *__restrict __name, struct netent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct netent **__restrict __result, @@ -331,15 +331,15 @@ extern struct servent *getservent (void); This function is a possible cancellation point and therefore not marked with __THROW. */ -extern struct servent *getservbyname (__const char *__name, - __const char *__proto); +extern struct servent *getservbyname (const char *__name, + const char *__proto); /* Return entry from service data base which matches port PORT and protocol PROTO. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern struct servent *getservbyport (int __port, __const char *__proto); +extern struct servent *getservbyport (int __port, const char *__proto); libc_hidden_proto(getservbyport) @@ -356,14 +356,14 @@ extern int getservent_r (struct servent *__restrict __result_buf, struct servent **__restrict __result); libc_hidden_proto(getservent_r) -extern int getservbyname_r (__const char *__restrict __name, - __const char *__restrict __proto, +extern int getservbyname_r (const char *__restrict __name, + const char *__restrict __proto, struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); libc_hidden_proto(getservbyname_r) -extern int getservbyport_r (int __port, __const char *__restrict __proto, +extern int getservbyport_r (int __port, const char *__restrict __proto, struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); @@ -405,7 +405,7 @@ extern struct protoent *getprotoent (void); This function is a possible cancellation point and therefore not marked with __THROW. */ -extern struct protoent *getprotobyname (__const char *__name); +extern struct protoent *getprotobyname (const char *__name); /* Return entry from protocol data base which number is PROTO. @@ -427,7 +427,7 @@ extern int getprotoent_r (struct protoent *__restrict __result_buf, struct protoent **__restrict __result); libc_hidden_proto(getprotoent_r) -extern int getprotobyname_r (__const char *__restrict __name, +extern int getprotobyname_r (const char *__restrict __name, struct protoent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct protoent **__restrict __result); @@ -447,7 +447,7 @@ libc_hidden_proto(getprotobynumber_r) cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern int setnetgrent (__const char *__netgroup); +extern int setnetgrent (const char *__netgroup); /* Free all space allocated by previous `setnetgrent' call. @@ -475,8 +475,8 @@ extern int getnetgrent (char **__restrict __hostp, cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern int innetgr (__const char *__netgroup, __const char *__host, - __const char *__user, __const char *__domain); +extern int innetgr (const char *__netgroup, const char *__host, + const char *__user, const char *__domain); /* Reentrant version of `getnetgrent' where result is placed in BUFFER. @@ -511,9 +511,9 @@ libc_hidden_proto(ruserpass) or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rcmd (char **__restrict __ahost, unsigned short int __rport, - __const char *__restrict __locuser, - __const char *__restrict __remuser, - __const char *__restrict __cmd, int *__restrict __fd2p); + const char *__restrict __locuser, + const char *__restrict __remuser, + const char *__restrict __cmd, int *__restrict __fd2p); #if 0 /* FIXME */ @@ -525,9 +525,9 @@ extern int rcmd (char **__restrict __ahost, unsigned short int __rport, or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport, - __const char *__restrict __locuser, - __const char *__restrict __remuser, - __const char *__restrict __cmd, int *__restrict __fd2p, + const char *__restrict __locuser, + const char *__restrict __remuser, + const char *__restrict __cmd, int *__restrict __fd2p, sa_family_t __af); #endif @@ -542,9 +542,9 @@ extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport, or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rexec (char **__restrict __ahost, int __rport, - __const char *__restrict __name, - __const char *__restrict __pass, - __const char *__restrict __cmd, int *__restrict __fd2p); + const char *__restrict __name, + const char *__restrict __pass, + const char *__restrict __cmd, int *__restrict __fd2p); /* This is the equivalent function where the protocol can be selected and which therefore can be used for IPv6. @@ -554,9 +554,9 @@ extern int rexec (char **__restrict __ahost, int __rport, or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rexec_af (char **__restrict __ahost, int __rport, - __const char *__restrict __name, - __const char *__restrict __pass, - __const char *__restrict __cmd, int *__restrict __fd2p, + const char *__restrict __name, + const char *__restrict __pass, + const char *__restrict __cmd, int *__restrict __fd2p, sa_family_t __af); libc_hidden_proto(rexec_af) @@ -568,8 +568,8 @@ libc_hidden_proto(rexec_af) cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern int ruserok (__const char *__rhost, int __suser, - __const char *__remuser, __const char *__locuser); +extern int ruserok (const char *__rhost, int __suser, + const char *__remuser, const char *__locuser); #if 0 /* FIXME */ @@ -580,8 +580,8 @@ extern int ruserok (__const char *__rhost, int __suser, cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern int ruserok_af (__const char *__rhost, int __suser, - __const char *__remuser, __const char *__locuser, +extern int ruserok_af (const char *__rhost, int __suser, + const char *__remuser, const char *__locuser, sa_family_t __af); #endif @@ -690,9 +690,9 @@ struct addrinfo This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int getaddrinfo (__const char *__restrict __name, - __const char *__restrict __service, - __const struct addrinfo *__restrict __req, +extern int getaddrinfo (const char *__restrict __name, + const char *__restrict __service, + const struct addrinfo *__restrict __req, struct addrinfo **__restrict __pai); libc_hidden_proto(getaddrinfo) @@ -701,13 +701,13 @@ extern void freeaddrinfo (struct addrinfo *__ai) __THROW; libc_hidden_proto(freeaddrinfo) /* Convert error return from getaddrinfo() to a string. */ -extern __const char *gai_strerror (int __ecode) __THROW; +extern const char *gai_strerror (int __ecode) __THROW; /* Translate a socket address to a location and service name. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int getnameinfo (__const struct sockaddr *__restrict __sa, +extern int getnameinfo (const struct sockaddr *__restrict __sa, socklen_t __salen, char *__restrict __host, socklen_t __hostlen, char *__restrict __serv, socklen_t __servlen, unsigned int __flags); diff --git a/include/netinet/ether.h b/include/netinet/ether.h index 91fa12115..546282066 100644 --- a/include/netinet/ether.h +++ b/include/netinet/ether.h @@ -33,27 +33,27 @@ __BEGIN_DECLS #if defined __UCLIBC_HAS_SOCKET__ || defined __UCLIBC_HAS_IPV4__ || \ defined __UCLIBC_HAS_IPV6__ /* 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; libc_hidden_proto(ether_ntoa_r) /* 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; libc_hidden_proto(ether_aton_r) /* 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; #endif 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 */ diff --git a/include/nl_types.h b/include/nl_types.h index 1e09dea26..cb86cf0cd 100644 --- a/include/nl_types.h +++ b/include/nl_types.h @@ -48,12 +48,12 @@ typedef int nl_item; This function is a possible cancellation point and therefore not marked with __THROW. */ -extern nl_catd catopen (__const char *__cat_name, int __flag) __nonnull ((1)); +extern nl_catd catopen (const char *__cat_name, int __flag) __nonnull ((1)); /* Return translation with NUMBER in SET of CATALOG; if not found return STRING. */ extern char *catgets (nl_catd __catalog, int __set, int __number, - __const char *__string) __THROW __nonnull ((1)); + const char *__string) __THROW __nonnull ((1)); /* Close message CATALOG. */ extern int catclose (nl_catd __catalog) __THROW __nonnull ((1)); diff --git a/include/printf.h b/include/printf.h index 196af3cc6..c6467a0ef 100644 --- a/include/printf.h +++ b/include/printf.h @@ -142,14 +142,14 @@ struct printf_info { #ifdef __UCLIBC_HAS_GLIBC_CUSTOM_PRINTF__ typedef int (*printf_function) (FILE *__stream, - __const struct printf_info *__info, - __const void *__const *__args); + const struct printf_info *__info, + const void *const *__args); /* Type of a printf specifier-arginfo function. INFO gives information about the format specification. N, ARGTYPES, and return value are as for parse_printf_format. */ -typedef int printf_arginfo_function (__const struct printf_info *__info, +typedef int printf_arginfo_function (const struct printf_info *__info, size_t __n, int *__argtypes); @@ -173,7 +173,7 @@ extern int register_printf_function (int __spec, printf_function __func, array it is passed with the types of the arguments it wants, and return the number of arguments it wants. */ -extern size_t parse_printf_format (__const char *__restrict __fmt, size_t __n, +extern size_t parse_printf_format (const char *__restrict __fmt, size_t __n, int *__restrict __argtypes) __THROW; @@ -221,11 +221,11 @@ enum { /* C type: */ the format specifier is a uppercase character powers of 1000 are used. Otherwise powers of 1024. */ extern int printf_size (FILE *__restrict __fp, - __const struct printf_info *__info, - __const void *__const *__restrict __args) __THROW; + const struct printf_info *__info, + const void *const *__restrict __args) __THROW; /* This is the appropriate argument information function for `printf_size'. */ -extern int printf_size_info (__const struct printf_info *__restrict +extern int printf_size_info (const struct printf_info *__restrict __info, size_t __n, int *__restrict __argtypes) __THROW; diff --git a/include/pwd.h b/include/pwd.h index 1f39e25c4..23b4710c8 100644 --- a/include/pwd.h +++ b/include/pwd.h @@ -99,7 +99,7 @@ extern struct passwd *fgetpwent (FILE *__stream); cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern int putpwent (__const struct passwd *__restrict __p, +extern int putpwent (const struct passwd *__restrict __p, FILE *__restrict __f); #endif @@ -113,7 +113,7 @@ extern struct passwd *getpwuid (__uid_t __uid); This function is a possible cancellation point and therefore not marked with __THROW. */ -extern struct passwd *getpwnam (__const char *__name); +extern struct passwd *getpwnam (const char *__name); #if defined __USE_POSIX || defined __USE_MISC @@ -148,7 +148,7 @@ extern int getpwuid_r (__uid_t __uid, struct passwd **__restrict __result); libc_hidden_proto(getpwuid_r) -extern int getpwnam_r (__const char *__restrict __name, +extern int getpwnam_r (const char *__restrict __name, struct passwd *__restrict __resultbuf, char *__restrict __buffer, size_t __buflen, struct passwd **__restrict __result); diff --git a/include/regexp.h b/include/regexp.h index 22894f2c8..17879aed1 100644 --- a/include/regexp.h +++ b/include/regexp.h @@ -102,7 +102,7 @@ extern char *locs; on the macros. */ char * compile (char *__restrict instring, char *__restrict expbuf, - __const char *__restrict endbuf, int eof) + const char *__restrict endbuf, int eof) { char *__input_buffer = NULL; size_t __input_size = 0; @@ -215,14 +215,14 @@ compile (char *__restrict instring, char *__restrict expbuf, found in the buffer starting at EXPBUF. `loc1' will return the first character matched and `loc2' points to the next unmatched character. */ -extern int step (__const char *__restrict __string, - __const char *__restrict __expbuf) __THROW; +extern int step (const char *__restrict __string, + const char *__restrict __expbuf) __THROW; /* Match the beginning of STRING with the compiled regular expression in EXPBUF. If the match is successful `loc2' will contain the position of the first unmatched character. */ -extern int advance (__const char *__restrict __string, - __const char *__restrict __expbuf) __THROW; +extern int advance (const char *__restrict __string, + const char *__restrict __expbuf) __THROW; #endif diff --git a/include/rpc/auth.h b/include/rpc/auth.h index e2c7987dc..70066fe52 100644 --- a/include/rpc/auth.h +++ b/include/rpc/auth.h @@ -193,11 +193,11 @@ extern AUTH *authdes_pk_create (const char *, netobj *, u_int, * */ extern int getnetname (char *) __THROW; -extern int host2netname (char *, __const char *, __const char *) __THROW; -extern int user2netname (char *, __const uid_t, __const char *) __THROW; -extern int netname2user (__const char *, uid_t *, gid_t *, int *, gid_t *) +extern int host2netname (char *, const char *, const char *) __THROW; +extern int user2netname (char *, const uid_t, const char *) __THROW; +extern int netname2user (const char *, uid_t *, gid_t *, int *, gid_t *) __THROW; -extern int netname2host (__const char *, char *, __const int) __THROW; +extern int netname2host (const char *, char *, const int) __THROW; /* * diff --git a/include/rpc/auth_des.h b/include/rpc/auth_des.h index 6bd5bdeb6..bcd96e424 100644 --- a/include/rpc/auth_des.h +++ b/include/rpc/auth_des.h @@ -88,22 +88,22 @@ struct authdes_verf #define adv_nickname adv_int_u /* Map a des credential into a unix cred. */ -extern int authdes_getucred (__const struct authdes_cred * __adc, +extern int authdes_getucred (const struct authdes_cred * __adc, uid_t * __uid, gid_t * __gid, short *__grouplen, gid_t * __groups) __THROW; /* Get the public key for NAME and place it in KEY. NAME can only be up to MAXNETNAMELEN bytes long and the destination buffer KEY should have HEXKEYBYTES + 1 bytes long to fit all characters from the key. */ -extern int getpublickey (__const char *__name, char *__key) __THROW; +extern int getpublickey (const char *__name, char *__key) __THROW; /* Get the secret key for NAME and place it in KEY. PASSWD is used to decrypt the encrypted key stored in the database. NAME can only be up to MAXNETNAMELEN bytes long and the destination buffer KEY should have HEXKEYBYTES + 1 bytes long to fit all characters from the key. */ -extern int getsecretkey (__const char *__name, char *__key, - __const char *__passwd) __THROW; +extern int getsecretkey (const char *__name, char *__key, + const char *__passwd) __THROW; #endif extern int rtime (struct sockaddr_in *__addrp, struct rpc_timeval *__timep, diff --git a/include/rpc/clnt.h b/include/rpc/clnt.h index 608c7e7d3..32da6b4e5 100644 --- a/include/rpc/clnt.h +++ b/include/rpc/clnt.h @@ -281,7 +281,7 @@ struct CLIENT { * u_long prog; * u_long vers; */ -extern CLIENT *clntraw_create (__const u_long __prog, __const u_long __vers) +extern CLIENT *clntraw_create (const u_long __prog, const u_long __vers) __THROW; @@ -295,8 +295,8 @@ extern CLIENT *clntraw_create (__const u_long __prog, __const u_long __vers) * u_ong vers; -- version number * char *prot; -- protocol */ -extern CLIENT *clnt_create (__const char *__host, __const u_long __prog, - __const u_long __vers, __const char *__prot) +extern CLIENT *clnt_create (const char *__host, const u_long __prog, + const u_long __vers, const char *__prot) __THROW; @@ -365,18 +365,18 @@ extern CLIENT *clntunix_create (struct sockaddr_un *__raddr, u_long __program, libc_hidden_proto(clntunix_create) -extern int callrpc (__const char *__host, __const u_long __prognum, - __const u_long __versnum, __const u_long __procnum, - __const xdrproc_t __inproc, __const char *__in, - __const xdrproc_t __outproc, char *__out) __THROW; +extern int callrpc (const char *__host, const u_long __prognum, + const u_long __versnum, const u_long __procnum, + const xdrproc_t __inproc, const char *__in, + const xdrproc_t __outproc, char *__out) __THROW; extern int _rpc_dtablesize (void) __THROW; libc_hidden_proto(_rpc_dtablesize) /* * Print why creation failed */ -extern void clnt_pcreateerror (__const char *__msg); /* stderr */ -extern char *clnt_spcreateerror(__const char *__msg) __THROW; /* string */ +extern void clnt_pcreateerror (const char *__msg); /* stderr */ +extern char *clnt_spcreateerror(const char *__msg) __THROW; /* string */ libc_hidden_proto(clnt_spcreateerror) /* @@ -387,10 +387,10 @@ extern void clnt_perrno (enum clnt_stat __num); /* stderr */ /* * Print an English error message, given the client error code */ -extern void clnt_perror (CLIENT *__clnt, __const char *__msg); +extern void clnt_perror (CLIENT *__clnt, const char *__msg); /* stderr */ libc_hidden_proto(clnt_perror) -extern char *clnt_sperror (CLIENT *__clnt, __const char *__msg) __THROW; +extern char *clnt_sperror (CLIENT *__clnt, const char *__msg) __THROW; /* string */ libc_hidden_proto(clnt_sperror) @@ -416,7 +416,7 @@ libc_hidden_proto(clnt_sperrno) /* * get the port number on the host for the rpc program,version and proto */ -extern int getrpcport (__const char * __host, u_long __prognum, +extern int getrpcport (const char * __host, u_long __prognum, u_long __versnum, u_int proto) __THROW; /* diff --git a/include/rpc/netdb.h b/include/rpc/netdb.h index e9a6565ad..764b8cf1a 100644 --- a/include/rpc/netdb.h +++ b/include/rpc/netdb.h @@ -54,7 +54,7 @@ extern void setrpcent (int __stayopen) __THROW; libc_hidden_proto(setrpcent) extern void endrpcent (void) __THROW; libc_hidden_proto(endrpcent) -extern struct rpcent *getrpcbyname (__const char *__name) __THROW; +extern struct rpcent *getrpcbyname (const char *__name) __THROW; libc_hidden_proto(getrpcbyname) extern struct rpcent *getrpcbynumber (int __number) __THROW; libc_hidden_proto(getrpcbynumber) @@ -62,7 +62,7 @@ extern struct rpcent *getrpcent (void) __THROW; libc_hidden_proto(getrpcent) #if defined __USE_MISC && defined __UCLIBC_HAS_REENTRANT_RPC__ -extern int getrpcbyname_r (__const char *__name, struct rpcent *__result_buf, +extern int getrpcbyname_r (const char *__name, struct rpcent *__result_buf, char *__buffer, size_t __buflen, struct rpcent **__result) __THROW; diff --git a/include/rpc/pmap_clnt.h b/include/rpc/pmap_clnt.h index f5e825d67..936516af7 100644 --- a/include/rpc/pmap_clnt.h +++ b/include/rpc/pmap_clnt.h @@ -69,30 +69,30 @@ typedef bool_t (*resultproc_t) (caddr_t resp, struct sockaddr_in *raddr); * address if the responder to the broadcast. */ -extern bool_t pmap_set (__const u_long __program, __const u_long __vers, +extern bool_t pmap_set (const u_long __program, const u_long __vers, int __protocol, u_short __port) __THROW; libc_hidden_proto(pmap_set) -extern bool_t pmap_unset (__const u_long __program, __const u_long __vers) +extern bool_t pmap_unset (const u_long __program, const u_long __vers) __THROW; libc_hidden_proto(pmap_unset) extern struct pmaplist *pmap_getmaps (struct sockaddr_in *__address) __THROW; extern enum clnt_stat pmap_rmtcall (struct sockaddr_in *__addr, - __const u_long __prog, - __const u_long __vers, - __const u_long __proc, + const u_long __prog, + const u_long __vers, + const u_long __proc, xdrproc_t __xdrargs, caddr_t __argsp, xdrproc_t __xdrres, caddr_t __resp, struct timeval __tout, u_long *__port_ptr) __THROW; -extern enum clnt_stat clnt_broadcast (__const u_long __prog, - __const u_long __vers, - __const u_long __proc, xdrproc_t __xargs, +extern enum clnt_stat clnt_broadcast (const u_long __prog, + const u_long __vers, + const u_long __proc, xdrproc_t __xargs, caddr_t __argsp, xdrproc_t __xresults, caddr_t __resultsp, resultproc_t __eachresult) __THROW; extern u_short pmap_getport (struct sockaddr_in *__address, - __const u_long __program, - __const u_long __version, u_int __protocol) + const u_long __program, + const u_long __version, u_int __protocol) __THROW; libc_hidden_proto(pmap_getport) diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h index f4756acd0..a424153b6 100644 --- a/include/rpc/xdr.h +++ b/include/rpc/xdr.h @@ -120,13 +120,13 @@ struct XDR { bool_t (*x_getlong) (XDR *__xdrs, long *__lp); /* get a long from underlying stream */ - bool_t (*x_putlong) (XDR *__xdrs, __const long *__lp); + bool_t (*x_putlong) (XDR *__xdrs, const long *__lp); /* put a long to " */ bool_t (*x_getbytes) (XDR *__xdrs, caddr_t __addr, u_int __len); /* get some bytes from " */ - bool_t (*x_putbytes) (XDR *__xdrs, __const char *__addr, u_int __len); + bool_t (*x_putbytes) (XDR *__xdrs, const char *__addr, u_int __len); /* put some bytes to " */ - u_int (*x_getpostn) (__const XDR *__xdrs); + u_int (*x_getpostn) (const XDR *__xdrs); /* returns bytes off from beginning */ bool_t (*x_setpostn) (XDR *__xdrs, u_int __pos); /* lets you reposition the stream */ @@ -136,7 +136,7 @@ struct XDR /* free privates of this xdr_stream */ bool_t (*x_getint32) (XDR *__xdrs, int32_t *__ip); /* get a int from underlying stream */ - bool_t (*x_putint32) (XDR *__xdrs, __const int32_t *__ip); + bool_t (*x_putint32) (XDR *__xdrs, const int32_t *__ip); /* put a int to " */ } *x_ops; @@ -334,7 +334,7 @@ libc_hidden_proto(xdr_opaque) extern bool_t xdr_string (XDR *__xdrs, char **__cpp, u_int __maxsize) __THROW; libc_hidden_proto(xdr_string) extern bool_t xdr_union (XDR *__xdrs, enum_t *__dscmp, char *__unp, - __const struct xdr_discrim *__choices, + const struct xdr_discrim *__choices, xdrproc_t dfault) __THROW; libc_hidden_proto(xdr_union) extern bool_t xdr_char (XDR *__xdrs, char *__cp) __THROW; @@ -370,7 +370,7 @@ extern bool_t xdr_netobj (XDR *__xdrs, struct netobj *__np) __THROW; */ /* XDR using memory buffers */ -extern void xdrmem_create (XDR *__xdrs, __const caddr_t __addr, +extern void xdrmem_create (XDR *__xdrs, const caddr_t __addr, u_int __size, enum xdr_op __xop) __THROW; libc_hidden_proto(xdrmem_create) diff --git a/include/sched.h b/include/sched.h index b77b5435a..f262a0be5 100644 --- a/include/sched.h +++ b/include/sched.h @@ -39,7 +39,7 @@ __BEGIN_DECLS /* Set scheduling parameters for a process. */ -extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) +extern int sched_setparam (__pid_t __pid, const struct sched_param *__param) __THROW; /* Retrieve scheduling parameters for a particular process. */ @@ -47,7 +47,7 @@ extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW; /* Set scheduling algorithm and/or parameters for a process. */ extern int sched_setscheduler (__pid_t __pid, int __policy, - __const struct sched_param *__param) __THROW; + const struct sched_param *__param) __THROW; /* Retrieve scheduling algorithm for a particular purpose. */ extern int sched_getscheduler (__pid_t __pid) __THROW; @@ -107,7 +107,7 @@ extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW; /* Set the CPU affinity for a task */ extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, - __const cpu_set_t *__cpuset) __THROW; + const cpu_set_t *__cpuset) __THROW; /* Get the CPU affinity for a task */ extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, diff --git a/include/search.h b/include/search.h index 0ec7b7992..f93c788b4 100644 --- a/include/search.h +++ b/include/search.h @@ -51,7 +51,7 @@ extern void remque (void *__elem) __THROW; /* For use with hsearch(3). */ #ifndef __COMPAR_FN_T # define __COMPAR_FN_T -typedef int (*__compar_fn_t) (__const void *, __const void *); +typedef int (*__compar_fn_t) (const void *, const void *); # ifdef __USE_GNU typedef __compar_fn_t comparison_fn_t; @@ -129,30 +129,30 @@ VISIT; /* Search for an entry matching the given KEY in the tree pointed to by *ROOTP and insert a new element if not found. */ -extern void *tsearch (__const void *__key, void **__rootp, +extern void *tsearch (const void *__key, void **__rootp, __compar_fn_t __compar); libc_hidden_proto(tsearch) /* Search for an entry matching the given KEY in the tree pointed to by *ROOTP. If no matching entry is available return NULL. */ -extern void *tfind (__const void *__key, void *__const *__rootp, +extern void *tfind (const void *__key, void *const *__rootp, __compar_fn_t __compar); libc_hidden_proto(tfind) /* Remove the element matching KEY from the tree pointed to by *ROOTP. */ -extern void *tdelete (__const void *__restrict __key, +extern void *tdelete (const void *__restrict __key, void **__restrict __rootp, __compar_fn_t __compar); #ifndef __ACTION_FN_T # define __ACTION_FN_T -typedef void (*__action_fn_t) (__const void *__nodep, VISIT __value, +typedef void (*__action_fn_t) (const void *__nodep, VISIT __value, int __level); #endif /* Walk through the whole tree and call the ACTION callback for every node or leaf. */ -extern void twalk (__const void *__root, __action_fn_t __action); +extern void twalk (const void *__root, __action_fn_t __action); #ifdef __USE_GNU /* Callback type for function to free a tree node. If the keys are atomic @@ -167,13 +167,13 @@ libc_hidden_proto(tdestroy) /* Perform linear search for KEY by comparing by COMPAR in an array [BASE,BASE+NMEMB*SIZE). */ -extern void *lfind (__const void *__key, __const void *__base, +extern void *lfind (const void *__key, const void *__base, size_t *__nmemb, size_t __size, __compar_fn_t __compar); libc_hidden_proto(lfind) /* Perform linear search for KEY by comparing by COMPAR function in array [BASE,BASE+NMEMB*SIZE) and insert entry if not found. */ -extern void *lsearch (__const void *__key, void *__base, +extern void *lsearch (const void *__key, void *__base, size_t *__nmemb, size_t __size, __compar_fn_t __compar); __END_DECLS diff --git a/include/sgtty.h b/include/sgtty.h index 7025a110b..d37b58548 100644 --- a/include/sgtty.h +++ b/include/sgtty.h @@ -37,7 +37,7 @@ __BEGIN_DECLS extern int gtty (int __fd, struct sgttyb *__params) __THROW; /* Set the terminal parameters associated with FD to *PARAMS. */ -extern int stty (int __fd, __const struct sgttyb *__params) __THROW; +extern int stty (int __fd, const struct sgttyb *__params) __THROW; #endif diff --git a/include/shadow.h b/include/shadow.h index 716897eb3..97725102f 100644 --- a/include/shadow.h +++ b/include/shadow.h @@ -83,7 +83,7 @@ extern struct spwd *getspent (void); cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern struct spwd *getspnam (__const char *__name); +extern struct spwd *getspnam (const char *__name); /* Read shadow entry from STRING. @@ -91,7 +91,7 @@ extern struct spwd *getspnam (__const char *__name); cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern struct spwd *sgetspent (__const char *__string); +extern struct spwd *sgetspent (const char *__string); /* Read next shadow entry from STREAM. @@ -107,7 +107,7 @@ extern struct spwd *fgetspent (FILE *__stream); cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern int putspent (__const struct spwd *__p, FILE *__stream); +extern int putspent (const struct spwd *__p, FILE *__stream); #ifdef __USE_MISC @@ -121,12 +121,12 @@ extern int getspent_r (struct spwd *__result_buf, char *__buffer, size_t __buflen, struct spwd **__result); libc_hidden_proto(getspent_r) -extern int getspnam_r (__const char *__name, struct spwd *__result_buf, +extern int getspnam_r (const char *__name, struct spwd *__result_buf, char *__buffer, size_t __buflen, struct spwd **__result); libc_hidden_proto(getspnam_r) -extern int sgetspent_r (__const char *__string, struct spwd *__result_buf, +extern int sgetspent_r (const char *__string, struct spwd *__result_buf, char *__buffer, size_t __buflen, struct spwd **__result); libc_hidden_proto(sgetspent_r) diff --git a/include/signal.h b/include/signal.h index 2faa9414c..edd7a9768 100644 --- a/include/signal.h +++ b/include/signal.h @@ -177,12 +177,12 @@ extern int gsignal (int __sig) __THROW; /* glibc guards the next two wrong with __USE_XOPEN2K */ #if defined __USE_MISC || defined __USE_XOPEN2K8 /* Print a message describing the meaning of the given signal number. */ -extern void psignal (int __sig, __const char *__s); +extern void psignal (int __sig, const char *__s); #endif /* Use misc or POSIX 2008. */ #if 0 /*def __USE_XOPEN2K8*/ /* Print a message describing the meaning of the given signal information. */ -extern void psiginfo (__const siginfo_t *__pinfo, __const char *__s); +extern void psiginfo (const siginfo_t *__pinfo, const char *__s); #endif /* POSIX 2008. */ #ifdef __UCLIBC_SUSV4_LEGACY__ @@ -258,20 +258,20 @@ extern int sigdelset (sigset_t *__set, int __signo) __THROW __nonnull ((1)); libc_hidden_proto(sigdelset) /* Return 1 if SIGNO is in SET, 0 if not. */ -extern int sigismember (__const sigset_t *__set, int __signo) +extern int sigismember (const sigset_t *__set, int __signo) __THROW __nonnull ((1)); # ifdef __USE_GNU /* Return non-empty value is SET is not empty. */ -extern int sigisemptyset (__const sigset_t *__set) __THROW __nonnull ((1)); +extern int sigisemptyset (const sigset_t *__set) __THROW __nonnull ((1)); /* Build new signal set by combining the two inputs set using logical AND. */ -extern int sigandset (sigset_t *__set, __const sigset_t *__left, - __const sigset_t *__right) __THROW __nonnull ((1, 2, 3)); +extern int sigandset (sigset_t *__set, const sigset_t *__left, + const sigset_t *__right) __THROW __nonnull ((1, 2, 3)); /* Build new signal set by combining the two inputs set using logical OR. */ -extern int sigorset (sigset_t *__set, __const sigset_t *__left, - __const sigset_t *__right) __THROW __nonnull ((1, 2, 3)); +extern int sigorset (sigset_t *__set, const sigset_t *__left, + const sigset_t *__right) __THROW __nonnull ((1, 2, 3)); # endif /* GNU */ /* Get the system-specific definitions of `struct sigaction' @@ -279,7 +279,7 @@ extern int sigorset (sigset_t *__set, __const sigset_t *__left, # include /* Get and/or change the set of blocked signals. */ -extern int sigprocmask (int __how, __const sigset_t *__restrict __set, +extern int sigprocmask (int __how, const sigset_t *__restrict __set, sigset_t *__restrict __oset) __THROW; libc_hidden_proto(sigprocmask) @@ -288,14 +288,14 @@ libc_hidden_proto(sigprocmask) This function is a cancellation point and therefore not marked with __THROW. */ -extern int sigsuspend (__const sigset_t *__set) __nonnull ((1)); +extern int sigsuspend (const sigset_t *__set) __nonnull ((1)); #ifdef _LIBC extern __typeof(sigsuspend) __sigsuspend_nocancel attribute_hidden; libc_hidden_proto(sigsuspend) #endif /* Get and/or set the action for signal SIG. */ -extern int sigaction (int __sig, __const struct sigaction *__restrict __act, +extern int sigaction (int __sig, const struct sigaction *__restrict __act, struct sigaction *__restrict __oact) __THROW; #ifdef _LIBC # if 0 /* this is in headers */ @@ -304,7 +304,7 @@ extern int sigaction (int __sig, __const struct sigaction *__restrict __act, * See sigaction.h */ struct old_kernel_sigaction; -extern int __syscall_sigaction(int, __const struct old_kernel_sigaction *, +extern int __syscall_sigaction(int, const struct old_kernel_sigaction *, struct old_kernel_sigaction *) attribute_hidden; # else /* this is how the function is built */ extern __typeof(sigaction) __syscall_sigaction attribute_hidden; @@ -312,7 +312,7 @@ extern __typeof(sigaction) __syscall_sigaction attribute_hidden; # define __need_size_t # include /* candidate for attribute_hidden, if NPTL would behave */ -extern int __syscall_rt_sigaction(int, __const struct sigaction *, +extern int __syscall_rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t) # ifndef __UCLIBC_HAS_THREADS_NATIVE__ attribute_hidden @@ -340,7 +340,7 @@ extern int sigpending (sigset_t *__set) __THROW __nonnull ((1)); This function is a cancellation point and therefore not marked with __THROW. */ -extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig) +extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig) __nonnull ((1, 2)); # if defined __USE_POSIX199309 && defined __UCLIBC_HAS_REALTIME__ @@ -348,7 +348,7 @@ extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig) This function is a cancellation point and therefore not marked with __THROW. */ -extern int sigwaitinfo (__const sigset_t *__restrict __set, +extern int sigwaitinfo (const sigset_t *__restrict __set, siginfo_t *__restrict __info) __nonnull ((1)); #ifdef _LIBC extern __typeof(sigwaitinfo) __sigwaitinfo attribute_hidden; @@ -359,9 +359,9 @@ extern __typeof(sigwaitinfo) __sigwaitinfo attribute_hidden; This function is a cancellation point and therefore not marked with __THROW. */ -extern int sigtimedwait (__const sigset_t *__restrict __set, +extern int sigtimedwait (const sigset_t *__restrict __set, siginfo_t *__restrict __info, - __const struct timespec *__restrict __timeout) + const struct timespec *__restrict __timeout) __nonnull ((1)); #ifdef _LIBC extern __typeof(sigtimedwait) __sigtimedwait_nocancel attribute_hidden; @@ -370,7 +370,7 @@ libc_hidden_proto(sigtimedwait) /* Send signal SIG to the process PID. Associate data in VAL with the signal. */ -extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) +extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val) __THROW; # endif /* Use POSIX 199306. */ @@ -382,7 +382,7 @@ extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) /* Names of the signals. This variable exists only for compatibility. Use `strsignal' instead (see ). */ # define _sys_siglist sys_siglist -extern __const char *__const sys_siglist[_NSIG]; +extern const char *const sys_siglist[_NSIG]; # endif #ifndef __UCLIBC_STRICT_HEADERS__ @@ -409,7 +409,7 @@ struct sigvec If the SV_RESETHAND bit is set in `sv_flags', the handler for SIG will be reset to SIG_DFL before `sv_handler' is entered. If OVEC is non-NULL, it is filled in with the old information for SIG. */ -extern int sigvec (int __sig, __const struct sigvec *__vec, +extern int sigvec (int __sig, const struct sigvec *__vec, struct sigvec *__ovec) __THROW; #endif @@ -453,7 +453,7 @@ extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) /* Alternate signal handler stack interface. This interface should always be preferred over `sigstack'. */ -extern int sigaltstack (__const struct sigaltstack *__restrict __ss, +extern int sigaltstack (const struct sigaltstack *__restrict __ss, struct sigaltstack *__restrict __oss) __THROW; #endif /* use BSD or X/Open Unix. */ diff --git a/include/stdio.h b/include/stdio.h index 9d54468b8..381ca5f02 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -141,16 +141,16 @@ extern FILE *stderr; /* Standard error output stream. */ __BEGIN_NAMESPACE_STD /* Remove file FILENAME. */ -extern int remove (__const char *__filename) __THROW; +extern int remove (const char *__filename) __THROW; libc_hidden_proto(remove) /* Rename file OLD to NEW. */ -extern int rename (__const char *__old, __const char *__new) __THROW; +extern int rename (const char *__old, const char *__new) __THROW; __END_NAMESPACE_STD #ifdef __USE_ATFILE /* Rename file OLD relative to OLDFD to NEW relative to NEWFD. */ -extern int renameat (int __oldfd, __const char *__old, int __newfd, - __const char *__new) __THROW; +extern int renameat (int __oldfd, const char *__old, int __newfd, + const char *__new) __THROW; #endif __BEGIN_NAMESPACE_STD @@ -193,7 +193,7 @@ extern char *tmpnam_r (char *__s) __THROW __wur; If not and if DIR is not NULL, that value is checked. If that fails, P_tmpdir is tried and finally "/tmp". The storage for the filename is allocated by `malloc'. */ -extern char *tempnam (__const char *__dir, __const char *__pfx) +extern char *tempnam (const char *__dir, const char *__pfx) __THROW __attribute_malloc__ __wur; #endif @@ -241,23 +241,23 @@ __BEGIN_NAMESPACE_STD This function is a possible cancellation point and therefore not marked with __THROW. */ -extern FILE *fopen (__const char *__restrict __filename, - __const char *__restrict __modes) __wur; +extern FILE *fopen (const char *__restrict __filename, + const char *__restrict __modes) __wur; libc_hidden_proto(fopen) /* Open a file, replacing an existing stream with it. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern FILE *freopen (__const char *__restrict __filename, - __const char *__restrict __modes, +extern FILE *freopen (const char *__restrict __filename, + const char *__restrict __modes, FILE *__restrict __stream) __wur; #else # ifdef __REDIRECT -extern FILE *__REDIRECT (fopen, (__const char *__restrict __filename, - __const char *__restrict __modes), fopen64) +extern FILE *__REDIRECT (fopen, (const char *__restrict __filename, + const char *__restrict __modes), fopen64) __wur; -extern FILE *__REDIRECT (freopen, (__const char *__restrict __filename, - __const char *__restrict __modes, +extern FILE *__REDIRECT (freopen, (const char *__restrict __filename, + const char *__restrict __modes, FILE *__restrict __stream), freopen64) __wur; # else @@ -267,17 +267,17 @@ extern FILE *__REDIRECT (freopen, (__const char *__restrict __filename, #endif __END_NAMESPACE_STD #ifdef __USE_LARGEFILE64 -extern FILE *fopen64 (__const char *__restrict __filename, - __const char *__restrict __modes) __wur; +extern FILE *fopen64 (const char *__restrict __filename, + const char *__restrict __modes) __wur; libc_hidden_proto(fopen64) -extern FILE *freopen64 (__const char *__restrict __filename, - __const char *__restrict __modes, +extern FILE *freopen64 (const char *__restrict __filename, + const char *__restrict __modes, FILE *__restrict __stream) __wur; #endif #ifdef __USE_POSIX /* Create a new stream that refers to an existing system file descriptor. */ -extern FILE *fdopen (int __fd, __const char *__modes) __THROW __wur; +extern FILE *fdopen (int __fd, const char *__modes) __THROW __wur; libc_hidden_proto(fdopen) #endif @@ -286,14 +286,14 @@ libc_hidden_proto(fdopen) /* Create a new stream that refers to the given magic cookie, and uses the given functions for input and output. */ extern FILE *fopencookie (void *__restrict __magic_cookie, - __const char *__restrict __modes, + const char *__restrict __modes, _IO_cookie_io_functions_t __io_funcs) __THROW __wur; libc_hidden_proto(fopencookie) #endif #ifdef __USE_XOPEN2K8 /* Create a new stream that refers to a memory buffer. */ -extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) +extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) __THROW __wur; /* Open a stream that writes into a malloc'd buffer that is expanded as @@ -334,17 +334,17 @@ __BEGIN_NAMESPACE_STD This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fprintf (FILE *__restrict __stream, - __const char *__restrict __format, ...); + const char *__restrict __format, ...); libc_hidden_proto(fprintf) /* Write formatted output to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int printf (__const char *__restrict __format, ...); +extern int printf (const char *__restrict __format, ...); libc_hidden_proto(printf) /* Write formatted output to S. */ extern int sprintf (char *__restrict __s, - __const char *__restrict __format, ...) + const char *__restrict __format, ...) __THROW __attribute__ ((__format__ (__printf__, 2, 3))); libc_hidden_proto(sprintf) @@ -352,16 +352,16 @@ libc_hidden_proto(sprintf) This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, +extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg); libc_hidden_proto(vfprintf) /* Write formatted output to stdout from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); +extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); /* Write formatted output to S from argument list ARG. */ -extern int vsprintf (char *__restrict __s, __const char *__restrict __format, +extern int vsprintf (char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __THROW __attribute__ ((__format__ (__printf__, 2, 0))); __END_NAMESPACE_STD @@ -370,12 +370,12 @@ __END_NAMESPACE_STD __BEGIN_NAMESPACE_C99 /* Maximum chars of output to write in MAXLEN. */ extern int snprintf (char *__restrict __s, size_t __maxlen, - __const char *__restrict __format, ...) + const char *__restrict __format, ...) __THROW __attribute__ ((__format__ (__printf__, 3, 4))); libc_hidden_proto(snprintf) extern int vsnprintf (char *__restrict __s, size_t __maxlen, - __const char *__restrict __format, __gnuc_va_list __arg) + const char *__restrict __format, __gnuc_va_list __arg) __THROW __attribute__ ((__format__ (__printf__, 3, 0))); libc_hidden_proto(vsnprintf) __END_NAMESPACE_C99 @@ -384,17 +384,17 @@ __END_NAMESPACE_C99 #ifdef __USE_GNU /* Write formatted output to a string dynamically allocated with `malloc'. Store the address of the string in *PTR. */ -extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, +extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, __gnuc_va_list __arg) __THROW __attribute__ ((__format__ (__printf__, 2, 0))) __wur; libc_hidden_proto(vasprintf) #if 0 /* uClibc: disabled */ extern int __asprintf (char **__restrict __ptr, - __const char *__restrict __fmt, ...) + const char *__restrict __fmt, ...) __THROW __attribute__ ((__format__ (__printf__, 2, 3))) __wur; #endif extern int asprintf (char **__restrict __ptr, - __const char *__restrict __fmt, ...) + const char *__restrict __fmt, ...) __THROW __attribute__ ((__format__ (__printf__, 2, 3))) __wur; libc_hidden_proto(asprintf) #endif @@ -406,11 +406,11 @@ libc_hidden_proto(asprintf) cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ -extern int vdprintf (int __fd, __const char *__restrict __fmt, +extern int vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); libc_hidden_proto(vdprintf) -extern int dprintf (int __fd, __const char *__restrict __fmt, ...) +extern int dprintf (int __fd, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); #endif @@ -421,18 +421,18 @@ __BEGIN_NAMESPACE_STD This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fscanf (FILE *__restrict __stream, - __const char *__restrict __format, ...) + const char *__restrict __format, ...) __attribute__ ((__format__ (__scanf__, 2, 3))) __wur; libc_hidden_proto(fscanf) /* Read formatted input from stdin. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int scanf (__const char *__restrict __format, ...) +extern int scanf (const char *__restrict __format, ...) __attribute__ ((__format__ (__scanf__, 1, 2))) __wur; /* Read formatted input from S. */ -extern int sscanf (__const char *__restrict __s, - __const char *__restrict __format, ...) +extern int sscanf (const char *__restrict __s, + const char *__restrict __format, ...) __THROW __attribute__ ((__format__ (__scanf__, 2, 3))); libc_hidden_proto(sscanf) __END_NAMESPACE_STD @@ -443,7 +443,7 @@ __BEGIN_NAMESPACE_C99 This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, +extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))) __wur; libc_hidden_proto(vfscanf) @@ -452,12 +452,12 @@ libc_hidden_proto(vfscanf) This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) +extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))) __wur; /* Read formatted input from S into argument list ARG. */ -extern int vsscanf (__const char *__restrict __s, - __const char *__restrict __format, __gnuc_va_list __arg) +extern int vsscanf (const char *__restrict __s, + const char *__restrict __format, __gnuc_va_list __arg) __THROW __attribute__ ((__format__ (__scanf__, 2, 0))); libc_hidden_proto(vsscanf) __END_NAMESPACE_C99 @@ -629,14 +629,14 @@ __BEGIN_NAMESPACE_STD This function is a possible cancellation points and therefore not marked with __THROW. */ -extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); +extern int fputs (const char *__restrict __s, FILE *__restrict __stream); libc_hidden_proto(fputs) /* Write a string, followed by a newline, to stdout. This function is a possible cancellation points and therefore not marked with __THROW. */ -extern int puts (__const char *__s); +extern int puts (const char *__s); /* Push a character back onto the input buffer of STREAM. @@ -658,7 +658,7 @@ libc_hidden_proto(fread) This function is a possible cancellation points and therefore not marked with __THROW. */ -extern size_t fwrite (__const void *__restrict __ptr, size_t __size, +extern size_t fwrite (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s) __wur; libc_hidden_proto(fwrite) __END_NAMESPACE_STD @@ -670,7 +670,7 @@ __END_NAMESPACE_STD cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern int fputs_unlocked (__const char *__restrict __s, +extern int fputs_unlocked (const char *__restrict __s, FILE *__restrict __stream); libc_hidden_proto(fputs_unlocked) #endif @@ -685,7 +685,7 @@ libc_hidden_proto(fputs_unlocked) extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __wur; libc_hidden_proto(fread_unlocked) -extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, +extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __wur; libc_hidden_proto(fwrite_unlocked) #endif @@ -753,13 +753,13 @@ extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int fsetpos (FILE *__stream, __const fpos_t *__pos); +extern int fsetpos (FILE *__stream, const fpos_t *__pos); #else # ifdef __REDIRECT extern int __REDIRECT (fgetpos, (FILE *__restrict __stream, fpos_t *__restrict __pos), fgetpos64); extern int __REDIRECT (fsetpos, - (FILE *__stream, __const fpos_t *__pos), fsetpos64); + (FILE *__stream, const fpos_t *__pos), fsetpos64); # else # define fgetpos fgetpos64 # define fsetpos fsetpos64 @@ -773,7 +773,7 @@ libc_hidden_proto(fseeko64) extern __off64_t ftello64 (FILE *__stream) __wur; libc_hidden_proto(ftello64) extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); -extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); +extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos); #endif __BEGIN_NAMESPACE_STD @@ -798,7 +798,7 @@ __BEGIN_NAMESPACE_STD This function is a possible cancellation point and therefore not marked with __THROW. */ -extern void perror (__const char *__s); +extern void perror (const char *__s); libc_hidden_proto(perror) __END_NAMESPACE_STD @@ -807,7 +807,7 @@ __END_NAMESPACE_STD function provides all the needed functionality. */ #ifdef __USE_BSD extern int sys_nerr; -extern __const char *__const sys_errlist[]; +extern const char *const sys_errlist[]; #endif #endif /* __UCLIBC_HAS_SYS_ERRLIST__ */ @@ -831,7 +831,7 @@ libc_hidden_proto(fileno_unlocked) This function is a possible cancellation point and therefore not marked with __THROW. */ -extern FILE *popen (__const char *__command, __const char *__modes) __wur; +extern FILE *popen (const char *__command, const char *__modes) __wur; /* Close a stream opened by popen and return the status of its child. @@ -858,10 +858,10 @@ struct obstack; /* See . */ /* Write formatted output to an obstack. */ extern int obstack_printf (struct obstack *__restrict __obstack, - __const char *__restrict __format, ...) + const char *__restrict __format, ...) __THROW __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, - __const char *__restrict __format, + const char *__restrict __format, __gnuc_va_list __args) __THROW __attribute__ ((__format__ (__printf__, 2, 0))); #endif /* Use GNU. */ diff --git a/include/stdlib.h b/include/stdlib.h index 44f5484fa..b2d70204e 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -154,22 +154,22 @@ libc_hidden_proto(_stdlib_mb_cur_max) __BEGIN_NAMESPACE_STD #ifdef __UCLIBC_HAS_FLOATS__ /* Convert a string to a floating-point number. */ -extern double atof (__const char *__nptr) +extern double atof (const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur; #endif /* __UCLIBC_HAS_FLOATS__ */ /* Convert a string to an integer. */ -extern int atoi (__const char *__nptr) +extern int atoi (const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur; libc_hidden_proto(atoi) /* Convert a string to a long integer. */ -extern long int atol (__const char *__nptr) +extern long int atol (const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur; __END_NAMESPACE_STD #if defined __USE_ISOC99 || defined __USE_MISC __BEGIN_NAMESPACE_C99 /* Convert a string to a long long integer. */ -__extension__ extern long long int atoll (__const char *__nptr) +__extension__ extern long long int atoll (const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur; __END_NAMESPACE_C99 #endif @@ -177,7 +177,7 @@ __END_NAMESPACE_C99 #ifdef __UCLIBC_HAS_FLOATS__ __BEGIN_NAMESPACE_STD /* Convert a string to a floating-point number. */ -extern double strtod (__const char *__restrict __nptr, +extern double strtod (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)) __wur; libc_hidden_proto(strtod) @@ -186,10 +186,10 @@ __END_NAMESPACE_STD #ifdef __USE_ISOC99 __BEGIN_NAMESPACE_C99 /* Likewise for `float' and `long double' sizes of floating-point numbers. */ -extern float strtof (__const char *__restrict __nptr, +extern float strtof (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)) __wur; -extern long double strtold (__const char *__restrict __nptr, +extern long double strtold (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)) __wur; __END_NAMESPACE_C99 @@ -198,12 +198,12 @@ __END_NAMESPACE_C99 __BEGIN_NAMESPACE_STD /* Convert a string to a long integer. */ -extern long int strtol (__const char *__restrict __nptr, +extern long int strtol (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)) __wur; libc_hidden_proto(strtol) /* Convert a string to an unsigned long integer. */ -extern unsigned long int strtoul (__const char *__restrict __nptr, +extern unsigned long int strtoul (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)) __wur; libc_hidden_proto(strtoul) @@ -214,12 +214,12 @@ __END_NAMESPACE_STD /* Convert a string to a quadword integer. */ __extension__ -extern quad_t strtoq (__const char *__restrict __nptr, +extern quad_t strtoq (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)) __wur; /* Convert a string to an unsigned quadword integer. */ __extension__ -extern u_quad_t strtouq (__const char *__restrict __nptr, +extern u_quad_t strtouq (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)) __wur; #endif /* GCC and use BSD. */ @@ -228,13 +228,13 @@ extern u_quad_t strtouq (__const char *__restrict __nptr, __BEGIN_NAMESPACE_C99 /* Convert a string to a quadword integer. */ __extension__ -extern long long int strtoll (__const char *__restrict __nptr, +extern long long int strtoll (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)) __wur; libc_hidden_proto(strtoll) /* Convert a string to an unsigned quadword integer. */ __extension__ -extern unsigned long long int strtoull (__const char *__restrict __nptr, +extern unsigned long long int strtoull (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)) __wur; __END_NAMESPACE_C99 @@ -259,39 +259,39 @@ __END_NAMESPACE_C99 /* Special versions of the functions above which take the locale to use as an additional parameter. */ -extern long int strtol_l (__const char *__restrict __nptr, +extern long int strtol_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) __THROW __nonnull ((1, 4)) __wur; libc_hidden_proto(strtol_l) -extern unsigned long int strtoul_l (__const char *__restrict __nptr, +extern unsigned long int strtoul_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) __THROW __nonnull ((1, 4)) __wur; libc_hidden_proto(strtoul_l) __extension__ -extern long long int strtoll_l (__const char *__restrict __nptr, +extern long long int strtoll_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) __THROW __nonnull ((1, 4)) __wur; __extension__ -extern unsigned long long int strtoull_l (__const char *__restrict __nptr, +extern unsigned long long int strtoull_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) __THROW __nonnull ((1, 4)) __wur; #ifdef __UCLIBC_HAS_FLOATS__ -extern double strtod_l (__const char *__restrict __nptr, +extern double strtod_l (const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) __THROW __nonnull ((1, 3)) __wur; -extern float strtof_l (__const char *__restrict __nptr, +extern float strtof_l (const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) __THROW __nonnull ((1, 3)) __wur; -extern long double strtold_l (__const char *__restrict __nptr, +extern long double strtold_l (const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) __THROW __nonnull ((1, 3)) __wur; @@ -306,7 +306,7 @@ extern long double strtold_l (__const char *__restrict __nptr, extern char *l64a (long int __n) __THROW __wur; /* Read a number from a string S in base 64 as above. */ -extern long int a64l (__const char *__s) +extern long int a64l (const char *__s) __THROW __attribute_pure__ __nonnull ((1)) __wur; #endif /* Use SVID || extended X/Open. */ @@ -563,14 +563,14 @@ __END_NAMESPACE_C99 __BEGIN_NAMESPACE_STD /* Return the value of envariable NAME, or NULL if it doesn't exist. */ -extern char *getenv (__const char *__name) __THROW __nonnull ((1)) __wur; +extern char *getenv (const char *__name) __THROW __nonnull ((1)) __wur; libc_hidden_proto(getenv) __END_NAMESPACE_STD #if 0 /* This function is similar to the above but returns NULL if the programs is running with SUID or SGID enabled. */ -extern char *__secure_getenv (__const char *__name) +extern char *__secure_getenv (const char *__name) __THROW __nonnull ((1)) __wur; #endif @@ -584,12 +584,12 @@ extern int putenv (char *__string) __THROW __nonnull ((1)); #if defined __USE_BSD || defined __USE_XOPEN2K /* Set NAME to VALUE in the environment. If REPLACE is nonzero, overwrite an existing value. */ -extern int setenv (__const char *__name, __const char *__value, int __replace) +extern int setenv (const char *__name, const char *__value, int __replace) __THROW __nonnull ((2)); libc_hidden_proto(setenv) /* Remove the variable NAME from the environment. */ -extern int unsetenv (__const char *__name) __THROW; +extern int unsetenv (const char *__name) __THROW; libc_hidden_proto(unsetenv) #endif @@ -680,14 +680,14 @@ __BEGIN_NAMESPACE_STD This function is a cancellation point and therefore not marked with __THROW. */ -extern int system (__const char *__command) __wur; +extern int system (const char *__command) __wur; __END_NAMESPACE_STD #ifdef __USE_GNU /* Return a malloc'd string containing the canonical absolute name of the existing named file. */ -extern char *canonicalize_file_name (__const char *__name) +extern char *canonicalize_file_name (const char *__name) __THROW __nonnull ((1)) __wur; #endif @@ -697,7 +697,7 @@ extern char *canonicalize_file_name (__const char *__name) PATH_MAX chars or more, returns null with `errno' set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, returns the name in RESOLVED. */ -extern char *realpath (__const char *__restrict __name, +extern char *realpath (const char *__restrict __name, char *__restrict __resolved) __THROW __wur; libc_hidden_proto(realpath) #endif @@ -706,20 +706,20 @@ libc_hidden_proto(realpath) /* Shorthand for type of comparison functions. */ #ifndef __COMPAR_FN_T # define __COMPAR_FN_T -typedef int (*__compar_fn_t) (__const void *, __const void *); +typedef int (*__compar_fn_t) (const void *, const void *); # ifdef __USE_GNU typedef __compar_fn_t comparison_fn_t; # endif #endif #ifdef __USE_GNU -typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *); +typedef int (*__compar_d_fn_t) (const void *, const void *, void *); #endif __BEGIN_NAMESPACE_STD /* Do a binary search for KEY in BASE, which consists of NMEMB elements of SIZE bytes each, using COMPAR to perform the comparisons. */ -extern void *bsearch (__const void *__key, __const void *__base, +extern void *bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __nonnull ((1, 2, 5)) __wur; @@ -829,11 +829,11 @@ extern int qfcvt_r (long double __value, int __ndigit, __BEGIN_NAMESPACE_STD /* Return the length of the multibyte character in S, which is no longer than N. */ -extern int mblen (__const char *__s, size_t __n) __THROW __wur; +extern int mblen (const char *__s, size_t __n) __THROW __wur; /* Return the length of the given multibyte character, putting its `wchar_t' representation in *PWC. */ extern int mbtowc (wchar_t *__restrict __pwc, - __const char *__restrict __s, size_t __n) __THROW __wur; + const char *__restrict __s, size_t __n) __THROW __wur; /* Put the multibyte character represented by WCHAR in S, returning its length. */ extern int wctomb (char *__s, wchar_t __wchar) __THROW __wur; @@ -841,10 +841,10 @@ extern int wctomb (char *__s, wchar_t __wchar) __THROW __wur; /* Convert a multibyte string to a wide char string. */ extern size_t mbstowcs (wchar_t *__restrict __pwcs, - __const char *__restrict __s, size_t __n) __THROW; + const char *__restrict __s, size_t __n) __THROW; /* Convert a wide char string to multibyte string. */ extern size_t wcstombs (char *__restrict __s, - __const wchar_t *__restrict __pwcs, size_t __n) + const wchar_t *__restrict __pwcs, size_t __n) __THROW; __END_NAMESPACE_STD #endif /* __UCLIBC_HAS_WCHAR__ */ @@ -855,7 +855,7 @@ __END_NAMESPACE_STD or negative response expression as specified by the LC_MESSAGES category in the program's current locale. Returns 1 if affirmative, 0 if negative, and -1 if not matching. */ -extern int rpmatch (__const char *__response) __THROW __nonnull ((1)) __wur; +extern int rpmatch (const char *__response) __THROW __nonnull ((1)) __wur; #endif @@ -867,7 +867,7 @@ extern int rpmatch (__const char *__response) __THROW __nonnull ((1)) __wur; suboption. On exit *OPTIONP is set to the beginning of the next token or at the terminating NUL character. */ extern int getsubopt (char **__restrict __optionp, - char *__const *__restrict __tokens, + char *const *__restrict __tokens, char **__restrict __valuep) __THROW __nonnull ((1, 2, 3)) __wur; #endif @@ -876,7 +876,7 @@ extern int getsubopt (char **__restrict __optionp, #ifdef __USE_XOPEN # if defined __UCLIBC_HAS_CRYPT__ /* Setup DES tables according KEY. */ -extern void setkey (__const char *__key) __THROW __nonnull ((1)); +extern void setkey (const char *__key) __THROW __nonnull ((1)); # endif /* __UCLIBC_HAS_CRYPT__ */ #endif diff --git a/include/string.h b/include/string.h index f260c909b..1d75f449f 100644 --- a/include/string.h +++ b/include/string.h @@ -35,12 +35,12 @@ __BEGIN_DECLS __BEGIN_NAMESPACE_STD /* Copy N bytes of SRC to DEST. */ extern void *memcpy (void *__restrict __dest, - __const void *__restrict __src, size_t __n) + const void *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); libc_hidden_proto(memcpy) /* Copy N bytes of SRC to DEST, guaranteeing correct behavior for overlapping strings. */ -extern void *memmove (void *__dest, __const void *__src, size_t __n) +extern void *memmove (void *__dest, const void *__src, size_t __n) __THROW __nonnull ((1, 2)); libc_hidden_proto(memmove) __END_NAMESPACE_STD @@ -49,7 +49,7 @@ __END_NAMESPACE_STD Return the position in DEST one byte past where C was copied, or NULL if C was not found in the first N bytes of SRC. */ #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN -extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, +extern void *memccpy (void *__restrict __dest, const void *__restrict __src, int __c, size_t __n) __THROW __nonnull ((1, 2)); libc_hidden_proto(memccpy) @@ -62,12 +62,12 @@ extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1)); libc_hidden_proto(memset) /* Compare N bytes of S1 and S2. */ -extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) +extern int memcmp (const void *__s1, const void *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); libc_hidden_proto(memcmp) /* Search N bytes of S for C. */ -extern void *memchr (__const void *__s, int __c, size_t __n) +extern void *memchr (const void *__s, int __c, size_t __n) __THROW __attribute_pure__ __nonnull ((1)); libc_hidden_proto(memchr) __END_NAMESPACE_STD @@ -75,12 +75,12 @@ __END_NAMESPACE_STD #ifdef __USE_GNU /* Search in S for C. This is similar to `memchr' but there is no length limit. */ -extern void *rawmemchr (__const void *__s, int __c) +extern void *rawmemchr (const void *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); libc_hidden_proto(rawmemchr) /* Search N bytes of S for the final occurrence of C. */ -extern void *memrchr (__const void *__s, int __c, size_t __n) +extern void *memrchr (const void *__s, int __c, size_t __n) __THROW __attribute_pure__ __nonnull ((1)); libc_hidden_proto(memrchr) #endif @@ -88,40 +88,40 @@ libc_hidden_proto(memrchr) __BEGIN_NAMESPACE_STD /* Copy SRC to DEST. */ -extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) +extern char *strcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); libc_hidden_proto(strcpy) /* Copy no more than N characters of SRC to DEST. */ extern char *strncpy (char *__restrict __dest, - __const char *__restrict __src, size_t __n) + const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); libc_hidden_proto(strncpy) /* Append SRC onto DEST. */ -extern char *strcat (char *__restrict __dest, __const char *__restrict __src) +extern char *strcat (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); libc_hidden_proto(strcat) /* Append no more than N characters from SRC onto DEST. */ -extern char *strncat (char *__restrict __dest, __const char *__restrict __src, +extern char *strncat (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); libc_hidden_proto(strncat) /* Compare S1 and S2. */ -extern int strcmp (__const char *__s1, __const char *__s2) +extern int strcmp (const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); libc_hidden_proto(strcmp) /* Compare N characters of S1 and S2. */ -extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) +extern int strncmp (const char *__s1, const char *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); libc_hidden_proto(strncmp) /* Compare the collated forms of S1 and S2. */ -extern int strcoll (__const char *__s1, __const char *__s2) +extern int strcoll (const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); libc_hidden_proto(strcoll) /* Put a transformation of SRC into no more than N bytes of DEST. */ extern size_t strxfrm (char *__restrict __dest, - __const char *__restrict __src, size_t __n) + const char *__restrict __src, size_t __n) __THROW __nonnull ((2)); __END_NAMESPACE_STD @@ -132,18 +132,18 @@ __END_NAMESPACE_STD # include /* Compare the collated forms of S1 and S2 using rules from L. */ -extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) +extern int strcoll_l (const char *__s1, const char *__s2, __locale_t __l) __THROW __attribute_pure__ __nonnull ((1, 2, 3)); libc_hidden_proto(strcoll_l) /* Put a transformation of SRC into no more than N bytes of DEST. */ -extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, +extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, __locale_t __l) __THROW __nonnull ((2, 4)); libc_hidden_proto(strxfrm_l) #endif #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Duplicate S, returning an identical malloc'd string. */ -extern char *strdup (__const char *__s) +extern char *strdup (const char *__s) __THROW __attribute_malloc__ __nonnull ((1)); libc_hidden_proto(strdup) #endif @@ -152,7 +152,7 @@ libc_hidden_proto(strdup) resultant string is terminated even if no null terminator appears before STRING[N]. */ #if defined __USE_XOPEN2K8 -extern char *strndup (__const char *__string, size_t __n) +extern char *strndup (const char *__string, size_t __n) __THROW __attribute_malloc__ __nonnull ((1)); libc_hidden_proto(strndup) #endif @@ -162,7 +162,7 @@ libc_hidden_proto(strndup) # define strdupa(s) \ (__extension__ \ ({ \ - __const char *__old = (s); \ + const char *__old = (s); \ size_t __len = strlen (__old) + 1; \ char *__new = (char *) __builtin_alloca (__len); \ (char *) memcpy (__new, __old, __len); \ @@ -172,7 +172,7 @@ libc_hidden_proto(strndup) # define strndupa(s, n) \ (__extension__ \ ({ \ - __const char *__old = (s); \ + const char *__old = (s); \ size_t __len = strnlen (__old, (n)); \ char *__new = (char *) __builtin_alloca (__len + 1); \ __new[__len] = '\0'; \ @@ -182,11 +182,11 @@ libc_hidden_proto(strndup) __BEGIN_NAMESPACE_STD /* Find the first occurrence of C in S. */ -extern char *strchr (__const char *__s, int __c) +extern char *strchr (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); libc_hidden_proto(strchr) /* Find the last occurrence of C in S. */ -extern char *strrchr (__const char *__s, int __c) +extern char *strrchr (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); libc_hidden_proto(strrchr) __END_NAMESPACE_STD @@ -194,7 +194,7 @@ __END_NAMESPACE_STD #ifdef __USE_GNU /* This function is similar to `strchr'. But it returns a pointer to the closing NUL byte in case C is not found in S. */ -extern char *strchrnul (__const char *__s, int __c) +extern char *strchrnul (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); libc_hidden_proto(strchrnul) #endif @@ -202,26 +202,26 @@ libc_hidden_proto(strchrnul) __BEGIN_NAMESPACE_STD /* Return the length of the initial segment of S which consists entirely of characters not in REJECT. */ -extern size_t strcspn (__const char *__s, __const char *__reject) +extern size_t strcspn (const char *__s, const char *__reject) __THROW __attribute_pure__ __nonnull ((1, 2)); libc_hidden_proto(strcspn) /* Return the length of the initial segment of S which consists entirely of characters in ACCEPT. */ -extern size_t strspn (__const char *__s, __const char *__accept) +extern size_t strspn (const char *__s, const char *__accept) __THROW __attribute_pure__ __nonnull ((1, 2)); libc_hidden_proto(strspn) /* Find the first occurrence in S of any character in ACCEPT. */ -extern char *strpbrk (__const char *__s, __const char *__accept) +extern char *strpbrk (const char *__s, const char *__accept) __THROW __attribute_pure__ __nonnull ((1, 2)); libc_hidden_proto(strpbrk) /* Find the first occurrence of NEEDLE in HAYSTACK. */ -extern char *strstr (__const char *__haystack, __const char *__needle) +extern char *strstr (const char *__haystack, const char *__needle) __THROW __attribute_pure__ __nonnull ((1, 2)); libc_hidden_proto(strstr) /* Divide S into tokens separated by characters in DELIM. */ -extern char *strtok (char *__restrict __s, __const char *__restrict __delim) +extern char *strtok (char *__restrict __s, const char *__restrict __delim) __THROW __nonnull ((2)); libc_hidden_proto(strtok) __END_NAMESPACE_STD @@ -230,12 +230,12 @@ __END_NAMESPACE_STD passed between calls are stored in SAVE_PTR. */ #if 0 /* uClibc: disabled */ extern char *__strtok_r (char *__restrict __s, - __const char *__restrict __delim, + const char *__restrict __delim, char **__restrict __save_ptr) __THROW __nonnull ((2, 3)); #endif #if defined __USE_POSIX || defined __USE_MISC -extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, +extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) __THROW __nonnull ((2, 3)); libc_hidden_proto(strtok_r) @@ -243,7 +243,7 @@ libc_hidden_proto(strtok_r) #ifdef __USE_GNU /* Similar to `strstr' but this function ignores the case of both strings. */ -extern char *strcasestr (__const char *__haystack, __const char *__needle) +extern char *strcasestr (const char *__haystack, const char *__needle) __THROW __attribute_pure__ __nonnull ((1, 2)); libc_hidden_proto(strcasestr) #endif @@ -252,19 +252,19 @@ libc_hidden_proto(strcasestr) /* Find the first occurrence of NEEDLE in HAYSTACK. NEEDLE is NEEDLELEN bytes long; HAYSTACK is HAYSTACKLEN bytes long. */ -extern void *memmem (__const void *__haystack, size_t __haystacklen, - __const void *__needle, size_t __needlelen) +extern void *memmem (const void *__haystack, size_t __haystacklen, + const void *__needle, size_t __needlelen) __THROW __attribute_pure__ __nonnull ((1, 3)); /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ #if 0 /* uClibc: disabled */ extern void *__mempcpy (void *__restrict __dest, - __const void *__restrict __src, size_t __n) + const void *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); #endif extern void *mempcpy (void *__restrict __dest, - __const void *__restrict __src, size_t __n) + const void *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); libc_hidden_proto(mempcpy) #endif @@ -272,7 +272,7 @@ libc_hidden_proto(mempcpy) __BEGIN_NAMESPACE_STD /* Return the length of S. */ -extern size_t strlen (__const char *__s) +extern size_t strlen (const char *__s) __THROW __attribute_pure__ __nonnull ((1)); libc_hidden_proto(strlen) __END_NAMESPACE_STD @@ -280,7 +280,7 @@ __END_NAMESPACE_STD #ifdef __USE_XOPEN2K8 /* Find the length of STRING, but scan at most MAXLEN characters. If no '\0' terminator is found in that many characters, return MAXLEN. */ -extern size_t strnlen (__const char *__string, size_t __maxlen) +extern size_t strnlen (const char *__string, size_t __maxlen) __THROW __attribute_pure__ __nonnull ((1)); libc_hidden_proto(strnlen) #endif @@ -343,22 +343,22 @@ extern void __bzero (void *__s, size_t __n) __THROW __nonnull ((1)); #ifdef __USE_BSD # ifdef __UCLIBC_SUSV3_LEGACY__ /* Copy N bytes of SRC to DEST (like memmove, but args reversed). */ -extern void bcopy (__const void *__src, void *__dest, size_t __n) +extern void bcopy (const void *__src, void *__dest, size_t __n) __THROW __nonnull ((1, 2)); /* Set N bytes of S to 0. */ extern void bzero (void *__s, size_t __n) __THROW __nonnull ((1)); /* Compare N bytes of S1 and S2 (same as memcmp). */ -extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) +extern int bcmp (const void *__s1, const void *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Find the first occurrence of C in S (same as strchr). */ -extern char *index (__const char *__s, int __c) +extern char *index (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); /* Find the last occurrence of C in S (same as strrchr). */ -extern char *rindex (__const char *__s, int __c) +extern char *rindex (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); # else # ifdef __UCLIBC_SUSV3_LEGACY_MACROS__ @@ -390,12 +390,12 @@ __extension__ extern int ffsll (long long int __ll) # endif /* Compare S1 and S2, ignoring case. */ -extern int strcasecmp (__const char *__s1, __const char *__s2) +extern int strcasecmp (const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); libc_hidden_proto(strcasecmp) /* Compare no more than N chars of S1 and S2, ignoring case. */ -extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) +extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); libc_hidden_proto(strncasecmp) #endif /* Use BSD. */ @@ -403,12 +403,12 @@ libc_hidden_proto(strncasecmp) #if defined __USE_XOPEN2K8 && defined __UCLIBC_HAS_XLOCALE__ /* Again versions of a few functions which use the given locale instead of the global one. */ -extern int strcasecmp_l (__const char *__s1, __const char *__s2, +extern int strcasecmp_l (const char *__s1, const char *__s2, __locale_t __loc) __THROW __attribute_pure__ __nonnull ((1, 2, 3)); libc_hidden_proto(strcasecmp_l) -extern int strncasecmp_l (__const char *__s1, __const char *__s2, +extern int strncasecmp_l (const char *__s1, const char *__s2, size_t __n, __locale_t __loc) __THROW __attribute_pure__ __nonnull ((1, 2, 4)); libc_hidden_proto(strncasecmp_l) @@ -418,7 +418,7 @@ libc_hidden_proto(strncasecmp_l) /* Return the next DELIM-delimited token from *STRINGP, terminating it with a '\0', and update *STRINGP to point past it. */ extern char *strsep (char **__restrict __stringp, - __const char *__restrict __delim) + const char *__restrict __delim) __THROW __nonnull ((1, 2)); libc_hidden_proto(strsep) #endif @@ -430,10 +430,10 @@ libc_hidden_proto(strsignal) /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ # if 0 /* uClibc: disabled */ -extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) +extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); # endif -extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) +extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); libc_hidden_proto(stpcpy) @@ -441,17 +441,17 @@ libc_hidden_proto(stpcpy) the last character written into DEST. */ # if 0 /* uClibc: disabled */ extern char *__stpncpy (char *__restrict __dest, - __const char *__restrict __src, size_t __n) + const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); # endif extern char *stpncpy (char *__restrict __dest, - __const char *__restrict __src, size_t __n) + const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); #endif #ifdef __USE_GNU /* Compare S1 and S2 as strings holding name & indices/version numbers. */ -extern int strverscmp (__const char *__s1, __const char *__s2) +extern int strverscmp (const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); libc_hidden_proto(strverscmp) @@ -468,7 +468,7 @@ extern void *memfrob (void *__s, size_t __n) __THROW __nonnull ((1)); declare the function if the `basename' macro is available (defined in ) which makes the XPG version of this function available. */ -extern char *basename (__const char *__filename) __THROW __nonnull ((1)); +extern char *basename (const char *__filename) __THROW __nonnull ((1)); # endif #endif /* __USE_GNU */ diff --git a/include/strings.h b/include/strings.h index a55bee078..baf2a6389 100644 --- a/include/strings.h +++ b/include/strings.h @@ -34,22 +34,22 @@ __BEGIN_DECLS # ifdef __UCLIBC_SUSV3_LEGACY__ /* Copy N bytes of SRC to DEST (like memmove, but args reversed). */ -extern void bcopy (__const void *__src, void *__dest, size_t __n) +extern void bcopy (const void *__src, void *__dest, size_t __n) __THROW __nonnull ((1, 2)); /* Set N bytes of S to 0. */ extern void bzero (void *__s, size_t __n) __THROW __nonnull ((1)); /* Compare N bytes of S1 and S2 (same as memcmp). */ -extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) +extern int bcmp (const void *__s1, const void *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Find the first occurrence of C in S (same as strchr). */ -extern char *index (__const char *__s, int __c) +extern char *index (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); /* Find the last occurrence of C in S (same as strrchr). */ -extern char *rindex (__const char *__s, int __c) +extern char *rindex (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); # else # ifdef __UCLIBC_SUSV3_LEGACY_MACROS__ @@ -81,12 +81,12 @@ __extension__ extern int ffsll (long long int __ll) # endif /* Compare S1 and S2, ignoring case. */ -extern int strcasecmp (__const char *__s1, __const char *__s2) +extern int strcasecmp (const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); libc_hidden_proto(strcasecmp) /* Compare no more than N chars of S1 and S2, ignoring case. */ -extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) +extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); libc_hidden_proto(strncasecmp) @@ -98,12 +98,12 @@ libc_hidden_proto(strncasecmp) /* Again versions of a few functions which use the given locale instead of the global one. */ -extern int strcasecmp_l (__const char *__s1, __const char *__s2, +extern int strcasecmp_l (const char *__s1, const char *__s2, __locale_t __loc) __THROW __attribute_pure__ __nonnull ((1, 2, 3)); libc_hidden_proto(strcasecmp_l) -extern int strncasecmp_l (__const char *__s1, __const char *__s2, +extern int strncasecmp_l (const char *__s1, const char *__s2, size_t __n, __locale_t __loc) __THROW __attribute_pure__ __nonnull ((1, 2, 4)); libc_hidden_proto(strncasecmp_l) diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h index 1ec0b97be..6f81b6a7c 100644 --- a/include/sys/cdefs.h +++ b/include/sys/cdefs.h @@ -62,10 +62,6 @@ # define __THROW # define __NTH(fct) fct -# define __const const -# define __signed signed -# define __volatile volatile - #endif /* GCC. */ /* These two macros are not used in glibc anymore. They are kept here diff --git a/include/sys/ipc.h b/include/sys/ipc.h index adf4b4c3c..02aab5255 100644 --- a/include/sys/ipc.h +++ b/include/sys/ipc.h @@ -50,7 +50,7 @@ typedef __key_t key_t; __BEGIN_DECLS /* Generates key for System V style IPC. */ -extern key_t ftok (__const char *__pathname, int __proj_id) __THROW; +extern key_t ftok (const char *__pathname, int __proj_id) __THROW; __END_DECLS diff --git a/include/sys/mman.h b/include/sys/mman.h index fe0231fc3..71d553af4 100644 --- a/include/sys/mman.h +++ b/include/sys/mman.h @@ -114,10 +114,10 @@ extern int posix_madvise (void *__addr, size_t __len, int __advice) __THROW; /* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to be memory resident. */ -extern int mlock (__const void *__addr, size_t __len) __THROW; +extern int mlock (const void *__addr, size_t __len) __THROW; /* Unlock whole pages previously mapped by the range [ADDR,ADDR+LEN). */ -extern int munlock (__const void *__addr, size_t __len) __THROW; +extern int munlock (const void *__addr, size_t __len) __THROW; /* Cause all currently mapped pages of the process to be memory resident until unlocked by a call to the `munlockall', until the process exits, @@ -132,8 +132,8 @@ extern int munlockall (void) __THROW; /* On no-mmu systems, memory cannot be swapped out, so * these functions will always succeed. */ -static __inline__ int mlock (__const void *__addr, size_t __len) { return 0; } -static __inline__ int munlock (__const void *__addr, size_t __len) { return 0; } +static __inline__ int mlock (const void *__addr, size_t __len) { return 0; } +static __inline__ int munlock (const void *__addr, size_t __len) { return 0; } static __inline__ int mlockall (int __flags) { return 0; } static __inline__ int munlockall (void) { return 0; } #endif @@ -169,10 +169,10 @@ extern int remap_file_pages (void *__start, size_t __size, int __prot, /* Open shared memory segment. */ -extern int shm_open (__const char *__name, int __oflag, mode_t __mode); +extern int shm_open (const char *__name, int __oflag, mode_t __mode); /* Remove shared memory segment. */ -extern int shm_unlink (__const char *__name); +extern int shm_unlink (const char *__name); __END_DECLS diff --git a/include/sys/mount.h b/include/sys/mount.h index 440af139a..fbd61fdbd 100644 --- a/include/sys/mount.h +++ b/include/sys/mount.h @@ -107,16 +107,16 @@ enum __BEGIN_DECLS /* Mount a filesystem. */ -extern int mount (__const char *__special_file, __const char *__dir, - __const char *__fstype, unsigned long int __rwflag, - __const void *__data) __THROW; +extern int mount (const char *__special_file, const char *__dir, + const char *__fstype, unsigned long int __rwflag, + const void *__data) __THROW; /* Unmount a filesystem. */ -extern int umount (__const char *__special_file) __THROW; +extern int umount (const char *__special_file) __THROW; #ifdef __UCLIBC_LINUX_SPECIFIC__ /* Unmount a filesystem. Force unmounting if FLAGS is set to MNT_FORCE. */ -extern int umount2 (__const char *__special_file, int __flags) __THROW; +extern int umount2 (const char *__special_file, int __flags) __THROW; libc_hidden_proto(umount2) #endif diff --git a/include/sys/msg.h b/include/sys/msg.h index e53990054..b27e972ae 100644 --- a/include/sys/msg.h +++ b/include/sys/msg.h @@ -76,7 +76,7 @@ extern ssize_t msgrcv (int __msqid, void *__msgp, size_t __msgsz, This function is a cancellation point and therefore not marked with __THROW. */ -extern int msgsnd (int __msqid, __const void *__msgp, size_t __msgsz, +extern int msgsnd (int __msqid, const void *__msgp, size_t __msgsz, int __msgflg); __END_DECLS diff --git a/include/sys/poll.h b/include/sys/poll.h index 2130ce688..029a9badd 100644 --- a/include/sys/poll.h +++ b/include/sys/poll.h @@ -65,8 +65,8 @@ libc_hidden_proto(poll) This function is a cancellation point and therefore not marked with __THROW. */ extern int ppoll (struct pollfd *__fds, nfds_t __nfds, - __const struct timespec *__timeout, - __const __sigset_t *__ss); + const struct timespec *__timeout, + const __sigset_t *__ss); #endif __END_DECLS diff --git a/include/sys/resource.h b/include/sys/resource.h index 3356de5a8..17167ed99 100644 --- a/include/sys/resource.h +++ b/include/sys/resource.h @@ -68,12 +68,12 @@ extern int getrlimit64 (__rlimit_resource_t __resource, Return 0 if successful, -1 if not (and sets errno). */ #ifndef __USE_FILE_OFFSET64 extern int setrlimit (__rlimit_resource_t __resource, - __const struct rlimit *__rlimits) __THROW; + const struct rlimit *__rlimits) __THROW; libc_hidden_proto(setrlimit) #else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (setrlimit, (__rlimit_resource_t __resource, - __const struct rlimit *__rlimits), + const struct rlimit *__rlimits), setrlimit64); # else # define setrlimit setrlimit64 @@ -81,7 +81,7 @@ extern int __REDIRECT_NTH (setrlimit, (__rlimit_resource_t __resource, #endif #ifdef __USE_LARGEFILE64 extern int setrlimit64 (__rlimit_resource_t __resource, - __const struct rlimit64 *__rlimits) __THROW; + const struct rlimit64 *__rlimits) __THROW; #endif /* Return resource usage information on process indicated by WHO diff --git a/include/sys/sem.h b/include/sys/sem.h index 9b945ba4e..84168d834 100644 --- a/include/sys/sem.h +++ b/include/sys/sem.h @@ -60,7 +60,7 @@ extern int semop (int __semid, struct sembuf *__sops, size_t __nsops) __THROW; #ifdef __USE_GNU /* Operate on semaphore with timeout. */ extern int semtimedop (int __semid, struct sembuf *__sops, size_t __nsops, - __const struct timespec *__timeout) __THROW; + const struct timespec *__timeout) __THROW; #endif __END_DECLS diff --git a/include/sys/shm.h b/include/sys/shm.h index fc9a99d37..8f04adeb4 100644 --- a/include/sys/shm.h +++ b/include/sys/shm.h @@ -53,11 +53,11 @@ extern int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf) __THROW; extern int shmget (key_t __key, size_t __size, int __shmflg) __THROW; /* Attach shared memory segment. */ -extern void *shmat (int __shmid, __const void *__shmaddr, int __shmflg) +extern void *shmat (int __shmid, const void *__shmaddr, int __shmflg) __THROW; /* Detach shared memory segment. */ -extern int shmdt (__const void *__shmaddr) __THROW; +extern int shmdt (const void *__shmaddr) __THROW; __END_DECLS diff --git a/include/sys/socket.h b/include/sys/socket.h index 97f4b0635..8642312aa 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -68,7 +68,7 @@ enum old-style declaration, too. */ #if defined __cplusplus || !__GNUC_PREREQ (2, 7) || !defined __USE_GNU # define __SOCKADDR_ARG struct sockaddr *__restrict -# define __CONST_SOCKADDR_ARG __const struct sockaddr * +# define __CONST_SOCKADDR_ARG const struct sockaddr * #else /* Add more `struct sockaddr_AF' types here as necessary. These are all the ones I found on NetBSD and Linux. */ @@ -91,7 +91,7 @@ enum typedef union { __SOCKADDR_ALLTYPES } __SOCKADDR_ARG __attribute__ ((__transparent_union__)); # undef __SOCKADDR_ONETYPE -# define __SOCKADDR_ONETYPE(type) __const struct type *__restrict __##type##__; +# define __SOCKADDR_ONETYPE(type) const struct type *__restrict __##type##__; typedef union { __SOCKADDR_ALLTYPES } __CONST_SOCKADDR_ARG __attribute__ ((__transparent_union__)); # undef __SOCKADDR_ONETYPE @@ -141,7 +141,7 @@ extern int getpeername (int __fd, __SOCKADDR_ARG __addr, This function is a cancellation point and therefore not marked with __THROW. */ -extern ssize_t send (int __fd, __const void *__buf, size_t __n, int __flags); +extern ssize_t send (int __fd, const void *__buf, size_t __n, int __flags); libc_hidden_proto(send) /* Read N bytes into BUF from socket FD. @@ -157,7 +157,7 @@ libc_hidden_proto(recv) This function is a cancellation point and therefore not marked with __THROW. */ -extern ssize_t sendto (int __fd, __const void *__buf, size_t __n, +extern ssize_t sendto (int __fd, const void *__buf, size_t __n, int __flags, __CONST_SOCKADDR_ARG __addr, socklen_t __addr_len); #ifdef _LIBC @@ -186,7 +186,7 @@ libc_hidden_proto(recvfrom) This function is a cancellation point and therefore not marked with __THROW. */ -extern ssize_t sendmsg (int __fd, __const struct msghdr *__message, +extern ssize_t sendmsg (int __fd, const struct msghdr *__message, int __flags); libc_hidden_proto(sendmsg) @@ -210,7 +210,7 @@ extern int getsockopt (int __fd, int __level, int __optname, to *OPTVAL (which is OPTLEN bytes long). Returns 0 on success, -1 for errors. */ extern int setsockopt (int __fd, int __level, int __optname, - __const void *__optval, socklen_t __optlen) __THROW; + const void *__optval, socklen_t __optlen) __THROW; libc_hidden_proto(setsockopt) diff --git a/include/sys/stat.h b/include/sys/stat.h index 18d087d4b..bff90cb6d 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -205,7 +205,7 @@ __BEGIN_DECLS #ifndef __USE_FILE_OFFSET64 /* Get file attributes for FILE and put them in BUF. */ -extern int stat (__const char *__restrict __file, +extern int stat (const char *__restrict __file, struct stat *__restrict __buf) __THROW __nonnull ((1, 2)); libc_hidden_proto(stat) @@ -215,7 +215,7 @@ extern int fstat (int __fd, struct stat *__buf) __THROW __nonnull ((2)); libc_hidden_proto(fstat) #else # ifdef __REDIRECT_NTH -extern int __REDIRECT_NTH (stat, (__const char *__restrict __file, +extern int __REDIRECT_NTH (stat, (const char *__restrict __file, struct stat *__restrict __buf), stat64) __nonnull ((1, 2)); extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64) @@ -226,7 +226,7 @@ extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64) # endif #endif #ifdef __USE_LARGEFILE64 -extern int stat64 (__const char *__restrict __file, +extern int stat64 (const char *__restrict __file, struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2)); extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2)); libc_hidden_proto(stat64) @@ -238,12 +238,12 @@ libc_hidden_proto(fstat64) Relative path names are interpreted relative to FD unless FD is AT_FDCWD. */ # ifndef __USE_FILE_OFFSET64 -extern int fstatat (int __fd, __const char *__restrict __file, +extern int fstatat (int __fd, const char *__restrict __file, struct stat *__restrict __buf, int __flag) __THROW __nonnull ((2, 3)); # else # ifdef __REDIRECT_NTH -extern int __REDIRECT_NTH (fstatat, (int __fd, __const char *__restrict __file, +extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file, struct stat *__restrict __buf, int __flag), fstatat64) __nonnull ((2, 3)); @@ -253,7 +253,7 @@ extern int __REDIRECT_NTH (fstatat, (int __fd, __const char *__restrict __file, # endif # ifdef __USE_LARGEFILE64 -extern int fstatat64 (int __fd, __const char *__restrict __file, +extern int fstatat64 (int __fd, const char *__restrict __file, struct stat64 *__restrict __buf, int __flag) __THROW __nonnull ((2, 3)); # endif @@ -263,13 +263,13 @@ extern int fstatat64 (int __fd, __const char *__restrict __file, # ifndef __USE_FILE_OFFSET64 /* Get file attributes about FILE and put them in BUF. If FILE is a symbolic link, do not follow it. */ -extern int lstat (__const char *__restrict __file, +extern int lstat (const char *__restrict __file, struct stat *__restrict __buf) __THROW __nonnull ((1, 2)); libc_hidden_proto(lstat) # else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (lstat, - (__const char *__restrict __file, + (const char *__restrict __file, struct stat *__restrict __buf), lstat64) __nonnull ((1, 2)); # else @@ -277,7 +277,7 @@ extern int __REDIRECT_NTH (lstat, # endif # endif # ifdef __USE_LARGEFILE64 -extern int lstat64 (__const char *__restrict __file, +extern int lstat64 (const char *__restrict __file, struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2)); libc_hidden_proto(lstat64) @@ -286,7 +286,7 @@ libc_hidden_proto(lstat64) /* Set file access permissions for FILE to MODE. If FILE is a symbolic link, this affects its target instead. */ -extern int chmod (__const char *__file, __mode_t __mode) +extern int chmod (const char *__file, __mode_t __mode) __THROW __nonnull ((1)); libc_hidden_proto(chmod) @@ -294,7 +294,7 @@ libc_hidden_proto(chmod) /* Set file access permissions for FILE to MODE. If FILE is a symbolic link, this affects the link itself rather than its target. */ -extern int lchmod (__const char *__file, __mode_t __mode) +extern int lchmod (const char *__file, __mode_t __mode) __THROW __nonnull ((1)); #endif @@ -306,7 +306,7 @@ extern int fchmod (int __fd, __mode_t __mode) __THROW; #ifdef __USE_ATFILE /* Set file access permissions of FILE relative to the directory FD is open on. */ -extern int fchmodat (int __fd, __const char *__file, __mode_t __mode, +extern int fchmodat (int __fd, const char *__file, __mode_t __mode, int __flag) __THROW __nonnull ((2)) __wur; #endif /* Use ATFILE. */ @@ -324,7 +324,7 @@ extern __mode_t getumask (void) __THROW; #endif /* Create a new directory named PATH, with permission bits MODE. */ -extern int mkdir (__const char *__path, __mode_t __mode) +extern int mkdir (const char *__path, __mode_t __mode) __THROW __nonnull ((1)); libc_hidden_proto(mkdir) @@ -332,7 +332,7 @@ libc_hidden_proto(mkdir) /* Like mkdir, create a new directory with permission bits MODE. But interpret relative PATH names relative to the directory associated with FD. */ -extern int mkdirat (int __fd, __const char *__path, __mode_t __mode) +extern int mkdirat (int __fd, const char *__path, __mode_t __mode) __THROW __nonnull ((2)); #endif @@ -340,7 +340,7 @@ extern int mkdirat (int __fd, __const char *__path, __mode_t __mode) and device number DEV (which can be constructed from major and minor device numbers with the `makedev' macro above). */ #if defined __USE_MISC || defined __USE_BSD || defined __USE_XOPEN_EXTENDED -extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev) +extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev) __THROW __nonnull ((1)); libc_hidden_proto(mknod) @@ -348,7 +348,7 @@ libc_hidden_proto(mknod) /* Like mknod, create a new device file with permission bits MODE and device number DEV. But interpret relative PATH names relative to the directory associated with FD. */ -extern int mknodat (int __fd, __const char *__path, __mode_t __mode, +extern int mknodat (int __fd, const char *__path, __mode_t __mode, __dev_t __dev) __THROW __nonnull ((2)); libc_hidden_proto(mknodat) # endif @@ -356,22 +356,22 @@ libc_hidden_proto(mknodat) /* Create a new FIFO named PATH, with permission bits MODE. */ -extern int mkfifo (__const char *__path, __mode_t __mode) +extern int mkfifo (const char *__path, __mode_t __mode) __THROW __nonnull ((1)); #ifdef __USE_ATFILE /* Like mkfifo, create a new FIFO with permission bits MODE. But interpret relative PATH names relative to the directory associated with FD. */ -extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode) +extern int mkfifoat (int __fd, const char *__path, __mode_t __mode) __THROW __nonnull ((2)); #endif #ifdef __USE_ATFILE /* Set file access and modification times relative to directory file descriptor. */ -extern int utimensat (int __fd, __const char *__path, - __const struct timespec __times[2], +extern int utimensat (int __fd, const char *__path, + const struct timespec __times[2], int __flags) __THROW __nonnull ((2)); libc_hidden_proto(utimensat) @@ -379,7 +379,7 @@ libc_hidden_proto(utimensat) #ifdef __USE_XOPEN2K8 /* Set file access and modification times of the file associated with FD. */ -extern int futimens (int __fd, __const struct timespec __times[2]) __THROW; +extern int futimens (int __fd, const struct timespec __times[2]) __THROW; #endif /* on uClibc we have unversioned struct stat and mknod. diff --git a/include/sys/statfs.h b/include/sys/statfs.h index 870408b77..0b90c1319 100644 --- a/include/sys/statfs.h +++ b/include/sys/statfs.h @@ -28,19 +28,19 @@ __BEGIN_DECLS /* Return information about the filesystem on which FILE resides. */ #ifndef __USE_FILE_OFFSET64 -extern int statfs (__const char *__file, struct statfs *__buf) +extern int statfs (const char *__file, struct statfs *__buf) __THROW __nonnull ((1, 2)); #else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (statfs, - (__const char *__file, struct statfs *__buf), + (const char *__file, struct statfs *__buf), statfs64) __nonnull ((1, 2)); # else # define statfs statfs64 # endif #endif #ifdef __USE_LARGEFILE64 -extern int statfs64 (__const char *__file, struct statfs64 *__buf) +extern int statfs64 (const char *__file, struct statfs64 *__buf) __THROW __nonnull ((1, 2)); libc_hidden_proto(statfs64) #endif diff --git a/include/sys/statvfs.h b/include/sys/statvfs.h index 1e7d9d368..e5e0c2362 100644 --- a/include/sys/statvfs.h +++ b/include/sys/statvfs.h @@ -48,14 +48,14 @@ __BEGIN_DECLS /* Return information about the filesystem on which FILE resides. */ #ifndef __USE_FILE_OFFSET64 -extern int statvfs (__const char *__restrict __file, +extern int statvfs (const char *__restrict __file, struct statvfs *__restrict __buf) __THROW __nonnull ((1, 2)); libc_hidden_proto(statvfs) #else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (statvfs, - (__const char *__restrict __file, + (const char *__restrict __file, struct statvfs *__restrict __buf), statvfs64) __nonnull ((1, 2)); # else @@ -63,7 +63,7 @@ extern int __REDIRECT_NTH (statvfs, # endif #endif #ifdef __USE_LARGEFILE64 -extern int statvfs64 (__const char *__restrict __file, +extern int statvfs64 (const char *__restrict __file, struct statvfs64 *__restrict __buf) __THROW __nonnull ((1, 2)); #endif diff --git a/include/sys/swap.h b/include/sys/swap.h index a5a7aae21..29faba616 100644 --- a/include/sys/swap.h +++ b/include/sys/swap.h @@ -32,10 +32,10 @@ __BEGIN_DECLS /* Make the block special device PATH available to the system for swapping. This call is restricted to the super-user. */ -extern int swapon (__const char *__path, int __flags) __THROW; +extern int swapon (const char *__path, int __flags) __THROW; /* Stop using block special device PATH for swapping. */ -extern int swapoff (__const char *__path) __THROW; +extern int swapoff (const char *__path) __THROW; __END_DECLS diff --git a/include/sys/syslog.h b/include/sys/syslog.h index fb8c500e1..8808d217c 100644 --- a/include/sys/syslog.h +++ b/include/sys/syslog.h @@ -184,7 +184,7 @@ extern void closelog (void); This function is a possible cancellation point and therefore not marked with __THROW. */ -extern void openlog (__const char *__ident, int __option, int __facility); +extern void openlog (const char *__ident, int __option, int __facility); /* Set the log mask level. */ extern int setlogmask (int __mask) __THROW; @@ -193,7 +193,7 @@ extern int setlogmask (int __mask) __THROW; This function is a possible cancellation point and therefore not marked with __THROW. */ -extern void syslog (int __pri, __const char *__fmt, ...) +extern void syslog (int __pri, const char *__fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); libc_hidden_proto(syslog) @@ -204,7 +204,7 @@ libc_hidden_proto(syslog) cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern void vsyslog (int __pri, __const char *__fmt, __gnuc_va_list __ap) +extern void vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap) __attribute__ ((__format__ (__printf__, 2, 0))); #endif diff --git a/include/sys/time.h b/include/sys/time.h index 8ebba4bae..3b7a106be 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -76,8 +76,8 @@ libc_hidden_proto(gettimeofday) #ifdef __USE_BSD /* Set the current time of day and timezone information. This call is restricted to the super-user. */ -extern int settimeofday (__const struct timeval *__tv, - __const struct timezone *__tz) +extern int settimeofday (const struct timeval *__tv, + const struct timezone *__tz) __THROW __nonnull ((1)); libc_hidden_proto(settimeofday) @@ -85,7 +85,7 @@ libc_hidden_proto(settimeofday) If OLDDELTA is not NULL, it is filled in with the amount of time adjustment remaining to be done from the last `adjtime' call. This call is restricted to the super-user. */ -extern int adjtime (__const struct timeval *__delta, +extern int adjtime (const struct timeval *__delta, struct timeval *__olddelta) __THROW; #endif @@ -132,25 +132,25 @@ extern int getitimer (__itimer_which_t __which, set *OLD to the old value of timer WHICH. Returns 0 on success, -1 on errors. */ extern int setitimer (__itimer_which_t __which, - __const struct itimerval *__restrict __new, + const struct itimerval *__restrict __new, struct itimerval *__restrict __old) __THROW; libc_hidden_proto(setitimer) /* Change the access time of FILE to TVP[0] and the modification time of FILE to TVP[1]. If TVP is a null pointer, use the current time instead. Returns 0 on success, -1 on errors. */ -extern int utimes (__const char *__file, __const struct timeval __tvp[2]) +extern int utimes (const char *__file, const struct timeval __tvp[2]) __THROW __nonnull ((1)); libc_hidden_proto(utimes) #ifdef __USE_BSD /* Same as `utimes', but does not follow symbolic links. */ -extern int lutimes (__const char *__file, __const struct timeval __tvp[2]) +extern int lutimes (const char *__file, const struct timeval __tvp[2]) __THROW __nonnull ((1)); #if 0 /* Same as `utimes', but takes an open file descriptor instead of a name. */ -extern int futimes (int __fd, __const struct timeval __tvp[2]) __THROW; +extern int futimes (int __fd, const struct timeval __tvp[2]) __THROW; #endif #endif @@ -158,8 +158,8 @@ extern int futimes (int __fd, __const struct timeval __tvp[2]) __THROW; /* Change the access time of FILE relative to FD to TVP[0] and the modification time of FILE to TVP[1]. If TVP is a null pointer, use the current time instead. Returns 0 on success, -1 on errors. */ -extern int futimesat (int __fd, __const char *__file, - __const struct timeval __tvp[2]) __THROW; +extern int futimesat (int __fd, const char *__file, + const struct timeval __tvp[2]) __THROW; #endif diff --git a/include/sys/uio.h b/include/sys/uio.h index 43ce07cb6..efc681e7b 100644 --- a/include/sys/uio.h +++ b/include/sys/uio.h @@ -36,7 +36,7 @@ __BEGIN_DECLS This function is a cancellation point and therefore not marked with __THROW. */ -extern ssize_t readv (int __fd, __const struct iovec *__iovec, int __count); +extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count); /* Write data pointed by the buffers described by IOVEC, which is a vector of COUNT `struct iovec's, to file descriptor FD. @@ -46,7 +46,7 @@ extern ssize_t readv (int __fd, __const struct iovec *__iovec, int __count); This function is a cancellation point and therefore not marked with __THROW. */ -extern ssize_t writev (int __fd, __const struct iovec *__iovec, int __count); +extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count); __END_DECLS diff --git a/include/sys/wait.h b/include/sys/wait.h index 4a2d7c4da..b3c2b973a 100644 --- a/include/sys/wait.h +++ b/include/sys/wait.h @@ -46,7 +46,7 @@ __BEGIN_DECLS (__extension__ (((union { __typeof(status) __in; int __i; }) \ { .__in = (status) }).__i)) # else -# define __WAIT_INT(status) (*(__const int *) &(status)) +# define __WAIT_INT(status) (*(const int *) &(status)) # endif /* This is the type of the argument to `wait'. The funky union diff --git a/include/sys/xattr.h b/include/sys/xattr.h index 031678d8a..f39642dcc 100644 --- a/include/sys/xattr.h +++ b/include/sys/xattr.h @@ -36,48 +36,48 @@ enum /* Set the attribute NAME of the file pointed to by PATH to VALUE (which is SIZE bytes long). Return 0 on success, -1 for errors. */ -extern int setxattr (__const char *__path, __const char *__name, - __const void *__value, size_t __size, int __flags) +extern int setxattr (const char *__path, const char *__name, + const void *__value, size_t __size, int __flags) __THROW; /* Set the attribute NAME of the file pointed to by PATH to VALUE (which is SIZE bytes long), not following symlinks for the last pathname component. Return 0 on success, -1 for errors. */ -extern int lsetxattr (__const char *__path, __const char *__name, - __const void *__value, size_t __size, int __flags) +extern int lsetxattr (const char *__path, const char *__name, + const void *__value, size_t __size, int __flags) __THROW; /* Set the attribute NAME of the file descriptor FD to VALUE (which is SIZE bytes long). Return 0 on success, -1 for errors. */ -extern int fsetxattr (int __fd, __const char *__name, __const void *__value, +extern int fsetxattr (int __fd, const char *__name, const void *__value, size_t __size, int __flags) __THROW; /* Get the attribute NAME of the file pointed to by PATH to VALUE (which is SIZE bytes long). Return 0 on success, -1 for errors. */ -extern ssize_t getxattr (__const char *__path, __const char *__name, +extern ssize_t getxattr (const char *__path, const char *__name, void *__value, size_t __size) __THROW; /* Get the attribute NAME of the file pointed to by PATH to VALUE (which is SIZE bytes long), not following symlinks for the last pathname component. Return 0 on success, -1 for errors. */ -extern ssize_t lgetxattr (__const char *__path, __const char *__name, +extern ssize_t lgetxattr (const char *__path, const char *__name, void *__value, size_t __size) __THROW; /* Get the attribute NAME of the file descriptor FD to VALUE (which is SIZE bytes long). Return 0 on success, -1 for errors. */ -extern ssize_t fgetxattr (int __fd, __const char *__name, void *__value, +extern ssize_t fgetxattr (int __fd, const char *__name, void *__value, size_t __size) __THROW; /* List attributes of the file pointed to by PATH into the user-supplied buffer LIST (which is SIZE bytes big). Return 0 on success, -1 for errors. */ -extern ssize_t listxattr (__const char *__path, char *__list, size_t __size) +extern ssize_t listxattr (const char *__path, char *__list, size_t __size) __THROW; /* List attributes of the file pointed to by PATH into the user-supplied buffer LIST (which is SIZE bytes big), not following symlinks for the last pathname component. Return 0 on success, -1 for errors. */ -extern ssize_t llistxattr (__const char *__path, char *__list, size_t __size) +extern ssize_t llistxattr (const char *__path, char *__list, size_t __size) __THROW; /* List attributes of the file descriptor FD into the user-supplied buffer @@ -87,16 +87,16 @@ extern ssize_t flistxattr (int __fd, char *__list, size_t __size) /* Remove the attribute NAME from the file pointed to by PATH. Return 0 on success, -1 for errors. */ -extern int removexattr (__const char *__path, __const char *__name) __THROW; +extern int removexattr (const char *__path, const char *__name) __THROW; /* Remove the attribute NAME from the file pointed to by PATH, not following symlinks for the last pathname component. Return 0 on success, -1 for errors. */ -extern int lremovexattr (__const char *__path, __const char *__name) __THROW; +extern int lremovexattr (const char *__path, const char *__name) __THROW; /* Remove the attribute NAME from the file descriptor FD. Return 0 on success, -1 for errors. */ -extern int fremovexattr (int __fd, __const char *__name) __THROW; +extern int fremovexattr (int __fd, const char *__name) __THROW; __END_DECLS diff --git a/include/termios.h b/include/termios.h index 487be4b5a..7f11fd28c 100644 --- a/include/termios.h +++ b/include/termios.h @@ -45,10 +45,10 @@ __BEGIN_DECLS #endif /* Return the output baud rate stored in *TERMIOS_P. */ -extern speed_t cfgetospeed (__const struct termios *__termios_p) __THROW; +extern speed_t cfgetospeed (const struct termios *__termios_p) __THROW; /* Return the input baud rate stored in *TERMIOS_P. */ -extern speed_t cfgetispeed (__const struct termios *__termios_p) __THROW; +extern speed_t cfgetispeed (const struct termios *__termios_p) __THROW; /* Set the output baud rate stored in *TERMIOS_P to SPEED. */ extern int cfsetospeed (struct termios *__termios_p, speed_t __speed) __THROW; @@ -71,7 +71,7 @@ libc_hidden_proto(tcgetattr) /* Set the state of FD to *TERMIOS_P. Values for OPTIONAL_ACTIONS (TCSA*) are in . */ extern int tcsetattr (int __fd, int __optional_actions, - __const struct termios *__termios_p) __THROW; + const struct termios *__termios_p) __THROW; libc_hidden_proto(tcsetattr) diff --git a/include/time.h b/include/time.h index 3a2885cba..a1dfdea18 100644 --- a/include/time.h +++ b/include/time.h @@ -144,10 +144,10 @@ struct tm #ifdef __UCLIBC_HAS_TM_EXTENSIONS__ #ifdef __USE_BSD long int tm_gmtoff; /* Seconds east of UTC. */ - __const char *tm_zone; /* Timezone abbreviation. */ + const char *tm_zone; /* Timezone abbreviation. */ #else long int __tm_gmtoff; /* Seconds east of UTC. */ - __const char *__tm_zone; /* Timezone abbreviation. */ + const char *__tm_zone; /* Timezone abbreviation. */ #endif #endif /* __UCLIBC_HAS_TM_EXTENSIONS__ */ }; @@ -205,15 +205,15 @@ extern time_t mktime (struct tm *__tp) __THROW; Write no more than MAXSIZE characters and return the number of characters written, or 0 if it would exceed MAXSIZE. */ extern size_t strftime (char *__restrict __s, size_t __maxsize, - __const char *__restrict __format, - __const struct tm *__restrict __tp) __THROW; + const char *__restrict __format, + const struct tm *__restrict __tp) __THROW; __END_NAMESPACE_STD # ifdef __USE_XOPEN /* Parse S according to FORMAT and store binary time information in TP. The return value is a pointer to the first unparsed character in S. */ -extern char *strptime (__const char *__restrict __s, - __const char *__restrict __fmt, struct tm *__tp) +extern char *strptime (const char *__restrict __s, + const char *__restrict __fmt, struct tm *__tp) __THROW; # endif @@ -224,15 +224,15 @@ extern char *strptime (__const char *__restrict __s, # include extern size_t strftime_l (char *__restrict __s, size_t __maxsize, - __const char *__restrict __format, - __const struct tm *__restrict __tp, + const char *__restrict __format, + const struct tm *__restrict __tp, __locale_t __loc) __THROW; libc_hidden_proto(strftime_l) # endif # ifdef __USE_GNU -extern char *strptime_l (__const char *__restrict __s, - __const char *__restrict __fmt, struct tm *__tp, +extern char *strptime_l (const char *__restrict __s, + const char *__restrict __fmt, struct tm *__tp, __locale_t __loc) __THROW; libc_hidden_proto(strptime_l) # endif @@ -242,23 +242,23 @@ libc_hidden_proto(strptime_l) __BEGIN_NAMESPACE_STD /* Return the `struct tm' representation of *TIMER in Universal Coordinated Time (aka Greenwich Mean Time). */ -extern struct tm *gmtime (__const time_t *__timer) __THROW; +extern struct tm *gmtime (const time_t *__timer) __THROW; /* Return the `struct tm' representation of *TIMER in the local timezone. */ -extern struct tm *localtime (__const time_t *__timer) __THROW; +extern struct tm *localtime (const time_t *__timer) __THROW; libc_hidden_proto(localtime) __END_NAMESPACE_STD # if defined __USE_POSIX || defined __USE_MISC /* Return the `struct tm' representation of *TIMER in UTC, using *TP to store the result. */ -extern struct tm *gmtime_r (__const time_t *__restrict __timer, +extern struct tm *gmtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; /* Return the `struct tm' representation of *TIMER in local time, using *TP to store the result. */ -extern struct tm *localtime_r (__const time_t *__restrict __timer, +extern struct tm *localtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; libc_hidden_proto(localtime_r) # endif /* POSIX or misc */ @@ -266,11 +266,11 @@ libc_hidden_proto(localtime_r) __BEGIN_NAMESPACE_STD /* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ -extern char *asctime (__const struct tm *__tp) __THROW; +extern char *asctime (const struct tm *__tp) __THROW; libc_hidden_proto(asctime) /* Equivalent to `asctime (localtime (timer))'. */ -extern char *ctime (__const time_t *__timer) __THROW; +extern char *ctime (const time_t *__timer) __THROW; libc_hidden_proto(ctime) __END_NAMESPACE_STD @@ -279,12 +279,12 @@ __END_NAMESPACE_STD /* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ -extern char *asctime_r (__const struct tm *__restrict __tp, +extern char *asctime_r (const struct tm *__restrict __tp, char *__restrict __buf) __THROW; libc_hidden_proto(asctime_r) /* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */ -extern char *ctime_r (__const time_t *__restrict __timer, +extern char *ctime_r (const time_t *__restrict __timer, char *__restrict __buf) __THROW; # endif /* POSIX or misc */ @@ -316,7 +316,7 @@ extern long int timezone; # ifdef __USE_SVID /* Set the system time to *WHEN. This call is restricted to the superuser. */ -extern int stime (__const time_t *__when) __THROW; +extern int stime (const time_t *__when) __THROW; libc_hidden_proto(stime) # endif @@ -348,7 +348,7 @@ extern int dysize (int __year) __THROW __attribute__ ((__const__)); This function is a cancellation point and therefore not marked with __THROW. */ -extern int nanosleep (__const struct timespec *__requested_time, +extern int nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); libc_hidden_proto(nanosleep) @@ -361,7 +361,7 @@ libc_hidden_proto(clock_getres) extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW; /* Set clock CLOCK_ID to value TP. */ -extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) +extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) __THROW; # endif /* __UCLIBC_HAS_REALTIME__ */ @@ -372,7 +372,7 @@ extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) This function is a cancellation point and therefore not marked with __THROW. */ extern int clock_nanosleep (clockid_t __clock_id, int __flags, - __const struct timespec *__req, + const struct timespec *__req, struct timespec *__rem); /* Return clock ID for CPU-time clock. */ @@ -391,7 +391,7 @@ extern int timer_delete (timer_t __timerid) __THROW; /* Set timer TIMERID to VALUE, returning old value in OVLAUE. */ extern int timer_settime (timer_t __timerid, int __flags, - __const struct itimerspec *__restrict __value, + const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) __THROW; /* Get current value of timer TIMERID and store it in VLAUE. */ @@ -427,7 +427,7 @@ extern int getdate_err; This function is a possible cancellation points and therefore not marked with __THROW. */ -extern struct tm *getdate (__const char *__string); +extern struct tm *getdate (const char *__string); # endif # ifdef __USE_GNU @@ -441,7 +441,7 @@ extern struct tm *getdate (__const char *__string); cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern int getdate_r (__const char *__restrict __string, +extern int getdate_r (const char *__restrict __string, struct tm *__restrict __resbufp); # endif #endif /* __UCLIBC_MJN3_ONLY__ */ diff --git a/include/ttyent.h b/include/ttyent.h index 3166e83b2..63df44921 100644 --- a/include/ttyent.h +++ b/include/ttyent.h @@ -57,7 +57,7 @@ __BEGIN_DECLS extern struct ttyent *getttyent (void) __THROW; libc_hidden_proto(getttyent) -extern struct ttyent *getttynam (__const char *__tty) __THROW; +extern struct ttyent *getttynam (const char *__tty) __THROW; extern int setttyent (void) __THROW; libc_hidden_proto(setttyent) extern int endttyent (void) __THROW; diff --git a/include/unistd.h b/include/unistd.h index d1c5a015e..feadf9382 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -288,16 +288,16 @@ typedef __socklen_t socklen_t; #define F_OK 0 /* Test for existence. */ /* Test for access to NAME using the real UID and real GID. */ -extern int access (__const char *__name, int __type) __THROW __nonnull ((1)); +extern int access (const char *__name, int __type) __THROW __nonnull ((1)); #if 0 /*def __USE_GNU*/ /* Test for access to NAME using the effective UID and GID (as normal file operations use). */ -extern int euidaccess (__const char *__name, int __type) +extern int euidaccess (const char *__name, int __type) __THROW __nonnull ((1)); /* An alias for `euidaccess', used by some other systems. */ -extern int eaccess (__const char *__name, int __type) +extern int eaccess (const char *__name, int __type) __THROW __nonnull ((1)); #endif @@ -305,7 +305,7 @@ extern int eaccess (__const char *__name, int __type) /* Test for access to FILE relative to the directory FD is open on. If AT_EACCESS is set in FLAG, then use effective IDs like `eaccess', otherwise use real IDs like `access'. */ -extern int faccessat (int __fd, __const char *__file, int __type, int __flag) +extern int faccessat (int __fd, const char *__file, int __type, int __flag) __THROW __nonnull ((2)) __wur; #endif /* Use GNU. */ @@ -380,7 +380,7 @@ libc_hidden_proto(read) This function is a cancellation point and therefore not marked with __THROW. */ -extern ssize_t write (int __fd, __const void *__buf, size_t __n) __wur; +extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur; #ifdef _LIBC extern __typeof(write) __write_nocancel attribute_hidden; libc_hidden_proto(write) @@ -402,14 +402,14 @@ extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, This function is a cancellation point and therefore not marked with __THROW. */ -extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n, +extern ssize_t pwrite (int __fd, const void *__buf, size_t __n, __off_t __offset) __wur; # else # ifdef __REDIRECT extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes, __off64_t __offset), pread64) __wur; -extern ssize_t __REDIRECT (pwrite, (int __fd, __const void *__buf, +extern ssize_t __REDIRECT (pwrite, (int __fd, const void *__buf, size_t __nbytes, __off64_t __offset), pwrite64) __wur; # else @@ -426,7 +426,7 @@ extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __wur; /* Write N bytes of BUF to FD at the given position OFFSET without changing the file pointer. Return the number written, or -1. */ -extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, +extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n, __off64_t __offset) __wur; # endif #endif @@ -495,7 +495,7 @@ extern int pause (void); /* Change the owner and group of FILE. */ -extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) +extern int chown (const char *__file, __uid_t __owner, __gid_t __group) __THROW __nonnull ((1)) __wur; libc_hidden_proto(chown) @@ -506,7 +506,7 @@ extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __THROW __wur; /* Change owner and group of FILE, if it is a symbolic link the ownership of the symbolic link is changed. */ -extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) +extern int lchown (const char *__file, __uid_t __owner, __gid_t __group) __THROW __nonnull ((1)) __wur; #endif /* Use BSD || X/Open Unix. */ @@ -514,13 +514,13 @@ extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) #ifdef __USE_ATFILE /* Change the owner and group of FILE relative to the directory FD is open on. */ -extern int fchownat (int __fd, __const char *__file, __uid_t __owner, +extern int fchownat (int __fd, const char *__file, __uid_t __owner, __gid_t __group, int __flag) __THROW __nonnull ((2)) __wur; #endif /* Use GNU. */ /* Change the process's working directory to PATH. */ -extern int chdir (__const char *__path) __THROW __nonnull ((1)) __wur; +extern int chdir (const char *__path) __THROW __nonnull ((1)) __wur; libc_hidden_proto(chdir) #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED @@ -577,45 +577,45 @@ extern char **environ; /* Replace the current process, executing PATH with arguments ARGV and environment ENVP. ARGV and ENVP are terminated by NULL pointers. */ -extern int execve (__const char *__path, char *__const __argv[], - char *__const __envp[]) __THROW __nonnull ((1)); +extern int execve (const char *__path, char *const __argv[], + char *const __envp[]) __THROW __nonnull ((1)); libc_hidden_proto(execve) #if 0 /*def __USE_XOPEN2K8*/ /* Execute the file FD refers to, overlaying the running program image. ARGV and ENVP are passed to the new program, as for `execve'. */ -extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) +extern int fexecve (int __fd, char *const __argv[], char *const __envp[]) __THROW; #endif /* Execute PATH with arguments ARGV and environment from `environ'. */ -extern int execv (__const char *__path, char *__const __argv[]) +extern int execv (const char *__path, char *const __argv[]) __THROW __nonnull ((1)); libc_hidden_proto(execv) /* Execute PATH with all arguments after PATH until a NULL pointer, and the argument after that for environment. */ -extern int execle (__const char *__path, __const char *__arg, ...) +extern int execle (const char *__path, const char *__arg, ...) __THROW __nonnull ((1)); libc_hidden_proto(execle) /* Execute PATH with all arguments after PATH until a NULL pointer and environment from `environ'. */ -extern int execl (__const char *__path, __const char *__arg, ...) +extern int execl (const char *__path, const char *__arg, ...) __THROW __nonnull ((1)); libc_hidden_proto(execl) /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with arguments ARGV and environment from `environ'. */ -extern int execvp (__const char *__file, char *__const __argv[]) +extern int execvp (const char *__file, char *const __argv[]) __THROW __nonnull ((1)); libc_hidden_proto(execvp) /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with all arguments after FILE until a NULL pointer and environment from `environ'. */ -extern int execlp (__const char *__file, __const char *__arg, ...) +extern int execlp (const char *__file, const char *__arg, ...) __THROW __nonnull ((1)); libc_hidden_proto(execlp) @@ -637,7 +637,7 @@ libc_hidden_proto(_exit) #include /* Get file-specific configuration information about PATH. */ -extern long int pathconf (__const char *__path, int __name) +extern long int pathconf (const char *__path, int __name) __THROW __nonnull ((1)); /* Get file-specific configuration about descriptor FD. */ @@ -868,26 +868,26 @@ extern int ttyslot (void) __THROW; /* Make a link to FROM named TO. */ -extern int link (__const char *__from, __const char *__to) +extern int link (const char *__from, const char *__to) __THROW __nonnull ((1, 2)) __wur; #ifdef __USE_ATFILE /* Like link but relative paths in TO and FROM are interpreted relative to FROMFD and TOFD respectively. */ -extern int linkat (int __fromfd, __const char *__from, int __tofd, - __const char *__to, int __flags) +extern int linkat (int __fromfd, const char *__from, int __tofd, + const char *__to, int __flags) __THROW __nonnull ((2, 4)) __wur; #endif #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K /* Make a symbolic link to FROM named TO. */ -extern int symlink (__const char *__from, __const char *__to) +extern int symlink (const char *__from, const char *__to) __THROW __nonnull ((1, 2)) __wur; /* Read the contents of the symbolic link PATH into no more than LEN bytes of BUF. The contents are not null-terminated. Returns the number of characters read, or -1 for errors. */ -extern ssize_t readlink (__const char *__restrict __path, +extern ssize_t readlink (const char *__restrict __path, char *__restrict __buf, size_t __len) __THROW __nonnull ((1, 2)) __wur; libc_hidden_proto(readlink) @@ -895,27 +895,27 @@ libc_hidden_proto(readlink) #ifdef __USE_ATFILE /* Like symlink but a relative path in TO is interpreted relative to TOFD. */ -extern int symlinkat (__const char *__from, int __tofd, - __const char *__to) __THROW __nonnull ((1, 3)) __wur; +extern int symlinkat (const char *__from, int __tofd, + const char *__to) __THROW __nonnull ((1, 3)) __wur; /* Like readlink but a relative PATH is interpreted relative to FD. */ -extern ssize_t readlinkat (int __fd, __const char *__restrict __path, +extern ssize_t readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __THROW __nonnull ((2, 3)) __wur; #endif /* Remove the link NAME. */ -extern int unlink (__const char *__name) __THROW __nonnull ((1)); +extern int unlink (const char *__name) __THROW __nonnull ((1)); libc_hidden_proto(unlink) #ifdef __USE_ATFILE /* Remove the link NAME relative to FD. */ -extern int unlinkat (int __fd, __const char *__name, int __flag) +extern int unlinkat (int __fd, const char *__name, int __flag) __THROW __nonnull ((2)); #endif /* Remove the directory PATH. */ -extern int rmdir (__const char *__path) __THROW __nonnull ((1)); +extern int rmdir (const char *__path) __THROW __nonnull ((1)); libc_hidden_proto(rmdir) @@ -945,7 +945,7 @@ extern int getlogin_r (char *__name, size_t __name_len) __nonnull ((1)); #if 0 /*def __USE_BSD*/ /* Set the login name returned by `getlogin'. */ -extern int setlogin (__const char *__name) __THROW __nonnull ((1)); +extern int setlogin (const char *__name) __THROW __nonnull ((1)); #endif @@ -971,7 +971,7 @@ libc_hidden_proto(gethostname) #if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98) /* Set the name of the current host to NAME, which is LEN bytes long. This call is restricted to the super-user. */ -extern int sethostname (__const char *__name, size_t __len) +extern int sethostname (const char *__name, size_t __len) __THROW __nonnull ((1)) __wur; /* Set the current machine's Internet number to ID. @@ -988,7 +988,7 @@ extern int getdomainname (char *__name, size_t __len) libc_hidden_proto(getdomainname) #endif #if defined __UCLIBC_BSD_SPECIFIC__ -extern int setdomainname (__const char *__name, size_t __len) +extern int setdomainname (const char *__name, size_t __len) __THROW __nonnull ((1)) __wur; #endif @@ -1002,7 +1002,7 @@ extern int vhangup (void) __THROW; #if 0 /* Revoke the access of all descriptors currently open on FILE. */ -extern int revoke (__const char *__file) __THROW __nonnull ((1)) __wur; +extern int revoke (const char *__file) __THROW __nonnull ((1)) __wur; /* Enable statistical profiling, writing samples of the PC into at most @@ -1019,7 +1019,7 @@ extern int profil (unsigned short int *__sample_buffer, size_t __size, /* Turn accounting on if NAME is an existing file. The system will then write a record for each process as it terminates, to this file. If NAME is NULL, turn accounting off. This call is restricted to the super-user. */ -extern int acct (__const char *__name) __THROW; +extern int acct (const char *__name) __THROW; /* Successive calls return the shells listed in `/etc/shells'. */ @@ -1040,11 +1040,11 @@ extern int daemon (int __nochdir, int __noclose) __THROW __wur; #if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_XOPEN2K) /* Make PATH be the root directory (the starting point for absolute paths). This call is restricted to the super-user. */ -extern int chroot (__const char *__path) __THROW __nonnull ((1)) __wur; +extern int chroot (const char *__path) __THROW __nonnull ((1)) __wur; /* Prompt with PROMPT and read a string from the terminal without echoing. Uses /dev/tty if possible; otherwise stderr and stdin. */ -extern char *getpass (__const char *__prompt) __nonnull ((1)); +extern char *getpass (const char *__prompt) __nonnull ((1)); #endif /* Use BSD || X/Open. */ @@ -1080,20 +1080,20 @@ libc_hidden_proto(getdtablesize) /* Truncate FILE to LENGTH bytes. */ # ifndef __USE_FILE_OFFSET64 -extern int truncate (__const char *__file, __off_t __length) +extern int truncate (const char *__file, __off_t __length) __THROW __nonnull ((1)) __wur; libc_hidden_proto(truncate) # else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (truncate, - (__const char *__file, __off64_t __length), + (const char *__file, __off64_t __length), truncate64) __nonnull ((1)) __wur; # else # define truncate truncate64 # endif # endif # ifdef __USE_LARGEFILE64 -extern int truncate64 (__const char *__file, __off64_t __length) +extern int truncate64 (const char *__file, __off64_t __length) __THROW __nonnull ((1)) __wur; # endif @@ -1213,7 +1213,7 @@ extern int fdatasync (int __fildes); #ifdef __USE_XOPEN # if defined __UCLIBC_HAS_CRYPT__ /* Encrypt at most 8 characters from KEY using salt to perturb DES. */ -extern char *crypt (__const char *__key, __const char *__salt) +extern char *crypt (const char *__key, const char *__salt) __THROW __nonnull ((1, 2)); /* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt @@ -1226,7 +1226,7 @@ extern void encrypt (char *__block, int __edflag) __THROW __nonnull ((1)); FROM and copy the result to TO. The value of TO must not be in the range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM is without partner. */ -extern void swab (__const void *__restrict __from, void *__restrict __to, +extern void swab (const void *__restrict __from, void *__restrict __to, ssize_t __n) __THROW __nonnull ((1, 2)); #endif diff --git a/include/utime.h b/include/utime.h index f8a6bad1f..45999ebb1 100644 --- a/include/utime.h +++ b/include/utime.h @@ -42,8 +42,8 @@ struct utimbuf /* Set the access and modification times of FILE to those given in *FILE_TIMES. If FILE_TIMES is NULL, set them to the current time. */ -extern int utime (__const char *__file, - __const struct utimbuf *__file_times) +extern int utime (const char *__file, + const struct utimbuf *__file_times) __THROW __nonnull ((1)); libc_hidden_proto(utime) diff --git a/include/utmp.h b/include/utmp.h index a122d886f..2908e3386 100644 --- a/include/utmp.h +++ b/include/utmp.h @@ -43,22 +43,22 @@ extern int login_tty (int __fd) __THROW; /* Write the given entry into utmp and wtmp. */ -extern void login (__const struct utmp *__entry) __THROW; +extern void login (const struct utmp *__entry) __THROW; /* Write the utmp entry to say the user on UT_LINE has logged out. */ -extern int logout (__const char *__ut_line) __THROW; +extern int logout (const char *__ut_line) __THROW; /* Append to wtmp an entry for the current time and the given info. */ -extern void logwtmp (__const char *__ut_line, __const char *__ut_name, - __const char *__ut_host) __THROW; +extern void logwtmp (const char *__ut_line, const char *__ut_name, + const char *__ut_host) __THROW; #endif /* Append entry UTMP to the wtmp-like file WTMP_FILE. */ -extern void updwtmp (__const char *__wtmp_file, __const struct utmp *__utmp) +extern void updwtmp (const char *__wtmp_file, const struct utmp *__utmp) __THROW; /* Change name of the utmp file to be examined. */ -extern int utmpname (__const char *__file) __THROW; +extern int utmpname (const char *__file) __THROW; /* Read next entry from a utmp-like file. */ extern struct utmp *getutent (void) __THROW; @@ -71,24 +71,24 @@ extern void endutent (void) __THROW; /* Search forward from the current point in the utmp file until the next entry with a ut_type matching ID->ut_type. */ -extern struct utmp *getutid (__const struct utmp *__id) __THROW; +extern struct utmp *getutid (const struct utmp *__id) __THROW; /* Search forward from the current point in the utmp file until the next entry with a ut_line matching LINE->ut_line. */ -extern struct utmp *getutline (__const struct utmp *__line) __THROW; +extern struct utmp *getutline (const struct utmp *__line) __THROW; /* Write out entry pointed to by UTMP_PTR into the utmp file. */ -extern struct utmp *pututline (__const struct utmp *__utmp_ptr) __THROW; +extern struct utmp *pututline (const struct utmp *__utmp_ptr) __THROW; #if 0 /* def __USE_MISC */ /* Reentrant versions of the file for handling utmp files. */ extern int getutent_r (struct utmp *__buffer, struct utmp **__result) __THROW; -extern int getutid_r (__const struct utmp *__id, struct utmp *__buffer, +extern int getutid_r (const struct utmp *__id, struct utmp *__buffer, struct utmp **__result) __THROW; -extern int getutline_r (__const struct utmp *__line, +extern int getutline_r (const struct utmp *__line, struct utmp *__buffer, struct utmp **__result) __THROW; #endif /* Use misc. */ diff --git a/include/utmpx.h b/include/utmpx.h index 8509a1404..f3481275d 100644 --- a/include/utmpx.h +++ b/include/utmpx.h @@ -68,19 +68,19 @@ extern struct utmpx *getutxent (void); This function is a possible cancellation point and therefore not marked with __THROW. */ -extern struct utmpx *getutxid (__const struct utmpx *__id); +extern struct utmpx *getutxid (const struct utmpx *__id); /* Get the user accounting database entry corresponding to LINE. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern struct utmpx *getutxline (__const struct utmpx *__line); +extern struct utmpx *getutxline (const struct utmpx *__line); /* Write the entry UTMPX into the user accounting database. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern struct utmpx *pututxline (__const struct utmpx *__utmpx); +extern struct utmpx *pututxline (const struct utmpx *__utmpx); #ifdef __USE_GNU @@ -90,7 +90,7 @@ extern struct utmpx *pututxline (__const struct utmpx *__utmpx); cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern int utmpxname (__const char *__file); +extern int utmpxname (const char *__file); /* Append entry UTMP to the wtmpx-like file WTMPX_FILE. @@ -98,8 +98,8 @@ extern int utmpxname (__const char *__file); cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern void updwtmpx (__const char *__wtmpx_file, - __const struct utmpx *__utmpx); +extern void updwtmpx (const char *__wtmpx_file, + const struct utmpx *__utmpx); /* Copy the information in UTMPX to UTMP. @@ -108,7 +108,7 @@ extern void updwtmpx (__const char *__wtmpx_file, cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern void getutmp (__const struct utmpx *__utmpx, +extern void getutmp (const struct utmpx *__utmpx, struct utmp *__utmp); /* Copy the information in UTMP to UTMPX. @@ -117,7 +117,7 @@ extern void getutmp (__const struct utmpx *__utmpx, cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern void getutmpx (__const struct utmp *__utmp, +extern void getutmpx (const struct utmp *__utmp, struct utmpx *__utmpx); #endif diff --git a/include/wchar.h b/include/wchar.h index f1c63e82c..4ddd258f0 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -142,36 +142,36 @@ __USING_NAMESPACE_STD(tm) __BEGIN_NAMESPACE_C99 /* Copy SRC to DEST. */ extern wchar_t *wcscpy (wchar_t *__restrict __dest, - __const wchar_t *__restrict __src) __THROW; + const wchar_t *__restrict __src) __THROW; /* Copy no more than N wide-characters of SRC to DEST. */ extern wchar_t *wcsncpy (wchar_t *__restrict __dest, - __const wchar_t *__restrict __src, size_t __n) + const wchar_t *__restrict __src, size_t __n) __THROW; /* Append SRC onto DEST. */ extern wchar_t *wcscat (wchar_t *__restrict __dest, - __const wchar_t *__restrict __src) __THROW; + const wchar_t *__restrict __src) __THROW; libc_hidden_proto(wcscat) /* Append no more than N wide-characters of SRC onto DEST. */ extern wchar_t *wcsncat (wchar_t *__restrict __dest, - __const wchar_t *__restrict __src, size_t __n) + const wchar_t *__restrict __src, size_t __n) __THROW; /* Compare S1 and S2. */ -extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2) +extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2) __THROW __attribute_pure__; libc_hidden_proto(wcscmp) /* Compare N wide-characters of S1 and S2. */ -extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) +extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) __THROW __attribute_pure__; __END_NAMESPACE_C99 #ifdef __USE_GNU /* Compare S1 and S2, ignoring case. */ -extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) __THROW; +extern int wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) __THROW; /* Compare no more than N chars of S1 and S2, ignoring case. */ -extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, +extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) __THROW; #ifdef __UCLIBC_HAS_XLOCALE__ @@ -179,11 +179,11 @@ extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, the provided locale and not the global locale. */ # include -extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, +extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2, __locale_t __loc) __THROW; libc_hidden_proto(wcscasecmp_l) -extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, +extern int wcsncasecmp_l (const wchar_t *__s1, const wchar_t *__s2, size_t __n, __locale_t __loc) __THROW; libc_hidden_proto(wcsncasecmp_l) #endif /* __UCLIBC_HAS_XLOCALE__ */ @@ -192,13 +192,13 @@ libc_hidden_proto(wcsncasecmp_l) __BEGIN_NAMESPACE_C99 /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE category of the current locale. */ -extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) __THROW; +extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) __THROW; libc_hidden_proto(wcscoll) /* Transform S2 into array pointed to by S1 such that if wcscmp is applied to two transformed strings the result is the as applying `wcscoll' to the original strings. */ extern size_t wcsxfrm (wchar_t *__restrict __s1, - __const wchar_t *__restrict __s2, size_t __n) __THROW; + const wchar_t *__restrict __s2, size_t __n) __THROW; __END_NAMESPACE_C99 #ifdef __USE_GNU @@ -208,65 +208,65 @@ __END_NAMESPACE_C99 /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE category of the given locale. */ -extern int wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2, +extern int wcscoll_l (const wchar_t *__s1, const wchar_t *__s2, __locale_t __loc) __THROW; libc_hidden_proto(wcscoll_l) /* Transform S2 into array pointed to by S1 such that if wcscmp is applied to two transformed strings the result is the as applying `wcscoll' to the original strings. */ -extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2, +extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2, size_t __n, __locale_t __loc) __THROW; libc_hidden_proto(wcsxfrm_l) #endif /* __UCLIBC_HAS_XLOCALE__ */ /* Duplicate S, returning an identical malloc'd string. */ -extern wchar_t *wcsdup (__const wchar_t *__s) __THROW __attribute_malloc__; +extern wchar_t *wcsdup (const wchar_t *__s) __THROW __attribute_malloc__; #endif __BEGIN_NAMESPACE_C99 /* Find the first occurrence of WC in WCS. */ -extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc) +extern wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc) __THROW __attribute_pure__; /* Find the last occurrence of WC in WCS. */ -extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc) +extern wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc) __THROW __attribute_pure__; __END_NAMESPACE_C99 #ifdef __USE_GNU /* This function is similar to `wcschr'. But it returns a pointer to the closing NUL wide character in case C is not found in S. */ -extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc) +extern wchar_t *wcschrnul (const wchar_t *__s, wchar_t __wc) __THROW __attribute_pure__; #endif __BEGIN_NAMESPACE_C99 /* Return the length of the initial segmet of WCS which consists entirely of wide characters not in REJECT. */ -extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject) +extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject) __THROW __attribute_pure__; /* Return the length of the initial segmet of WCS which consists entirely of wide characters in ACCEPT. */ -extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept) +extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept) __THROW __attribute_pure__; libc_hidden_proto(wcsspn) /* Find the first occurrence in WCS of any character in ACCEPT. */ -extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept) +extern wchar_t *wcspbrk (const wchar_t *__wcs, const wchar_t *__accept) __THROW __attribute_pure__; libc_hidden_proto(wcspbrk) /* Find the first occurrence of NEEDLE in HAYSTACK. */ /* SuSv uses restrict keyword, glibc does not */ -extern wchar_t *wcsstr (__const wchar_t *__restrict __haystack, __const wchar_t *__restrict __needle) +extern wchar_t *wcsstr (const wchar_t *__restrict __haystack, const wchar_t *__restrict __needle) __THROW __attribute_pure__; /* Divide WCS into tokens separated by characters in DELIM. */ extern wchar_t *wcstok (wchar_t *__restrict __s, - __const wchar_t *__restrict __delim, + const wchar_t *__restrict __delim, wchar_t **__restrict __ptr) __THROW; /* Return the number of wide characters in S. */ -extern size_t wcslen (__const wchar_t *__s) __THROW __attribute_pure__; +extern size_t wcslen (const wchar_t *__s) __THROW __attribute_pure__; libc_hidden_proto(wcslen) __END_NAMESPACE_C99 @@ -274,13 +274,13 @@ __END_NAMESPACE_C99 /* Another name for `wcsstr' from XPG4. */ /* SuSv3 did not use restrict keyword, probably because it was marked LEGACY we do to be in sync with wcsstr */ -extern wchar_t *wcswcs (__const wchar_t *__restrict __haystack, __const wchar_t *__restrict __needle) +extern wchar_t *wcswcs (const wchar_t *__restrict __haystack, const wchar_t *__restrict __needle) __THROW __attribute_pure__; #endif #ifdef __USE_GNU /* Return the number of wide characters in S, but at most MAXLEN. */ -extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen) +extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen) __THROW __attribute_pure__; libc_hidden_proto(wcsnlen) #endif @@ -288,24 +288,24 @@ libc_hidden_proto(wcsnlen) __BEGIN_NAMESPACE_C99 /* Search N wide characters of S for C. */ -extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n) +extern wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, size_t __n) __THROW __attribute_pure__; libc_hidden_proto(wmemchr) /* Compare N wide characters of S1 and S2. */ /* SuSv4 does not use restrict keyword for S1 and S2, glibc does */ -extern int wmemcmp (__const wchar_t *__s1, - __const wchar_t *__s2, size_t __n) +extern int wmemcmp (const wchar_t *__s1, + const wchar_t *__s2, size_t __n) __THROW __attribute_pure__; /* Copy N wide characters of SRC to DEST. */ extern wchar_t *wmemcpy (wchar_t *__restrict __s1, - __const wchar_t *__restrict __s2, size_t __n) __THROW; + const wchar_t *__restrict __s2, size_t __n) __THROW; libc_hidden_proto(wmemcpy) /* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for overlapping strings. */ -extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) +extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) __THROW; /* Set N wide characters of S to C. */ @@ -316,7 +316,7 @@ __END_NAMESPACE_C99 /* Copy N wide characters of SRC to DEST and return pointer to following wide character. */ extern wchar_t *wmempcpy (wchar_t *__restrict __s1, - __const wchar_t *__restrict __s2, size_t __n) + const wchar_t *__restrict __s2, size_t __n) __THROW; libc_hidden_proto(wmempcpy) #endif @@ -334,13 +334,13 @@ extern int wctob (wint_t __c) __THROW; /* Determine whether PS points to an object representing the initial state. */ -extern int mbsinit (__const mbstate_t *__ps) __THROW __attribute_pure__; +extern int mbsinit (const mbstate_t *__ps) __THROW __attribute_pure__; libc_hidden_proto(mbsinit) /* Write wide character representation of multibyte character pointed to by S to PWC. */ extern size_t mbrtowc (wchar_t *__restrict __pwc, - __const char *__restrict __s, size_t __n, + const char *__restrict __s, size_t __n, mbstate_t *__p) __THROW; libc_hidden_proto(mbrtowc) @@ -351,24 +351,24 @@ libc_hidden_proto(wcrtomb) /* Return number of bytes in multibyte character pointed to by S. */ #if 0 /* uClibc: disabled */ -extern size_t __mbrlen (__const char *__restrict __s, size_t __n, +extern size_t __mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) __THROW; #endif -extern size_t mbrlen (__const char *__restrict __s, size_t __n, +extern size_t mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) __THROW; libc_hidden_proto(mbrlen) /* Write wide character representation of multibyte character string SRC to DST. */ extern size_t mbsrtowcs (wchar_t *__restrict __dst, - __const char **__restrict __src, size_t __len, + const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) __THROW; libc_hidden_proto(mbsrtowcs) /* Write multibyte character representation of wide character string SRC to DST. */ extern size_t wcsrtombs (char *__restrict __dst, - __const wchar_t **__restrict __src, size_t __len, + const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) __THROW; libc_hidden_proto(wcsrtombs) __END_NAMESPACE_C99 @@ -378,14 +378,14 @@ __END_NAMESPACE_C99 /* Write wide character representation of at most NMC bytes of the multibyte character string SRC to DST. */ extern size_t mbsnrtowcs (wchar_t *__restrict __dst, - __const char **__restrict __src, size_t __nmc, + const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) __THROW; libc_hidden_proto(mbsnrtowcs) /* Write multibyte character representation of at most NWC characters from the wide character string SRC to DST. */ extern size_t wcsnrtombs (char *__restrict __dst, - __const wchar_t **__restrict __src, + const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) __THROW; libc_hidden_proto(wcsnrtombs) @@ -399,7 +399,7 @@ extern int wcwidth (wchar_t __c) __THROW; /* Determine number of column positions required for first N wide characters (or fewer if S ends before this) in S. */ -extern int wcswidth (__const wchar_t *__s, size_t __n) __THROW; +extern int wcswidth (const wchar_t *__s, size_t __n) __THROW; libc_hidden_proto(wcswidth) #endif /* Use X/Open. */ @@ -408,14 +408,14 @@ __BEGIN_NAMESPACE_C99 #ifdef __UCLIBC_HAS_FLOATS__ /* Convert initial portion of the wide string NPTR to `double' representation. */ -extern double wcstod (__const wchar_t *__restrict __nptr, +extern double wcstod (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #ifdef __USE_ISOC99 /* Likewise for `float' and `long double' sizes of floating-point numbers. */ -extern float wcstof (__const wchar_t *__restrict __nptr, +extern float wcstof (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; -extern long double wcstold (__const wchar_t *__restrict __nptr, +extern long double wcstold (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif /* C99 */ #endif /* __UCLIBC_HAS_FLOATS__ */ @@ -423,12 +423,12 @@ extern long double wcstold (__const wchar_t *__restrict __nptr, /* Convert initial portion of wide string NPTR to `long int' representation. */ -extern long int wcstol (__const wchar_t *__restrict __nptr, +extern long int wcstol (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; /* Convert initial portion of wide string NPTR to `unsigned long int' representation. */ -extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr, +extern unsigned long int wcstoul (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; @@ -436,14 +436,14 @@ extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr, /* Convert initial portion of wide string NPTR to `long long int' representation. */ __extension__ -extern long long int wcstoll (__const wchar_t *__restrict __nptr, +extern long long int wcstoll (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; /* Convert initial portion of wide string NPTR to `unsigned long long int' representation. */ __extension__ -extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr, +extern unsigned long long int wcstoull (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; #endif /* ISO C99 or GCC and GNU. */ @@ -453,14 +453,14 @@ __END_NAMESPACE_C99 /* Convert initial portion of wide string NPTR to `long long int' representation. */ __extension__ -extern long long int wcstoq (__const wchar_t *__restrict __nptr, +extern long long int wcstoq (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; /* Convert initial portion of wide string NPTR to `unsigned long long int' representation. */ __extension__ -extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr, +extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; #endif /* GCC and use GNU. */ @@ -484,35 +484,35 @@ extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr, /* Special versions of the functions above which take the locale to use as an additional parameter. */ -extern long int wcstol_l (__const wchar_t *__restrict __nptr, +extern long int wcstol_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) __THROW; -extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr, +extern unsigned long int wcstoul_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) __THROW; __extension__ -extern long long int wcstoll_l (__const wchar_t *__restrict __nptr, +extern long long int wcstoll_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) __THROW; __extension__ -extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr, +extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) __THROW; #ifdef __UCLIBC_HAS_FLOATS__ -extern double wcstod_l (__const wchar_t *__restrict __nptr, +extern double wcstod_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) __THROW; -extern float wcstof_l (__const wchar_t *__restrict __nptr, +extern float wcstof_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) __THROW; -extern long double wcstold_l (__const wchar_t *__restrict __nptr, +extern long double wcstold_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) __THROW; #endif /* __UCLIBC_HAS_FLOATS__ */ @@ -523,11 +523,11 @@ extern long double wcstold_l (__const wchar_t *__restrict __nptr, #ifdef __USE_GNU /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ -extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) __THROW; +extern wchar_t *wcpcpy (wchar_t *__dest, const wchar_t *__src) __THROW; /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ -extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n) +extern wchar_t *wcpncpy (wchar_t *__dest, const wchar_t *__src, size_t __n) __THROW; #endif /* use GNU */ @@ -545,17 +545,17 @@ extern int fwide (__FILE *__fp, int __mode) __THROW; This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fwprintf (__FILE *__restrict __stream, - __const wchar_t *__restrict __format, ...) + const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */; /* Write formatted output to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int wprintf (__const wchar_t *__restrict __format, ...) +extern int wprintf (const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wprintf__, 1, 2))) */; /* Write formatted output of at most N characters to S. */ extern int swprintf (wchar_t *__restrict __s, size_t __n, - __const wchar_t *__restrict __format, ...) + const wchar_t *__restrict __format, ...) __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */; /* Write formatted output to S from argument list ARG. @@ -563,7 +563,7 @@ extern int swprintf (wchar_t *__restrict __s, size_t __n, This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfwprintf (__FILE *__restrict __s, - __const wchar_t *__restrict __format, + const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */; libc_hidden_proto(vfwprintf) @@ -571,13 +571,13 @@ libc_hidden_proto(vfwprintf) This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int vwprintf (__const wchar_t *__restrict __format, +extern int vwprintf (const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wprintf__, 1, 0))) */; /* Write formatted output of at most N character to S from argument list ARG. */ extern int vswprintf (wchar_t *__restrict __s, size_t __n, - __const wchar_t *__restrict __format, + const wchar_t *__restrict __format, __gnuc_va_list __arg) __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */; libc_hidden_proto(vswprintf) @@ -588,17 +588,17 @@ libc_hidden_proto(vswprintf) This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fwscanf (__FILE *__restrict __stream, - __const wchar_t *__restrict __format, ...) + const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; /* Read formatted input from stdin. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int wscanf (__const wchar_t *__restrict __format, ...) +extern int wscanf (const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */; /* Read formatted input from S. */ -extern int swscanf (__const wchar_t *__restrict __s, - __const wchar_t *__restrict __format, ...) +extern int swscanf (const wchar_t *__restrict __s, + const wchar_t *__restrict __format, ...) __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; __END_NAMESPACE_C99 @@ -612,7 +612,7 @@ __BEGIN_NAMESPACE_C99 This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfwscanf (__FILE *__restrict __s, - __const wchar_t *__restrict __format, + const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; libc_hidden_proto(vfwscanf) @@ -620,12 +620,12 @@ libc_hidden_proto(vfwscanf) This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int vwscanf (__const wchar_t *__restrict __format, +extern int vwscanf (const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */; /* Read formatted input from S into argument list ARG. */ -extern int vswscanf (__const wchar_t *__restrict __s, - __const wchar_t *__restrict __format, +extern int vswscanf (const wchar_t *__restrict __s, + const wchar_t *__restrict __format, __gnuc_va_list __arg) __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; libc_hidden_proto(vswscanf) @@ -677,7 +677,7 @@ extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, This function is a possible cancellation points and therefore not marked with __THROW. */ -extern int fputws (__const wchar_t *__restrict __ws, +extern int fputws (const wchar_t *__restrict __ws, __FILE *__restrict __stream); libc_hidden_proto(fputws) @@ -747,7 +747,7 @@ libc_hidden_proto(fgetws_unlocked) cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern int fputws_unlocked (__const wchar_t *__restrict __ws, +extern int fputws_unlocked (const wchar_t *__restrict __ws, __FILE *__restrict __stream); libc_hidden_proto(fputws_unlocked) #endif @@ -758,8 +758,8 @@ __BEGIN_NAMESPACE_C99 Write no more than MAXSIZE wide characters and return the number of wide characters written, or 0 if it would exceed MAXSIZE. */ extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, - __const wchar_t *__restrict __format, - __const struct tm *__restrict __tp) __THROW; + const wchar_t *__restrict __format, + const struct tm *__restrict __tp) __THROW; __END_NAMESPACE_C99 # if defined __USE_GNU && defined __UCLIBC_HAS_XLOCALE__ @@ -768,8 +768,8 @@ __END_NAMESPACE_C99 /* Similar to `wcsftime' but takes the information from the provided locale and not the global locale. */ extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, - __const wchar_t *__restrict __format, - __const struct tm *__restrict __tp, + const wchar_t *__restrict __format, + const struct tm *__restrict __tp, __locale_t __loc) __THROW; libc_hidden_proto(wcsftime_l) # endif diff --git a/include/wctype.h b/include/wctype.h index a172c7024..aa133bd60 100644 --- a/include/wctype.h +++ b/include/wctype.h @@ -182,7 +182,7 @@ extern int iswblank (wint_t __wc) __THROW; /* Construct value that describes a class of wide characters identified by the string argument PROPERTY. */ -extern wctype_t wctype (__const char *__property) __THROW; +extern wctype_t wctype (const char *__property) __THROW; libc_hidden_proto(wctype) /* Determine whether the wide-character WC has the property described by @@ -199,7 +199,7 @@ __END_NAMESPACE_C99 __BEGIN_NAMESPACE_C99 /* Scalar type that can hold values which represent locale-specific character mappings. */ -/* uClibc note: glibc uses - typedef __const __int32_t *wctrans_t; */ +/* uClibc note: glibc uses - typedef const __int32_t *wctrans_t; */ typedef unsigned int wctrans_t; __END_NAMESPACE_C99 #ifdef __USE_GNU @@ -234,7 +234,7 @@ __BEGIN_DECLS __BEGIN_NAMESPACE_C99 /* Construct value that describes a mapping between wide characters identified by the string argument PROPERTY. */ -extern wctrans_t wctrans (__const char *__property) __THROW; +extern wctrans_t wctrans (const char *__property) __THROW; libc_hidden_proto(wctrans) /* Map the wide character WC using the mapping described by DESC. */ @@ -303,7 +303,7 @@ extern int iswblank_l (wint_t __wc, __locale_t __locale) __THROW; /* Construct value that describes a class of wide characters identified by the string argument PROPERTY. */ -extern wctype_t wctype_l (__const char *__property, __locale_t __locale) +extern wctype_t wctype_l (const char *__property, __locale_t __locale) __THROW; /* Determine whether the wide-character WC has the property described by @@ -327,7 +327,7 @@ libc_hidden_proto(towupper_l) /* Construct value that describes a mapping between wide characters identified by the string argument PROPERTY. */ -extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale) +extern wctrans_t wctrans_l (const char *__property, __locale_t __locale) __THROW; /* Map the wide character WC using the mapping described by DESC. */ diff --git a/include/wordexp.h b/include/wordexp.h index 487d47016..f270fd757 100644 --- a/include/wordexp.h +++ b/include/wordexp.h @@ -59,7 +59,7 @@ enum }; /* Do word expansion of WORDS into PWORDEXP. */ -extern int wordexp (__const char *__restrict __words, +extern int wordexp (const char *__restrict __words, wordexp_t *__restrict __pwordexp, int __flags); /* Free the storage allocated by a `wordexp' call. */ diff --git a/ldso/include/dlfcn.h b/ldso/include/dlfcn.h index 03afd34fb..5cdd6be53 100644 --- a/ldso/include/dlfcn.h +++ b/ldso/include/dlfcn.h @@ -19,9 +19,9 @@ `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; diff --git a/libc/misc/search/_tsearch.c b/libc/misc/search/_tsearch.c index c4ee4bb23..fe9eedfa9 100644 --- a/libc/misc/search/_tsearch.c +++ b/libc/misc/search/_tsearch.c @@ -49,7 +49,7 @@ register node **rootp; address of tree root int (*compar)(); ordering function */ -void *tsearch(__const void *key, void **vrootp, __compar_fn_t compar) +void *tsearch(const void *key, void **vrootp, __compar_fn_t compar) { register node *q; register node **rootp = (node **) vrootp; @@ -79,7 +79,7 @@ libc_hidden_def(tsearch) #endif #ifdef L_tfind -void *tfind(__const void *key, void * __const *vrootp, __compar_fn_t compar) +void *tfind(const void *key, void * const *vrootp, __compar_fn_t compar) { register node **rootp = (node **) vrootp; @@ -106,7 +106,7 @@ char *key; key to be deleted register node **rootp; address of the root of tree int (*compar)(); comparison function */ -void *tdelete(__const void *key, void ** vrootp, __compar_fn_t compar) +void *tdelete(const void *key, void ** vrootp, __compar_fn_t compar) { node *p; register node *q; @@ -156,7 +156,7 @@ register node *root; Root of the tree to be walked register void (*action)(); Function to be called at each node register int level; */ -static void trecurse(__const void *vroot, __action_fn_t action, int level) +static void trecurse(const void *vroot, __action_fn_t action, int level) { register node *root = (node *) vroot; @@ -179,9 +179,9 @@ node *root; Root of the tree to be walked void (*action)(); Function to be called at each node PTR */ -void twalk(__const void *vroot, __action_fn_t action) +void twalk(const void *vroot, __action_fn_t action) { - register __const node *root = (node *) vroot; + register const node *root = (node *) vroot; if (root != (node *)0 && action != (__action_fn_t) 0) trecurse(root, action, 0); diff --git a/libc/stdio/_scanf.c b/libc/stdio/_scanf.c index 310894e5e..9659423e7 100644 --- a/libc/stdio/_scanf.c +++ b/libc/stdio/_scanf.c @@ -198,7 +198,7 @@ int vscanf(const char * __restrict format, va_list arg) #ifdef __STDIO_BUFFERS -int vsscanf(__const char *sp, __const char *fmt, va_list ap) +int vsscanf(const char *sp, const char *fmt, va_list ap) { FILE f; @@ -242,7 +242,7 @@ libc_hidden_def(vsscanf) #elif !defined(__UCLIBC_HAS_WCHAR__) -int vsscanf(__const char *sp, __const char *fmt, va_list ap) +int vsscanf(const char *sp, const char *fmt, va_list ap) { __FILE_vsscanf f; @@ -281,7 +281,7 @@ libc_hidden_def(vsscanf) #elif defined(__UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__) -int vsscanf(__const char *sp, __const char *fmt, va_list ap) +int vsscanf(const char *sp, const char *fmt, va_list ap) { FILE *f; int rv = EOF; diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c index cab4f82cc..6c887eabc 100644 --- a/libc/stdlib/stdlib.c +++ b/libc/stdlib/stdlib.c @@ -251,7 +251,7 @@ long long atoll(const char *nptr) #endif /**********************************************************************/ #ifdef L_rpmatch -int rpmatch (__const char *__response) +int rpmatch (const char *__response) { return (__response[0] == 'y' || __response[0] == 'Y') ? 1 : (__response[0] == 'n' || __response[0] == 'N') ? 0 : -1; diff --git a/libc/sysdeps/linux/alpha/bits/fenv.h b/libc/sysdeps/linux/alpha/bits/fenv.h index b0b7c967d..d36b94dd1 100644 --- a/libc/sysdeps/linux/alpha/bits/fenv.h +++ b/libc/sysdeps/linux/alpha/bits/fenv.h @@ -106,15 +106,15 @@ typedef unsigned long int fenv_t; /* If the default argument is used we use this value. Note that due to architecture-specified page mappings, no user-space pointer will ever have its two high bits set. Co-opt one. */ -#define FE_DFL_ENV ((__const fenv_t *) 0x8800000000000000UL) +#define FE_DFL_ENV ((const fenv_t *) 0x8800000000000000UL) #ifdef __USE_GNU /* Floating-point environment where none of the exceptions are masked. */ -# define FE_NOMASK_ENV ((__const fenv_t *) 0x880000000000003eUL) +# define FE_NOMASK_ENV ((const fenv_t *) 0x880000000000003eUL) /* Floating-point environment with (processor-dependent) non-IEEE floating point. In this case, mapping denormals to zero. */ -# define FE_NONIEEE_ENV ((__const fenv_t *) 0x8800000000003000UL) +# define FE_NONIEEE_ENV ((const fenv_t *) 0x8800000000003000UL) #endif /* The system calls to talk to the kernel's FP code. */ diff --git a/libc/sysdeps/linux/alpha/sys/acct.h b/libc/sysdeps/linux/alpha/sys/acct.h index 7c1679be9..9b5201cb3 100644 --- a/libc/sysdeps/linux/alpha/sys/acct.h +++ b/libc/sysdeps/linux/alpha/sys/acct.h @@ -58,7 +58,7 @@ enum /* Switch process accounting on and off. */ -extern int acct (__const char *__filename) __THROW; +extern int acct (const char *__filename) __THROW; __END_DECLS diff --git a/libc/sysdeps/linux/bfin/sys/cachectl.h b/libc/sysdeps/linux/bfin/sys/cachectl.h index ee4c03155..f241e657d 100644 --- a/libc/sysdeps/linux/bfin/sys/cachectl.h +++ b/libc/sysdeps/linux/bfin/sys/cachectl.h @@ -18,7 +18,7 @@ __BEGIN_DECLS -extern int cacheflush (void *addr, __const int nbytes, __const int flags); +extern int cacheflush (void *addr, const int nbytes, const int flags); __END_DECLS diff --git a/libc/sysdeps/linux/common/bits/fenv.h b/libc/sysdeps/linux/common/bits/fenv.h index 1b51b68ca..0248ae110 100644 --- a/libc/sysdeps/linux/common/bits/fenv.h +++ b/libc/sysdeps/linux/common/bits/fenv.h @@ -52,4 +52,4 @@ typedef struct fenv_t; /* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((__const fenv_t *) -1l) +#define FE_DFL_ENV ((const fenv_t *) -1l) diff --git a/libc/sysdeps/linux/common/bits/mathcalls.h b/libc/sysdeps/linux/common/bits/mathcalls.h index 825e4234d..84b793c96 100644 --- a/libc/sysdeps/linux/common/bits/mathcalls.h +++ b/libc/sysdeps/linux/common/bits/mathcalls.h @@ -235,7 +235,7 @@ __END_NAMESPACE_C99 #ifdef __USE_ISOC99 __BEGIN_NAMESPACE_C99 /* Return representation of NaN for double type. */ -__MATHCALLX (nan,, (__const char *__tagb), (__const__)) +__MATHCALLX (nan,, (const char *__tagb), (__const__)) __END_NAMESPACE_C99 #endif diff --git a/libc/sysdeps/linux/common/bits/sigset.h b/libc/sysdeps/linux/common/bits/sigset.h index e497c26cd..beb859820 100644 --- a/libc/sysdeps/linux/common/bits/sigset.h +++ b/libc/sysdeps/linux/common/bits/sigset.h @@ -152,7 +152,7 @@ typedef struct { checking is done in the non __ versions. */ # if !defined __USE_EXTERN_INLINES || defined __PROVIDE_OUT_OF_LINE_SIGSETFN -extern int __sigismember (__const __sigset_t *, int); +extern int __sigismember (const __sigset_t *, int); libc_hidden_proto(__sigismember) extern int __sigaddset (__sigset_t *, int); libc_hidden_proto(__sigaddset) @@ -178,7 +178,7 @@ NAME (CONST __sigset_t *__set, int __sig) \ return BODY; \ } -__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, __const) +__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, const) __SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), ) __SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), ) diff --git a/libc/sysdeps/linux/common/bits/sigthread.h b/libc/sysdeps/linux/common/bits/sigthread.h index d739a55de..643618aa4 100644 --- a/libc/sysdeps/linux/common/bits/sigthread.h +++ b/libc/sysdeps/linux/common/bits/sigthread.h @@ -28,7 +28,7 @@ /* Modify the signal mask for the calling thread. The arguments have the same meaning as for sigprocmask(2). */ extern int pthread_sigmask (int __how, - __const __sigset_t *__restrict __newmask, + const __sigset_t *__restrict __newmask, __sigset_t *__restrict __oldmask)__THROW; /* Send signal SIGNO to the given thread. */ diff --git a/libc/sysdeps/linux/common/bits/uClibc_pthread.h b/libc/sysdeps/linux/common/bits/uClibc_pthread.h index 79106bf6a..708d0fed2 100644 --- a/libc/sysdeps/linux/common/bits/uClibc_pthread.h +++ b/libc/sysdeps/linux/common/bits/uClibc_pthread.h @@ -31,7 +31,7 @@ struct _pthread_cleanup_buffer; /* Threading functions internal to uClibc. Make these thread functions * weak so that we can elide them from single-threaded processes. */ extern int weak_function __pthread_mutex_init (pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutex_attr); + const pthread_mutexattr_t *__mutex_attr); extern int weak_function __pthread_mutex_lock (pthread_mutex_t *__mutex); extern int weak_function __pthread_mutex_unlock (pthread_mutex_t *__mutex); extern int weak_function __pthread_mutex_trylock (pthread_mutex_t *__mutex); diff --git a/libc/sysdeps/linux/common/bits/uClibc_stdio.h b/libc/sysdeps/linux/common/bits/uClibc_stdio.h index 7d1df6ce9..5b3a1b310 100644 --- a/libc/sysdeps/linux/common/bits/uClibc_stdio.h +++ b/libc/sysdeps/linux/common/bits/uClibc_stdio.h @@ -175,7 +175,7 @@ typedef __off_t __offmax_t; /* TODO -- rename this? */ typedef __ssize_t __io_read_fn(void *__cookie, char *__buf, size_t __bufsize); typedef __ssize_t __io_write_fn(void *__cookie, - __const char *__buf, size_t __bufsize); + const char *__buf, size_t __bufsize); /* NOTE: GLIBC difference!!! -- fopencookie seek function * For glibc, the type of pos is always (__off64_t *) but in our case * it is type (__off_t *) when the lib is built without large file support. diff --git a/libc/sysdeps/linux/common/epoll.c b/libc/sysdeps/linux/common/epoll.c index a7781a12b..29b4600d1 100644 --- a/libc/sysdeps/linux/common/epoll.c +++ b/libc/sysdeps/linux/common/epoll.c @@ -37,14 +37,14 @@ CANCELLABLE_SYSCALL(int, epoll_wait, (int epfd, struct epoll_event *events, int # define __NR___syscall_epoll_pwait __NR_epoll_pwait static __always_inline _syscall6(int, __syscall_epoll_pwait, int, epfd, struct epoll_event *, events, - int, maxevents, int, timeout, __const sigset_t *, sigmask, size_t, sigsetsize) + int, maxevents, int, timeout, const sigset_t *, sigmask, size_t, sigsetsize) static int __NC(epoll_pwait)(int epfd, struct epoll_event *events, int maxevents, int timeout, - __const sigset_t *set) + const sigset_t *set) { return __syscall_epoll_pwait(epfd, events, maxevents, timeout, set, __SYSCALL_SIGSET_T_SIZE); } CANCELLABLE_SYSCALL(int, epoll_pwait, (int epfd, struct epoll_event *events, int maxevents, int timeout, - __const sigset_t *set), + const sigset_t *set), (epfd, events, maxevents, timeout, set)) #endif diff --git a/libc/sysdeps/linux/common/futimens.c b/libc/sysdeps/linux/common/futimens.c index 0eaf26a4c..b825cf7ac 100644 --- a/libc/sysdeps/linux/common/futimens.c +++ b/libc/sysdeps/linux/common/futimens.c @@ -16,13 +16,13 @@ * Note that due to not including the header, we have to alias the call * manually. */ -extern int utimensat (int __fd, __const char *__path, - __const struct timespec __times[2], +extern int utimensat (int __fd, const char *__path, + const struct timespec __times[2], int __flags) __THROW; libc_hidden_proto(utimensat) -int futimens (int __fd, __const struct timespec __times[2]) __THROW; -int futimens (int fd, __const struct timespec ts[2]) +int futimens (int __fd, const struct timespec __times[2]) __THROW; +int futimens (int fd, const struct timespec ts[2]) { return utimensat(fd, 0, ts, 0); } diff --git a/libc/sysdeps/linux/common/sys/acct.h b/libc/sysdeps/linux/common/sys/acct.h index a487ef0bd..a816786fc 100644 --- a/libc/sysdeps/linux/common/sys/acct.h +++ b/libc/sysdeps/linux/common/sys/acct.h @@ -102,7 +102,7 @@ enum /* Switch process accounting on and off. */ -extern int acct (__const char *__filename) __THROW; +extern int acct (const char *__filename) __THROW; __END_DECLS diff --git a/libc/sysdeps/linux/i386/bits/fenv.h b/libc/sysdeps/linux/i386/bits/fenv.h index 45724b4cc..9bd976fc1 100644 --- a/libc/sysdeps/linux/i386/bits/fenv.h +++ b/libc/sysdeps/linux/i386/bits/fenv.h @@ -81,9 +81,9 @@ typedef struct fenv_t; /* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((__const fenv_t *) -1) +#define FE_DFL_ENV ((const fenv_t *) -1) #ifdef __USE_GNU /* Floating-point environment where none of the exception is masked. */ -# define FE_NOMASK_ENV ((__const fenv_t *) -2) +# define FE_NOMASK_ENV ((const fenv_t *) -2) #endif diff --git a/libc/sysdeps/linux/ia64/bits/fenv.h b/libc/sysdeps/linux/ia64/bits/fenv.h index 0422a95d7..3b4afde3a 100644 --- a/libc/sysdeps/linux/ia64/bits/fenv.h +++ b/libc/sysdeps/linux/ia64/bits/fenv.h @@ -72,15 +72,15 @@ typedef unsigned long int fexcept_t; typedef unsigned long int fenv_t; /* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((__const fenv_t *) 0xc009804c0270033fUL) +#define FE_DFL_ENV ((const fenv_t *) 0xc009804c0270033fUL) #ifdef __USE_GNU /* Floating-point environment where only FE_UNNORMAL is masked since this exception is not generally supported by glibc. */ -# define FE_NOMASK_ENV ((__const fenv_t *) 0xc009804c02700302UL) +# define FE_NOMASK_ENV ((const fenv_t *) 0xc009804c02700302UL) /* Floating-point environment with (processor-dependent) non-IEEE floating point. In this case, turning on flush-to-zero mode for s0, s2, and s3. */ -# define FE_NONIEEE_ENV ((__const fenv_t *) 0xc009a04d0270037fUL) +# define FE_NONIEEE_ENV ((const fenv_t *) 0xc009a04d0270037fUL) #endif diff --git a/libc/sysdeps/linux/m68k/bits/fenv.h b/libc/sysdeps/linux/m68k/bits/fenv.h index e747f3b7c..b07f0ab51 100644 --- a/libc/sysdeps/linux/m68k/bits/fenv.h +++ b/libc/sysdeps/linux/m68k/bits/fenv.h @@ -70,9 +70,9 @@ typedef struct fenv_t; /* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((__const fenv_t *) -1) +#define FE_DFL_ENV ((const fenv_t *) -1) #ifdef __USE_GNU /* Floating-point environment where none of the exceptions are masked. */ -# define FE_NOMASK_ENV ((__const fenv_t *) -2) +# define FE_NOMASK_ENV ((const fenv_t *) -2) #endif diff --git a/libc/sysdeps/linux/mips/bits/fenv.h b/libc/sysdeps/linux/mips/bits/fenv.h index afd8f7b1b..944101f75 100644 --- a/libc/sysdeps/linux/mips/bits/fenv.h +++ b/libc/sysdeps/linux/mips/bits/fenv.h @@ -68,9 +68,9 @@ typedef struct fenv_t; /* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((__const fenv_t *) -1) +#define FE_DFL_ENV ((const fenv_t *) -1) #ifdef __USE_GNU /* Floating-point environment where none of the exception is masked. */ -# define FE_NOMASK_ENV ((__const fenv_t *) -2) +# define FE_NOMASK_ENV ((const fenv_t *) -2) #endif diff --git a/libc/sysdeps/linux/mips/sys/cachectl.h b/libc/sysdeps/linux/mips/sys/cachectl.h index 5783cc9f9..034999e73 100644 --- a/libc/sysdeps/linux/mips/sys/cachectl.h +++ b/libc/sysdeps/linux/mips/sys/cachectl.h @@ -28,15 +28,15 @@ __BEGIN_DECLS #ifdef __USE_MISC -extern int cachectl (void *addr, __const int nbytes, __const int op) __THROW; +extern int cachectl (void *addr, const int nbytes, const int op) __THROW; #endif #if 0 -extern int __cachectl (void *addr, __const int nbytes, __const int op) __THROW; +extern int __cachectl (void *addr, const int nbytes, const int op) __THROW; #endif #ifdef __USE_MISC -extern int cacheflush (void *addr, __const int nbytes, __const int op) __THROW; +extern int cacheflush (void *addr, const int nbytes, const int op) __THROW; #endif -extern int _flush_cache (char *addr, __const int nbytes, __const int op) __THROW; +extern int _flush_cache (char *addr, const int nbytes, const int op) __THROW; __END_DECLS diff --git a/libc/sysdeps/linux/mips/sys/sysmips.h b/libc/sysdeps/linux/mips/sys/sysmips.h index 0a3be1b93..d568aa1fd 100644 --- a/libc/sysdeps/linux/mips/sys/sysmips.h +++ b/libc/sysdeps/linux/mips/sys/sysmips.h @@ -35,8 +35,8 @@ __BEGIN_DECLS -extern int sysmips (__const int cmd, __const long arg1, - __const int arg2, __const int arg3) __THROW; +extern int sysmips (const int cmd, const long arg1, + const int arg2, const int arg3) __THROW; __END_DECLS diff --git a/libc/sysdeps/linux/powerpc/fenv.h b/libc/sysdeps/linux/powerpc/fenv.h index 77fc060a0..9ba384756 100644 --- a/libc/sysdeps/linux/powerpc/fenv.h +++ b/libc/sysdeps/linux/powerpc/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 fesetenv (const fenv_t *__envp) __THROW; /* Save current exceptions in temporary storage, install environment represented by object pointed to by ENVP and raise exceptions according to saved exceptions. */ -extern int feupdateenv (__const fenv_t *__envp) __THROW; +extern int feupdateenv (const fenv_t *__envp) __THROW; /* Include optimization. */ diff --git a/libc/sysdeps/linux/sparc/bits/fenv.h b/libc/sysdeps/linux/sparc/bits/fenv.h index 26fb1a724..61d45591c 100644 --- a/libc/sysdeps/linux/sparc/bits/fenv.h +++ b/libc/sysdeps/linux/sparc/bits/fenv.h @@ -67,11 +67,11 @@ typedef unsigned long int fexcept_t; typedef unsigned long int fenv_t; /* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((__const fenv_t *) -1) +#define FE_DFL_ENV ((const fenv_t *) -1) #ifdef __USE_GNU /* Floating-point environment where none of the exception is masked. */ -# define FE_NOMASK_ENV ((__const fenv_t *) -2) +# define FE_NOMASK_ENV ((const fenv_t *) -2) #endif /* For internal use only: access the fp state register. */ diff --git a/libc/sysdeps/linux/x86_64/bits/fenv.h b/libc/sysdeps/linux/x86_64/bits/fenv.h index 72aaef98c..8c720e675 100644 --- a/libc/sysdeps/linux/x86_64/bits/fenv.h +++ b/libc/sysdeps/linux/x86_64/bits/fenv.h @@ -88,9 +88,9 @@ typedef struct fenv_t; /* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((__const fenv_t *) -1) +#define FE_DFL_ENV ((const fenv_t *) -1) #ifdef __USE_GNU /* Floating-point environment where none of the exception is masked. */ -# define FE_NOMASK_ENV ((__const fenv_t *) -2) +# define FE_NOMASK_ENV ((const fenv_t *) -2) #endif diff --git a/libc/unistd/exec.c b/libc/unistd/exec.c index 6066db98e..ba92989a8 100644 --- a/libc/unistd/exec.c +++ b/libc/unistd/exec.c @@ -135,7 +135,7 @@ libc_hidden_def(execl) /**********************************************************************/ #ifdef L_execv -int execv(__const char *path, char *__const argv[]) +int execv(const char *path, char *const argv[]) { return execve(path, argv, __environ); } diff --git a/libpthread/linuxthreads.old/internals.h b/libpthread/linuxthreads.old/internals.h index 98f1a0352..ea274d824 100644 --- a/libpthread/linuxthreads.old/internals.h +++ b/libpthread/linuxthreads.old/internals.h @@ -473,15 +473,15 @@ extern void __pthread_exit (void *retval) extern int __pthread_attr_setguardsize(pthread_attr_t *__attr, size_t __guardsize) attribute_hidden; -extern int __pthread_attr_getguardsize(__const pthread_attr_t *__attr, +extern int __pthread_attr_getguardsize(const pthread_attr_t *__attr, size_t *__guardsize) attribute_hidden; extern int __pthread_attr_setstackaddr(pthread_attr_t *__attr, void *__stackaddr) attribute_hidden; -extern int __pthread_attr_getstackaddr(__const pthread_attr_t *__attr, +extern int __pthread_attr_getstackaddr(const pthread_attr_t *__attr, void **__stackaddr) attribute_hidden; extern int __pthread_attr_setstacksize(pthread_attr_t *__attr, size_t __stacksize) attribute_hidden; -extern int __pthread_attr_getstacksize(__const pthread_attr_t *__attr, +extern int __pthread_attr_getstacksize(const pthread_attr_t *__attr, size_t *__stacksize) attribute_hidden; extern int __pthread_getconcurrency(void) attribute_hidden; extern int __pthread_setconcurrency(int __level) attribute_hidden; diff --git a/libpthread/linuxthreads.old/semaphore.h b/libpthread/linuxthreads.old/semaphore.h index c5ff6a038..9a9b72c9e 100644 --- a/libpthread/linuxthreads.old/semaphore.h +++ b/libpthread/linuxthreads.old/semaphore.h @@ -58,13 +58,13 @@ extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value) __THROW; extern int sem_destroy (sem_t *__sem) __THROW; /* Open a named semaphore NAME with open flags OFLAG. */ -extern sem_t *sem_open (__const char *__name, int __oflag, ...) __THROW; +extern sem_t *sem_open (const char *__name, int __oflag, ...) __THROW; /* Close descriptor for named semaphore SEM. */ extern int sem_close (sem_t *__sem) __THROW; /* Remove named semaphore NAME. */ -extern int sem_unlink (__const char *__name) __THROW; +extern int sem_unlink (const char *__name) __THROW; /* Wait for SEM being posted. @@ -78,7 +78,7 @@ extern int sem_wait (sem_t *__sem); This function is a cancellation point and therefore not marked with __THROW. */ extern int sem_timedwait (sem_t *__restrict __sem, - __const struct timespec *__restrict __abstime); + const struct timespec *__restrict __abstime); #endif /* Test whether SEM is posted. */ diff --git a/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h b/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h index f7c74e7ec..8833e343d 100644 --- a/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h +++ b/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h @@ -301,7 +301,7 @@ typedef pthread_key_t __libc_key_t; library. */ extern int __pthread_mutex_init (pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutex_attr); + const pthread_mutexattr_t *__mutex_attr); extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); @@ -320,7 +320,7 @@ extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr, #ifdef __USE_UNIX98 extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock, - __const pthread_rwlockattr_t *__attr); + const pthread_rwlockattr_t *__attr); extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); @@ -339,7 +339,7 @@ extern int __pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)); extern int __pthread_setspecific (pthread_key_t __key, - __const void *__pointer); + const void *__pointer); extern void *__pthread_getspecific (pthread_key_t __key); diff --git a/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h b/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h index 3bf586eca..46c1010c6 100644 --- a/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h +++ b/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h @@ -161,7 +161,7 @@ enum if ATTR is NULL), and call function START_ROUTINE with given arguments ARG. */ extern int pthread_create (pthread_t *__restrict __threadp, - __const pthread_attr_t *__restrict __attr, + const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), void *__restrict __arg) __THROW; @@ -201,16 +201,16 @@ extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, int __detachstate) __THROW; /* Return in *DETACHSTATE the `detachstate' attribute in *ATTR. */ -extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, +extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr, int *__detachstate) __THROW; /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */ extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, - __const struct sched_param *__restrict + const struct sched_param *__restrict __param) __THROW; /* Return in *PARAM the scheduling parameters of *ATTR. */ -extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict +extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) __THROW; @@ -220,7 +220,7 @@ extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) __THROW; /* Return in *POLICY the scheduling policy of *ATTR. */ -extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict +extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict __attr, int *__restrict __policy) __THROW; @@ -229,7 +229,7 @@ extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, int __inherit) __THROW; /* Return in *INHERIT the scheduling inheritance mode of *ATTR. */ -extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict +extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict __attr, int *__restrict __inherit) __THROW; @@ -238,7 +238,7 @@ extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) __THROW; /* Return in *SCOPE the scheduling contention scope of *ATTR. */ -extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, +extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr, int *__restrict __scope) __THROW; #ifdef __USE_UNIX98 @@ -247,7 +247,7 @@ extern int pthread_attr_setguardsize (pthread_attr_t *__attr, size_t __guardsize) __THROW; /* Get the size of the guard area at the bottom of the thread. */ -extern int pthread_attr_getguardsize (__const pthread_attr_t *__restrict +extern int pthread_attr_getguardsize (const pthread_attr_t *__restrict __attr, size_t *__restrict __guardsize) __THROW; #endif @@ -261,7 +261,7 @@ extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr) __THROW; /* Return the previously set address for the stack. */ -extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict +extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) __THROW; #endif @@ -274,7 +274,7 @@ extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize) __THROW; /* Return the previously set address for the stack. */ -extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, +extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, size_t *__restrict __stacksize) __THROW; #endif @@ -286,7 +286,7 @@ extern int pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize) __THROW; /* Return the currently used minimal stack size. */ -extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict +extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) __THROW; @@ -306,7 +306,7 @@ extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW; /* Set the scheduling parameters for TARGET_THREAD according to POLICY and *PARAM. */ extern int pthread_setschedparam (pthread_t __target_thread, int __policy, - __const struct sched_param *__param) + const struct sched_param *__param) __THROW; /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */ @@ -333,7 +333,7 @@ extern int pthread_setconcurrency (int __level) __THROW; /* Initialize MUTEX using attributes in *MUTEX_ATTR, or use the default values if later is NULL. */ extern int pthread_mutex_init (pthread_mutex_t *__restrict __mutex, - __const pthread_mutexattr_t *__restrict + const pthread_mutexattr_t *__restrict __mutex_attr) __THROW; /* Destroy MUTEX. */ @@ -348,7 +348,7 @@ extern int pthread_mutex_lock (pthread_mutex_t *__mutex) __THROW; #ifdef __USE_XOPEN2K /* Wait until lock becomes available, or specified time passes. */ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, - __const struct timespec *__restrict + const struct timespec *__restrict __abstime) __THROW; #endif @@ -366,7 +366,7 @@ extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __THROW; extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW; /* Get the process-shared flag of the mutex attribute ATTR. */ -extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * +extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t * __restrict __attr, int *__restrict __pshared) __THROW; @@ -382,7 +382,7 @@ extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) __THROW; /* Return in *KIND the mutex kind attribute in *ATTR. */ -extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict +extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict __attr, int *__restrict __kind) __THROW; #endif @@ -392,7 +392,7 @@ extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict /* Initialize condition variable COND using attributes ATTR, or use the default values if later is NULL. */ extern int pthread_cond_init (pthread_cond_t *__restrict __cond, - __const pthread_condattr_t *__restrict + const pthread_condattr_t *__restrict __cond_attr) __THROW; libpthread_hidden_proto(pthread_cond_init) @@ -420,7 +420,7 @@ libpthread_hidden_proto(pthread_cond_wait) (00:00:00 GMT, January 1, 1970). */ extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, - __const struct timespec *__restrict + const struct timespec *__restrict __abstime); libpthread_hidden_proto(pthread_cond_timedwait) @@ -435,7 +435,7 @@ extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW; libpthread_hidden_proto(pthread_condattr_destroy) /* Get the process-shared flag of the condition variable attribute ATTR. */ -extern int pthread_condattr_getpshared (__const pthread_condattr_t * +extern int pthread_condattr_getpshared (const pthread_condattr_t * __restrict __attr, int *__restrict __pshared) __THROW; @@ -450,7 +450,7 @@ extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, /* Initialize read-write lock RWLOCK using attributes ATTR, or use the default values if later is NULL. */ extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, - __const pthread_rwlockattr_t *__restrict + const pthread_rwlockattr_t *__restrict __attr) __THROW; /* Destroy read-write lock RWLOCK. */ @@ -465,7 +465,7 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __THROW; # ifdef __USE_XOPEN2K /* Try to acquire read lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, - __const struct timespec *__restrict + const struct timespec *__restrict __abstime) __THROW; # endif @@ -478,7 +478,7 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __THROW; # ifdef __USE_XOPEN2K /* Try to acquire write lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, - __const struct timespec *__restrict + const struct timespec *__restrict __abstime) __THROW; # endif @@ -495,7 +495,7 @@ extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) __THROW; extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW; /* Return current setting of process-shared attribute of ATTR in PSHARED. */ -extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * +extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pshared) __THROW; @@ -504,7 +504,7 @@ extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, int __pshared) __THROW; /* Return current setting of reader/writer preference. */ -extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *__attr, +extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *__attr, int *__pref) __THROW; /* Set reader/write preference. */ @@ -540,7 +540,7 @@ extern int pthread_spin_unlock (pthread_spinlock_t *__lock) __THROW; /* Barriers are a also a new feature in 1003.1j-2000. */ extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, - __const pthread_barrierattr_t *__restrict + const pthread_barrierattr_t *__restrict __attr, unsigned int __count) __THROW; extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __THROW; @@ -549,7 +549,7 @@ extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) __THROW; extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __THROW; -extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * +extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t * __restrict __attr, int *__restrict __pshared) __THROW; @@ -577,7 +577,7 @@ extern int pthread_key_delete (pthread_key_t __key) __THROW; /* Store POINTER in the thread-specific data slot identified by KEY. */ extern int pthread_setspecific (pthread_key_t __key, - __const void *__pointer) __THROW; + const void *__pointer) __THROW; /* Return current value of the thread-specific data slot identified by KEY. */ extern void *pthread_getspecific (pthread_key_t __key) __THROW; diff --git a/libpthread/linuxthreads/internals.h b/libpthread/linuxthreads/internals.h index db5b3e46c..68a8b6a75 100644 --- a/libpthread/linuxthreads/internals.h +++ b/libpthread/linuxthreads/internals.h @@ -345,7 +345,7 @@ extern int __pthread_mutexattr_gettype (const pthread_mutexattr_t *__attr, int *__kind); extern void __pthread_kill_other_threads_np (void); extern int __pthread_mutex_init (pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutex_attr); + const pthread_mutexattr_t *__mutex_attr); extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex); @@ -391,14 +391,14 @@ extern void __pthread_wait_for_restart_signal(pthread_descr self); extern void __pthread_sigsuspend (const sigset_t *mask) attribute_hidden; extern int __pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, - __const struct timespec *__restrict + const struct timespec *__restrict __abstime); extern int __pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, - __const struct timespec *__restrict + const struct timespec *__restrict __abstime); extern int __pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr); -extern int __pthread_barrierattr_getpshared (__const pthread_barrierattr_t * +extern int __pthread_barrierattr_getpshared (const pthread_barrierattr_t * __restrict __attr, int *__restrict __pshared); diff --git a/libpthread/linuxthreads/semaphore.h b/libpthread/linuxthreads/semaphore.h index f9ad4c536..7f3dbadfb 100644 --- a/libpthread/linuxthreads/semaphore.h +++ b/libpthread/linuxthreads/semaphore.h @@ -58,13 +58,13 @@ extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value) __THROW; extern int sem_destroy (sem_t *__sem) __THROW; /* Open a named semaphore NAME with open flags OFLAG. */ -extern sem_t *sem_open (__const char *__name, int __oflag, ...) __THROW; +extern sem_t *sem_open (const char *__name, int __oflag, ...) __THROW; /* Close descriptor for named semaphore SEM. */ extern int sem_close (sem_t *__sem) __THROW; /* Remove named semaphore NAME. */ -extern int sem_unlink (__const char *__name) __THROW; +extern int sem_unlink (const char *__name) __THROW; /* Wait for SEM being posted. @@ -78,7 +78,7 @@ extern int sem_wait (sem_t *__sem); This function is a cancellation point and therefore not marked with __THROW. */ extern int sem_timedwait (sem_t *__restrict __sem, - __const struct timespec *__restrict __abstime); + const struct timespec *__restrict __abstime); #endif /* Test whether SEM is posted. */ diff --git a/libpthread/linuxthreads/sysdeps/pthread/bits/libc-lock.h b/libpthread/linuxthreads/sysdeps/pthread/bits/libc-lock.h index 6c4a9d01b..855efff12 100644 --- a/libpthread/linuxthreads/sysdeps/pthread/bits/libc-lock.h +++ b/libpthread/linuxthreads/sysdeps/pthread/bits/libc-lock.h @@ -292,7 +292,7 @@ typedef pthread_key_t __libc_key_t; library. */ extern int __pthread_mutex_init (pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutex_attr); + const pthread_mutexattr_t *__mutex_attr); extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); @@ -311,7 +311,7 @@ extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr, #ifdef __USE_UNIX98 extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock, - __const pthread_rwlockattr_t *__attr); + const pthread_rwlockattr_t *__attr); extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); @@ -330,7 +330,7 @@ extern int __pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)); extern int __pthread_setspecific (pthread_key_t __key, - __const void *__pointer); + const void *__pointer); extern void *__pthread_getspecific (pthread_key_t __key); diff --git a/libpthread/linuxthreads/sysdeps/pthread/pthread.h b/libpthread/linuxthreads/sysdeps/pthread/pthread.h index 947f911a6..94ed95c99 100644 --- a/libpthread/linuxthreads/sysdeps/pthread/pthread.h +++ b/libpthread/linuxthreads/sysdeps/pthread/pthread.h @@ -161,7 +161,7 @@ enum if ATTR is NULL), and call function START_ROUTINE with given arguments ARG. */ extern int pthread_create (pthread_t *__restrict __threadp, - __const pthread_attr_t *__restrict __attr, + const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), void *__restrict __arg) __THROW; @@ -201,16 +201,16 @@ extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, int __detachstate) __THROW; /* Return in *DETACHSTATE the `detachstate' attribute in *ATTR. */ -extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, +extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr, int *__detachstate) __THROW; /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */ extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, - __const struct sched_param *__restrict + const struct sched_param *__restrict __param) __THROW; /* Return in *PARAM the scheduling parameters of *ATTR. */ -extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict +extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) __THROW; @@ -220,7 +220,7 @@ extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) __THROW; /* Return in *POLICY the scheduling policy of *ATTR. */ -extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict +extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict __attr, int *__restrict __policy) __THROW; @@ -229,7 +229,7 @@ extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, int __inherit) __THROW; /* Return in *INHERIT the scheduling inheritance mode of *ATTR. */ -extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict +extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict __attr, int *__restrict __inherit) __THROW; @@ -238,7 +238,7 @@ extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) __THROW; /* Return in *SCOPE the scheduling contention scope of *ATTR. */ -extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, +extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr, int *__restrict __scope) __THROW; #ifdef __USE_UNIX98 @@ -247,7 +247,7 @@ extern int pthread_attr_setguardsize (pthread_attr_t *__attr, size_t __guardsize) __THROW; /* Get the size of the guard area at the bottom of the thread. */ -extern int pthread_attr_getguardsize (__const pthread_attr_t *__restrict +extern int pthread_attr_getguardsize (const pthread_attr_t *__restrict __attr, size_t *__restrict __guardsize) __THROW; #endif @@ -261,7 +261,7 @@ extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr) __THROW; /* Return the previously set address for the stack. */ -extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict +extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) __THROW; #endif @@ -274,7 +274,7 @@ extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize) __THROW; /* Return the previously set address for the stack. */ -extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, +extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, size_t *__restrict __stacksize) __THROW; #endif @@ -286,7 +286,7 @@ extern int pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize) __THROW; /* Return the currently used minimal stack size. */ -extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict +extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) __THROW; @@ -302,7 +302,7 @@ extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW; /* Set the scheduling parameters for TARGET_THREAD according to POLICY and *PARAM. */ extern int pthread_setschedparam (pthread_t __target_thread, int __policy, - __const struct sched_param *__param) + const struct sched_param *__param) __THROW; /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */ @@ -324,7 +324,7 @@ extern int pthread_setconcurrency (int __level) __THROW; /* Initialize MUTEX using attributes in *MUTEX_ATTR, or use the default values if later is NULL. */ extern int pthread_mutex_init (pthread_mutex_t *__restrict __mutex, - __const pthread_mutexattr_t *__restrict + const pthread_mutexattr_t *__restrict __mutex_attr) __THROW; /* Destroy MUTEX. */ @@ -339,7 +339,7 @@ extern int pthread_mutex_lock (pthread_mutex_t *__mutex) __THROW; #ifdef __USE_XOPEN2K /* Wait until lock becomes available, or specified time passes. */ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, - __const struct timespec *__restrict + const struct timespec *__restrict __abstime) __THROW; #endif @@ -357,7 +357,7 @@ extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __THROW; extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW; /* Get the process-shared flag of the mutex attribute ATTR. */ -extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * +extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t * __restrict __attr, int *__restrict __pshared) __THROW; @@ -373,7 +373,7 @@ extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) __THROW; /* Return in *KIND the mutex kind attribute in *ATTR. */ -extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict +extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict __attr, int *__restrict __kind) __THROW; #endif @@ -383,7 +383,7 @@ extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict /* Initialize condition variable COND using attributes ATTR, or use the default values if later is NULL. */ extern int pthread_cond_init (pthread_cond_t *__restrict __cond, - __const pthread_condattr_t *__restrict + const pthread_condattr_t *__restrict __cond_attr) __THROW; /* Destroy condition variable COND. */ @@ -406,7 +406,7 @@ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, (00:00:00 GMT, January 1, 1970). */ extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, - __const struct timespec *__restrict + const struct timespec *__restrict __abstime); /* Functions for handling condition variable attributes. */ @@ -418,7 +418,7 @@ extern int pthread_condattr_init (pthread_condattr_t *__attr) __THROW; extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW; /* Get the process-shared flag of the condition variable attribute ATTR. */ -extern int pthread_condattr_getpshared (__const pthread_condattr_t * +extern int pthread_condattr_getpshared (const pthread_condattr_t * __restrict __attr, int *__restrict __pshared) __THROW; @@ -433,7 +433,7 @@ extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, /* Initialize read-write lock RWLOCK using attributes ATTR, or use the default values if later is NULL. */ extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, - __const pthread_rwlockattr_t *__restrict + const pthread_rwlockattr_t *__restrict __attr) __THROW; /* Destroy read-write lock RWLOCK. */ @@ -448,7 +448,7 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __THROW; # ifdef __USE_XOPEN2K /* Try to acquire read lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, - __const struct timespec *__restrict + const struct timespec *__restrict __abstime) __THROW; # endif @@ -461,7 +461,7 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __THROW; # ifdef __USE_XOPEN2K /* Try to acquire write lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, - __const struct timespec *__restrict + const struct timespec *__restrict __abstime) __THROW; # endif @@ -478,7 +478,7 @@ extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) __THROW; extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW; /* Return current setting of process-shared attribute of ATTR in PSHARED. */ -extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * +extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pshared) __THROW; @@ -487,7 +487,7 @@ extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, int __pshared) __THROW; /* Return current setting of reader/writer preference. */ -extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *__attr, +extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *__attr, int *__pref) __THROW; /* Set reader/write preference. */ @@ -520,7 +520,7 @@ extern int pthread_spin_unlock (pthread_spinlock_t *__lock) __THROW; /* Barriers are a also a new feature in 1003.1j-2000. */ extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, - __const pthread_barrierattr_t *__restrict + const pthread_barrierattr_t *__restrict __attr, unsigned int __count) __THROW; extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __THROW; @@ -529,7 +529,7 @@ extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) __THROW; extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __THROW; -extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * +extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t * __restrict __attr, int *__restrict __pshared) __THROW; @@ -556,7 +556,7 @@ extern int pthread_key_delete (pthread_key_t __key) __THROW; /* Store POINTER in the thread-specific data slot identified by KEY. */ extern int pthread_setspecific (pthread_key_t __key, - __const void *__pointer) __THROW; + const void *__pointer) __THROW; /* Return current value of the thread-specific data slot identified by KEY. */ extern void *pthread_getspecific (pthread_key_t __key) __THROW; diff --git a/libpthread/nptl/pthreadP.h b/libpthread/nptl/pthreadP.h index e520d807a..f46dd40d5 100644 --- a/libpthread/nptl/pthreadP.h +++ b/libpthread/nptl/pthreadP.h @@ -410,9 +410,9 @@ extern int __pthread_setschedparam (pthread_t thread_id, int policy, const struct sched_param *param); extern int __pthread_setcancelstate (int state, int *oldstate); extern int __pthread_mutex_init (pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutexattr); + const pthread_mutexattr_t *__mutexattr); extern int __pthread_mutex_init_internal (pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutexattr) + const pthread_mutexattr_t *__mutexattr) attribute_hidden; extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); extern int __pthread_mutex_destroy_internal (pthread_mutex_t *__mutex) @@ -451,22 +451,22 @@ extern int __pthread_attr_getschedpolicy (const pthread_attr_t *attr, extern int __pthread_attr_setschedpolicy (pthread_attr_t *attr, int policy); extern int __pthread_attr_getscope (const pthread_attr_t *attr, int *scope); extern int __pthread_attr_setscope (pthread_attr_t *attr, int scope); -extern int __pthread_attr_getstackaddr (__const pthread_attr_t *__restrict +extern int __pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr); extern int __pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr); -extern int __pthread_attr_getstacksize (__const pthread_attr_t *__restrict +extern int __pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize); extern int __pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize); -extern int __pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, +extern int __pthread_attr_getstack (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, size_t *__restrict __stacksize); extern int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize); extern int __pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, - __const pthread_rwlockattr_t *__restrict + const pthread_rwlockattr_t *__restrict __attr); extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock); diff --git a/libpthread/nptl/semaphore.h b/libpthread/nptl/semaphore.h index c6f1cce1c..aa0f9294e 100644 --- a/libpthread/nptl/semaphore.h +++ b/libpthread/nptl/semaphore.h @@ -39,13 +39,13 @@ extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value) extern int sem_destroy (sem_t *__sem) __THROW; /* Open a named semaphore NAME with open flags OFLAG. */ -extern sem_t *sem_open (__const char *__name, int __oflag, ...) __THROW; +extern sem_t *sem_open (const char *__name, int __oflag, ...) __THROW; /* Close descriptor for named semaphore SEM. */ extern int sem_close (sem_t *__sem) __THROW; /* Remove named semaphore NAME. */ -extern int sem_unlink (__const char *__name) __THROW; +extern int sem_unlink (const char *__name) __THROW; /* Wait for SEM being posted. @@ -59,7 +59,7 @@ extern int sem_wait (sem_t *__sem); This function is a cancellation point and therefore not marked with __THROW. */ extern int sem_timedwait (sem_t *__restrict __sem, - __const struct timespec *__restrict __abstime); + const struct timespec *__restrict __abstime); #endif /* Test whether SEM is posted. */ diff --git a/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h b/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h index a20a27f63..4df507b84 100644 --- a/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h +++ b/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h @@ -474,7 +474,7 @@ extern int __register_atfork (void (*__prepare) (void), library. */ extern int __pthread_mutex_init (pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutex_attr); + const pthread_mutexattr_t *__mutex_attr); extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); @@ -493,7 +493,7 @@ extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr, #ifdef __USE_UNIX98 extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock, - __const pthread_rwlockattr_t *__attr); + const pthread_rwlockattr_t *__attr); extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); @@ -512,7 +512,7 @@ extern int __pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)); extern int __pthread_setspecific (pthread_key_t __key, - __const void *__pointer); + const void *__pointer); extern void *__pthread_getspecific (pthread_key_t __key); diff --git a/libpthread/nptl/sysdeps/pthread/pthread.h b/libpthread/nptl/sysdeps/pthread/pthread.h index 246c6013e..896fb1bf5 100644 --- a/libpthread/nptl/sysdeps/pthread/pthread.h +++ b/libpthread/nptl/sysdeps/pthread/pthread.h @@ -227,7 +227,7 @@ __BEGIN_DECLS getting passed ARG. Creation attributed come from ATTR. The new handle is stored in *NEWTHREAD. */ extern int pthread_create (pthread_t *__restrict __newthread, - __const pthread_attr_t *__restrict __attr, + const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), void *__restrict __arg) __THROW __nonnull ((1, 3)); @@ -257,7 +257,7 @@ extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW; This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, - __const struct timespec *__abstime); + const struct timespec *__abstime); #endif /* Indicate that the thread TH is never to be joined with PTHREAD_JOIN. @@ -286,7 +286,7 @@ extern int pthread_attr_destroy (pthread_attr_t *__attr) __THROW __nonnull ((1)); /* Get detach state attribute. */ -extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, +extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr, int *__detachstate) __THROW __nonnull ((1, 2)); @@ -297,7 +297,7 @@ extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, /* Get the size of the guard area created for stack overflow protection. */ -extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, +extern int pthread_attr_getguardsize (const pthread_attr_t *__attr, size_t *__guardsize) __THROW __nonnull ((1, 2)); @@ -308,18 +308,18 @@ extern int pthread_attr_setguardsize (pthread_attr_t *__attr, /* Return in *PARAM the scheduling parameters of *ATTR. */ -extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict +extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) __THROW __nonnull ((1, 2)); /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */ extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, - __const struct sched_param *__restrict + const struct sched_param *__restrict __param) __THROW __nonnull ((1, 2)); /* Return in *POLICY the scheduling policy of *ATTR. */ -extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict +extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict __attr, int *__restrict __policy) __THROW __nonnull ((1, 2)); @@ -328,7 +328,7 @@ extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) __THROW __nonnull ((1)); /* Return in *INHERIT the scheduling inheritance mode of *ATTR. */ -extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict +extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict __attr, int *__restrict __inherit) __THROW __nonnull ((1, 2)); @@ -339,7 +339,7 @@ extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, /* Return in *SCOPE the scheduling contention scope of *ATTR. */ -extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, +extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr, int *__restrict __scope) __THROW __nonnull ((1, 2)); @@ -348,7 +348,7 @@ extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) __THROW __nonnull ((1)); /* Return the previously set address for the stack. */ -extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict +extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) __THROW __nonnull ((1, 2)) __attribute_deprecated__; @@ -361,7 +361,7 @@ extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, __THROW __nonnull ((1)) __attribute_deprecated__; /* Return the currently used minimal stack size. */ -extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict +extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) __THROW __nonnull ((1, 2)); @@ -374,7 +374,7 @@ extern int pthread_attr_setstacksize (pthread_attr_t *__attr, #ifdef __USE_XOPEN2K /* Return the previously set address for the stack. */ -extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, +extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, size_t *__restrict __stacksize) __THROW __nonnull ((1, 2, 3)); @@ -391,12 +391,12 @@ extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, the processors represented in CPUSET. */ extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, size_t __cpusetsize, - __const cpu_set_t *__cpuset) + const cpu_set_t *__cpuset) __THROW __nonnull ((1, 3)); /* Get bit set in CPUSET representing the processors threads created with ATTR can run on. */ -extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, +extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, size_t __cpusetsize, cpu_set_t *__cpuset) __THROW __nonnull ((1, 3)); @@ -415,7 +415,7 @@ extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) /* Set the scheduling parameters for TARGET_THREAD according to POLICY and *PARAM. */ extern int pthread_setschedparam (pthread_t __target_thread, int __policy, - __const struct sched_param *__param) + const struct sched_param *__param) __THROW __nonnull ((3)); /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */ @@ -448,7 +448,7 @@ extern int pthread_yield (void) __THROW; /* Limit specified thread TH to run only on the processors represented in CPUSET. */ extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, - __const cpu_set_t *__cpuset) + const cpu_set_t *__cpuset) __THROW __nonnull ((3)); /* Get bit set in CPUSET representing the processors TH can run on. */ @@ -724,7 +724,7 @@ extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROW; /* Initialize a mutex. */ extern int pthread_mutex_init (pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutexattr) + const pthread_mutexattr_t *__mutexattr) __THROW __nonnull ((1)); /* Destroy a mutex. */ @@ -742,7 +742,7 @@ extern int pthread_mutex_lock (pthread_mutex_t *__mutex) #ifdef __USE_XOPEN2K /* Wait until lock becomes available, or specified time passes. */ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, - __const struct timespec *__restrict + const struct timespec *__restrict __abstime) __THROW __nonnull ((1, 2)); #endif @@ -752,7 +752,7 @@ extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) /* Get the priority ceiling of MUTEX. */ -extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * +extern int pthread_mutex_getprioceiling (const pthread_mutex_t * __restrict __mutex, int *__restrict __prioceiling) __THROW __nonnull ((1, 2)); @@ -788,7 +788,7 @@ extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW __nonnull ((1)); /* Get the process-shared flag of the mutex attribute ATTR. */ -extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * +extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t * __restrict __attr, int *__restrict __pshared) __THROW __nonnull ((1, 2)); @@ -800,7 +800,7 @@ extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, #if defined __USE_UNIX98 || defined __USE_XOPEN2K8 /* Return in *KIND the mutex kind attribute in *ATTR. */ -extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict +extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict __attr, int *__restrict __kind) __THROW __nonnull ((1, 2)); @@ -812,7 +812,7 @@ extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) #endif /* Return in *PROTOCOL the mutex protocol attribute in *ATTR. */ -extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * +extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t * __restrict __attr, int *__restrict __protocol) __THROW __nonnull ((1, 2)); @@ -824,7 +824,7 @@ extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, __THROW __nonnull ((1)); /* Return in *PRIOCEILING the mutex prioceiling attribute in *ATTR. */ -extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * +extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t * __restrict __attr, int *__restrict __prioceiling) __THROW __nonnull ((1, 2)); @@ -836,11 +836,11 @@ extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, #ifdef __USE_XOPEN2K /* Get the robustness flag of the mutex attribute ATTR. */ -extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr, +extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, int *__robustness) __THROW __nonnull ((1, 2)); # ifdef __USE_GNU -extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, +extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr, int *__robustness) __THROW __nonnull ((1, 2)); # endif @@ -863,7 +863,7 @@ extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, /* Initialize read-write lock RWLOCK using attributes ATTR, or use the default values if later is NULL. */ extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, - __const pthread_rwlockattr_t *__restrict + const pthread_rwlockattr_t *__restrict __attr) __THROW __nonnull ((1)); /* Destroy read-write lock RWLOCK. */ @@ -881,7 +881,7 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) # ifdef __USE_XOPEN2K /* Try to acquire read lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, - __const struct timespec *__restrict + const struct timespec *__restrict __abstime) __THROW __nonnull ((1, 2)); # endif @@ -896,7 +896,7 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) # ifdef __USE_XOPEN2K /* Try to acquire write lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, - __const struct timespec *__restrict + const struct timespec *__restrict __abstime) __THROW __nonnull ((1, 2)); # endif @@ -916,7 +916,7 @@ extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW __nonnull ((1)); /* Return current setting of process-shared attribute of ATTR in PSHARED. */ -extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * +extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pshared) __THROW __nonnull ((1, 2)); @@ -927,7 +927,7 @@ extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, __THROW __nonnull ((1)); /* Return current setting of reader/writer preference. */ -extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * +extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pref) __THROW __nonnull ((1, 2)); @@ -943,7 +943,7 @@ extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, /* Initialize condition variable COND using attributes ATTR, or use the default values if later is NULL. */ extern int pthread_cond_init (pthread_cond_t *__restrict __cond, - __const pthread_condattr_t *__restrict + const pthread_condattr_t *__restrict __cond_attr) __THROW __nonnull ((1)); /* Destroy condition variable COND. */ @@ -976,7 +976,7 @@ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, __THROW. */ extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, - __const struct timespec *__restrict + const struct timespec *__restrict __abstime) __nonnull ((1, 2, 3)); /* Functions for handling condition variable attributes. */ @@ -990,7 +990,7 @@ extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW __nonnull ((1)); /* Get the process-shared flag of the condition variable attribute ATTR. */ -extern int pthread_condattr_getpshared (__const pthread_condattr_t * +extern int pthread_condattr_getpshared (const pthread_condattr_t * __restrict __attr, int *__restrict __pshared) __THROW __nonnull ((1, 2)); @@ -1001,7 +1001,7 @@ extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, #ifdef __USE_XOPEN2K /* Get the clock selected for the conditon variable attribute ATTR. */ -extern int pthread_condattr_getclock (__const pthread_condattr_t * +extern int pthread_condattr_getclock (const pthread_condattr_t * __restrict __attr, __clockid_t *__restrict __clock_id) __THROW __nonnull ((1, 2)); @@ -1043,7 +1043,7 @@ extern int pthread_spin_unlock (pthread_spinlock_t *__lock) /* Initialize BARRIER with the attributes in ATTR. The barrier is opened when COUNT waiters arrived. */ extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, - __const pthread_barrierattr_t *__restrict + const pthread_barrierattr_t *__restrict __attr, unsigned int __count) __THROW __nonnull ((1)); @@ -1065,7 +1065,7 @@ extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __THROW __nonnull ((1)); /* Get the process-shared flag of the barrier attribute ATTR. */ -extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * +extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t * __restrict __attr, int *__restrict __pshared) __THROW __nonnull ((1, 2)); @@ -1097,7 +1097,7 @@ extern void *pthread_getspecific (pthread_key_t __key) __THROW; /* Store POINTER in the thread-specific data slot identified by KEY. */ extern int pthread_setspecific (pthread_key_t __key, - __const void *__pointer) __THROW ; + const void *__pointer) __THROW ; #ifdef __USE_XOPEN2K -- cgit v1.2.3