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 --- 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 ++-- 21 files changed, 42 insertions(+), 42 deletions(-) (limited to 'libc/sysdeps') 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 -- cgit v1.2.3