Replace __const by const in all non-contributed source code.

As C1X is close to being released, there is no need to wrap around a
feature that is already part of C90. Most of these files already use
`const' in different placed as well.
This commit is contained in:
Ed Schouten 2011-12-13 13:32:56 +00:00
parent 1c6eeddad9
commit f6ab8089c6
9 changed files with 17 additions and 17 deletions

View File

@ -276,7 +276,7 @@ int getservbyport_r(int, const char *, struct servent *, char *,
int getservent_r(struct servent *, char *, size_t, int getservent_r(struct servent *, char *, size_t,
struct servent **); struct servent **);
void herror(const char *); void herror(const char *);
__const char *hstrerror(int); const char *hstrerror(int);
int innetgr(const char *, const char *, const char *, const char *); int innetgr(const char *, const char *, const char *, const char *);
void setnetgrent(const char *); void setnetgrent(const char *);
#endif #endif

View File

@ -51,7 +51,7 @@ typedef __size_t size_t;
typedef struct { typedef struct {
int re_magic; int re_magic;
size_t re_nsub; /* number of parenthesized subexpressions */ size_t re_nsub; /* number of parenthesized subexpressions */
__const char *re_endp; /* end pointer for REG_PEND */ const char *re_endp; /* end pointer for REG_PEND */
struct re_guts *re_g; /* none of your business :-) */ struct re_guts *re_g; /* none of your business :-) */
} regex_t; } regex_t;

View File

@ -42,9 +42,9 @@
* XXX should enlarge these, if only to give empty names instead of bounds * XXX should enlarge these, if only to give empty names instead of bounds
* errors for large signal numbers. * errors for large signal numbers.
*/ */
extern __const char *__const sys_signame[NSIG]; extern const char * const sys_signame[NSIG];
extern __const char *__const sys_siglist[NSIG]; extern const char * const sys_siglist[NSIG];
extern __const int sys_nsig; extern const int sys_nsig;
#endif #endif
#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE

View File

@ -404,8 +404,8 @@ int vasprintf(char **, const char *, __va_list)
* positive errno values. Use strerror() or strerror_r() from <string.h> * positive errno values. Use strerror() or strerror_r() from <string.h>
* instead. * instead.
*/ */
extern __const int sys_nerr; extern const int sys_nerr;
extern __const char *__const sys_errlist[]; extern const char * const sys_errlist[];
/* /*
* Stdio function-access interface. * Stdio function-access interface.

View File

@ -271,7 +271,7 @@ char *devname_r(__dev_t, __mode_t, char *, int);
char *fdevname(int); char *fdevname(int);
char *fdevname_r(int, char *, int); char *fdevname_r(int, char *, int);
int getloadavg(double [], int); int getloadavg(double [], int);
__const char * const char *
getprogname(void); getprogname(void);
int heapsort(void *, size_t, size_t, int (*)(const void *, const void *)); int heapsort(void *, size_t, size_t, int (*)(const void *, const void *));

View File

@ -56,13 +56,13 @@ static struct uart_class *uart_classes[] = {
static size_t uart_nclasses = sizeof(uart_classes) / sizeof(uart_classes[0]); static size_t uart_nclasses = sizeof(uart_classes) / sizeof(uart_classes[0]);
static bus_addr_t static bus_addr_t
uart_parse_addr(__const char **p) uart_parse_addr(const char **p)
{ {
return (strtoul(*p, (char**)(uintptr_t)p, 0)); return (strtoul(*p, (char**)(uintptr_t)p, 0));
} }
static struct uart_class * static struct uart_class *
uart_parse_class(struct uart_class *class, __const char **p) uart_parse_class(struct uart_class *class, const char **p)
{ {
struct uart_class *uc; struct uart_class *uc;
const char *nm; const char *nm;
@ -84,13 +84,13 @@ uart_parse_class(struct uart_class *class, __const char **p)
} }
static long static long
uart_parse_long(__const char **p) uart_parse_long(const char **p)
{ {
return (strtol(*p, (char**)(uintptr_t)p, 0)); return (strtol(*p, (char**)(uintptr_t)p, 0));
} }
static int static int
uart_parse_parity(__const char **p) uart_parse_parity(const char **p)
{ {
if (!strncmp(*p, "even", 4)) { if (!strncmp(*p, "even", 4)) {
*p += 4; *p += 4;
@ -116,7 +116,7 @@ uart_parse_parity(__const char **p)
} }
static int static int
uart_parse_tag(__const char **p) uart_parse_tag(const char **p)
{ {
int tag; int tag;
@ -192,7 +192,7 @@ out:
int int
uart_getenv(int devtype, struct uart_devinfo *di, struct uart_class *class) uart_getenv(int devtype, struct uart_devinfo *di, struct uart_class *class)
{ {
__const char *spec; const char *spec;
bus_addr_t addr = ~0U; bus_addr_t addr = ~0U;
int error; int error;

View File

@ -72,7 +72,7 @@ typedef __int64_t quad_t;
typedef quad_t * qaddr_t; typedef quad_t * qaddr_t;
typedef char * caddr_t; /* core address */ typedef char * caddr_t; /* core address */
typedef __const char * c_caddr_t; /* core address, pointer to const */ typedef const char * c_caddr_t; /* core address, pointer to const */
typedef __volatile char *v_caddr_t; /* core address, pointer to volatile */ typedef __volatile char *v_caddr_t; /* core address, pointer to volatile */
#ifndef _BLKSIZE_T_DECLARED #ifndef _BLKSIZE_T_DECLARED

View File

@ -154,7 +154,7 @@ int ishead(char []);
int isign(const char *, struct ignoretab []); int isign(const char *, struct ignoretab []);
int isprefix(const char *, const char *); int isprefix(const char *, const char *);
void istrncpy(char *, const char *, size_t); void istrncpy(char *, const char *, size_t);
__const struct cmd * const struct cmd *
lex(char []); lex(char []);
void load(char *); void load(char *);
struct var * struct var *

View File

@ -482,7 +482,7 @@ setmsize(int sz)
* to the passed command "word" * to the passed command "word"
*/ */
__const struct cmd * const struct cmd *
lex(char word[]) lex(char word[])
{ {
const struct cmd *cp; const struct cmd *cp;