about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/aio.h2
-rw-r--r--include/aliases.h8
-rw-r--r--include/argz.h2
-rw-r--r--include/arpa/inet.h2
-rw-r--r--include/assert.h8
-rw-r--r--include/dirent.h12
-rw-r--r--include/dlfcn.h4
-rw-r--r--include/execinfo.h4
-rw-r--r--include/fcntl.h16
-rw-r--r--include/fenv.h6
-rw-r--r--include/glob.h6
-rw-r--r--include/grp.h12
-rw-r--r--include/libintl.h40
-rw-r--r--include/mntent.h9
-rw-r--r--include/netdb.h36
-rw-r--r--include/pwd.h10
-rw-r--r--include/rpc/netdb.h4
-rw-r--r--include/sched.h4
-rw-r--r--include/search.h8
-rw-r--r--include/shadow.h10
-rw-r--r--include/signal.h22
-rw-r--r--include/stdio.h38
-rw-r--r--include/stdlib.h37
-rw-r--r--include/string.h30
-rw-r--r--include/sys/socket.h16
-rw-r--r--include/sys/stat.h14
-rw-r--r--include/sys/statfs.h4
-rw-r--r--include/sys/statvfs.h2
-rw-r--r--include/sys/syslog.h2
-rw-r--r--include/sys/time.h12
-rw-r--r--include/sys/uio.h8
-rw-r--r--include/time.h14
-rw-r--r--include/unistd.h38
-rw-r--r--include/utmp.h15
-rw-r--r--include/wchar.h74
-rw-r--r--include/wctype.h2
36 files changed, 264 insertions, 267 deletions
diff --git a/include/aio.h b/include/aio.h
index be40c0bcef..c81dae9706 100644
--- a/include/aio.h
+++ b/include/aio.h
@@ -2,7 +2,7 @@
 #include <rt/aio.h>
 
 /* Now define the internal interfaces.  */
-extern void __aio_init (__const struct aioinit *__init);
+extern void __aio_init (const struct aioinit *__init);
 
 /* Flag to signal we need to be compatible with glibc < 2.4 in
    lio_listio and we do not issue events for each individual list
diff --git a/include/aliases.h b/include/aliases.h
index 84c832fdd1..f7cfafcd6c 100644
--- a/include/aliases.h
+++ b/include/aliases.h
@@ -9,11 +9,11 @@ extern int __old_getaliasent_r (struct aliasent *__restrict __result_buf,
 				char *__restrict __buffer, size_t __buflen,
 				struct aliasent **__restrict __result);
 
-extern int __getaliasbyname_r (__const char *__restrict __name,
+extern int __getaliasbyname_r (const char *__restrict __name,
 			       struct aliasent *__restrict __result_buf,
 			       char *__restrict __buffer, size_t __buflen,
 			       struct aliasent **__restrict __result);
-extern int __old_getaliasbyname_r (__const char *__restrict __name,
+extern int __old_getaliasbyname_r (const char *__restrict __name,
 				   struct aliasent *__restrict __result_buf,
 				   char *__restrict __buffer, size_t __buflen,
 				   struct aliasent **__restrict __result);
@@ -22,10 +22,10 @@ extern int __old_getaliasbyname_r (__const char *__restrict __name,
 extern enum nss_status _nss_ ## service ## _setaliasent (void);		     \
 extern enum nss_status _nss_ ## service ## _endaliasent (void);		     \
 extern enum nss_status _nss_ ## service ## _getaliasent_r		     \
-                       (struct aliasent *alias, char *buffer, size_t buflen, \
+		       (struct aliasent *alias, char *buffer, size_t buflen, \
 			int *errnop);					     \
 extern enum nss_status _nss_ ## service ## _getaliasbyname_r		     \
-                       (const char *name, struct aliasent *alias,	     \
+		       (const char *name, struct aliasent *alias,	     \
 			char *buffer, size_t buflen, int *errnop);
 
 
diff --git a/include/argz.h b/include/argz.h
index 1b97ed308d..4f45b0bf17 100644
--- a/include/argz.h
+++ b/include/argz.h
@@ -4,7 +4,7 @@
 
 libc_hidden_proto (argz_delete)
 
-extern size_t __argz_count_internal (__const char *__argz, size_t __len)
+extern size_t __argz_count_internal (const char *__argz, size_t __len)
      __attribute_pure__ attribute_hidden;
 extern void __argz_stringify_internal (char *__argz, size_t __len, int __sep)
      attribute_hidden;
diff --git a/include/arpa/inet.h b/include/arpa/inet.h
index 4e2c62390b..dc44341140 100644
--- a/include/arpa/inet.h
+++ b/include/arpa/inet.h
@@ -1,6 +1,6 @@
 #include <inet/arpa/inet.h>
 
-extern int __inet_aton (__const char *__cp, struct in_addr *__inp);
+extern int __inet_aton (const char *__cp, struct in_addr *__inp);
 libc_hidden_proto (__inet_aton)
 
 libc_hidden_proto (inet_aton)
diff --git a/include/assert.h b/include/assert.h
index 4b022342ef..573eb404ec 100644
--- a/include/assert.h
+++ b/include/assert.h
@@ -3,14 +3,14 @@
 /* This prints an "Assertion failed" message and aborts.
    In installed assert.h this is only conditionally declared,
    so it has to be repeated here.  */
-extern void __assert_fail (__const char *__assertion, __const char *__file,
-			   unsigned int __line, __const char *__function)
+extern void __assert_fail (const char *__assertion, const char *__file,
+			   unsigned int __line, const char *__function)
      __THROW __attribute__ ((__noreturn__));
 
 /* Likewise, but prints the error text for ERRNUM.  */
-extern void __assert_perror_fail (int __errnum, __const char *__file,
+extern void __assert_perror_fail (int __errnum, const char *__file,
 				  unsigned int __line,
-				  __const char *__function)
+				  const char *__function)
      __THROW __attribute__ ((__noreturn__));
 
 /* The real implementation of the two functions above.  */
diff --git a/include/dirent.h b/include/dirent.h
index 7dbf622bbb..28bf432301 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -12,8 +12,8 @@ struct scandir_cancel_struct
 };
 
 /* Now define the internal interfaces.  */
-extern DIR *__opendir (__const char *__name);
-extern DIR *__opendirat (int dfd, __const char *__name) internal_function;
+extern DIR *__opendir (const char *__name);
+extern DIR *__opendirat (int dfd, const char *__name) internal_function;
 extern DIR *__fdopendir (int __fd);
 extern int __closedir (DIR *__dirp);
 extern struct dirent *__readdir (DIR *__dirp);
@@ -22,11 +22,11 @@ extern int __readdir_r (DIR *__dirp, struct dirent *__entry,
 			struct dirent **__result);
 extern int __readdir64_r (DIR *__dirp, struct dirent64 *__entry,
 			  struct dirent64 **__result);
-extern int __scandir64 (__const char * __dir,
+extern int __scandir64 (const char * __dir,
 			struct dirent64 *** __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 **));
 extern __ssize_t __getdents (int __fd, char *__buf, size_t __nbytes)
      internal_function;
 extern __ssize_t __getdents64 (int __fd, char *__buf, size_t __nbytes)
diff --git a/include/dlfcn.h b/include/dlfcn.h
index 9e76d35600..ae9c886087 100644
--- a/include/dlfcn.h
+++ b/include/dlfcn.h
@@ -32,8 +32,8 @@ extern char **__libc_argv attribute_hidden;
 
 #define __libc_dlopen(name) \
   __libc_dlopen_mode (name, RTLD_LAZY | __RTLD_DLOPEN)
-extern void *__libc_dlopen_mode  (__const char *__name, int __mode);
-extern void *__libc_dlsym   (void *__map, __const char *__name);
+extern void *__libc_dlopen_mode  (const char *__name, int __mode);
+extern void *__libc_dlsym   (void *__map, const char *__name);
 extern int   __libc_dlclose (void *__map);
 libc_hidden_proto (__libc_dlopen_mode)
 libc_hidden_proto (__libc_dlsym)
diff --git a/include/execinfo.h b/include/execinfo.h
index 840a0818cb..c929821e8c 100644
--- a/include/execinfo.h
+++ b/include/execinfo.h
@@ -4,9 +4,9 @@
 extern int __backtrace (void **__array, int __size);
 libc_hidden_proto (__backtrace)
 
-extern char **__backtrace_symbols (void *__const *__array, int __size);
+extern char **__backtrace_symbols (void *const *__array, int __size);
 
-extern void __backtrace_symbols_fd (void *__const *__array, int __size,
+extern void __backtrace_symbols_fd (void *const *__array, int __size,
 				    int __fd);
 libc_hidden_proto (__backtrace_symbols_fd)
 
diff --git a/include/fcntl.h b/include/fcntl.h
index d5e5ddff02..7afbd1c74c 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -2,7 +2,7 @@
 #include <io/fcntl.h>
 
 /* Now define the internal interfaces.  */
-extern int __open64 (__const char *__file, int __oflag, ...);
+extern int __open64 (const char *__file, int __oflag, ...);
 libc_hidden_proto (__open64)
 extern int __libc_open64 (const char *file, int oflag, ...);
 extern int __libc_open (const char *file, int oflag, ...);
@@ -13,21 +13,21 @@ extern int __libc_fcntl (int fd, int cmd, ...);
 extern int __fcntl_nocancel (int fd, int cmd, ...) attribute_hidden;
 libc_hidden_proto (__libc_fcntl)
 #endif
-extern int __open (__const char *__file, int __oflag, ...);
+extern int __open (const char *__file, int __oflag, ...);
 libc_hidden_proto (__open)
 extern int __fcntl (int __fd, int __cmd, ...);
 libc_hidden_proto (__fcntl)
-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)
-extern int __openat64 (int __fd, __const char *__file, int __oflag, ...)
+extern int __openat64 (int __fd, const char *__file, int __oflag, ...)
   __nonnull ((2));
 libc_hidden_proto (__openat64)
 
-extern int __open_2 (__const char *__path, int __oflag);
-extern int __open64_2 (__const char *__path, int __oflag);
-extern int __openat_2 (int __fd, __const char *__path, int __oflag);
-extern int __openat64_2 (int __fd, __const char *__path, int __oflag);
+extern int __open_2 (const char *__path, int __oflag);
+extern int __open64_2 (const char *__path, int __oflag);
+extern int __openat_2 (int __fd, const char *__path, int __oflag);
+extern int __openat64_2 (int __fd, const char *__path, int __oflag);
 
 
 /* Helper functions for the various *at functions.  For Linux.  */
diff --git a/include/fenv.h b/include/fenv.h
index 3605f8150e..59d4c3f63c 100644
--- a/include/fenv.h
+++ b/include/fenv.h
@@ -7,10 +7,10 @@ extern int __feclearexcept (int __excepts);
 extern int __fegetexcept (void);
 extern int __fegetexceptflag (fexcept_t *__flagp, int __excepts);
 extern int __feraiseexcept (int __excepts);
-extern int __fesetexceptflag (__const fexcept_t *__flagp, int __excepts);
+extern int __fesetexceptflag (const fexcept_t *__flagp, int __excepts);
 extern int __fegetenv (fenv_t *__envp);
-extern int __fesetenv (__const fenv_t *__envp);
-extern int __feupdateenv (__const fenv_t *__envp);
+extern int __fesetenv (const fenv_t *__envp);
+extern int __feupdateenv (const fenv_t *__envp);
 
 libm_hidden_proto (feraiseexcept)
 libm_hidden_proto (fegetenv)
diff --git a/include/glob.h b/include/glob.h
index 821568e1fe..a0c05977f7 100644
--- a/include/glob.h
+++ b/include/glob.h
@@ -7,9 +7,9 @@ libc_hidden_proto (globfree)
 libc_hidden_proto (globfree64)
 
 /* Now define the internal interfaces.  */
-extern int __glob_pattern_p (__const char *__pattern, int __quote);
-extern int __glob64 (__const char *__pattern, int __flags,
-		     int (*__errfunc) (__const char *, int),
+extern int __glob_pattern_p (const char *__pattern, int __quote);
+extern int __glob64 (const char *__pattern, int __flags,
+		     int (*__errfunc) (const char *, int),
 		     glob64_t *__pglob);
 
 #endif
diff --git a/include/grp.h b/include/grp.h
index 5ed9c972f0..9fa71eac75 100644
--- a/include/grp.h
+++ b/include/grp.h
@@ -22,10 +22,10 @@ extern int __old_getgrgid_r (__gid_t __gid, struct group *__resultbuf,
 			     struct group **__result);
 
 /* Search for an entry with a matching group name.  */
-extern int __getgrnam_r (__const char *__name, struct group *__resultbuf,
+extern int __getgrnam_r (const char *__name, struct group *__resultbuf,
 			 char *__buffer, size_t __buflen,
 			 struct group **__result);
-extern int __old_getgrnam_r (__const char *__name, struct group *__resultbuf,
+extern int __old_getgrnam_r (const char *__name, struct group *__resultbuf,
 			     char *__buffer, size_t __buflen,
 			     struct group **__result);
 
@@ -39,16 +39,16 @@ libc_hidden_proto (_nss_files_parse_grent)
 extern enum nss_status _nss_ ## service ## _setgrent (int);		   \
 extern enum nss_status _nss_ ## service ## _endgrent (void);		   \
 extern enum nss_status _nss_ ## service ## _getgrgid_r			   \
-                       (gid_t gid, struct group *grp, char *buffer,	   \
+		       (gid_t gid, struct group *grp, char *buffer,	   \
 			size_t buflen, int *errnop);			   \
 extern enum nss_status _nss_ ## service ## _getgrnam_r			   \
-                       (const char *name, struct group *grp,		   \
+		       (const char *name, struct group *grp,		   \
 			char *buffer, size_t buflen, int *errnop);	   \
 extern enum nss_status _nss_ ## service ##_getgrent_r			   \
-                       (struct group *result, char *buffer, size_t buflen, \
+		       (struct group *result, char *buffer, size_t buflen, \
 			int *errnop);					   \
 extern enum nss_status _nss_ ## service ##_initgroups_dyn		   \
-                       (const char *user, gid_t group, long int *start,	   \
+		       (const char *user, gid_t group, long int *start,	   \
 			long int *size, gid_t **groupsp, long int limit,   \
 			int *errnop);
 
diff --git a/include/libintl.h b/include/libintl.h
index 8875c9444f..d15a6c0a05 100644
--- a/include/libintl.h
+++ b/include/libintl.h
@@ -3,43 +3,43 @@
 #include <locale.h>
 
 /* Now define the internal interfaces.  */
-extern char *__gettext (__const char *__msgid)
+extern char *__gettext (const char *__msgid)
      __attribute_format_arg__ (1);
-extern char *__dgettext (__const char *__domainname,
-			 __const char *__msgid)
+extern char *__dgettext (const char *__domainname,
+			 const char *__msgid)
      __attribute_format_arg__ (2);
-extern char *__dcgettext (__const char *__domainname,
-			  __const char *__msgid, int __category)
+extern char *__dcgettext (const char *__domainname,
+			  const char *__msgid, int __category)
      __attribute_format_arg__ (2);
 libc_hidden_proto (__dcgettext)
-extern char *__dcgettext_internal (__const char *__domainname,
-				   __const char *__msgid, int __category)
+extern char *__dcgettext_internal (const char *__domainname,
+				   const char *__msgid, int __category)
      __attribute_format_arg__ (2)
      attribute_hidden;
 
-extern char *__ngettext (__const char *__msgid1, __const char *__msgid2,
+extern char *__ngettext (const char *__msgid1, const char *__msgid2,
 			 unsigned long int __n)
      __attribute_format_arg__ (1) __attribute_format_arg__ (2);
-extern char *__dngettext (__const char *__domainname,
-			  __const char *__msgid1, __const char *__msgid2,
+extern char *__dngettext (const char *__domainname,
+			  const char *__msgid1, const char *__msgid2,
 			  unsigned long int __n)
      __attribute_format_arg__ (2) __attribute_format_arg__ (3);
-extern char *__dcngettext (__const char *__domainname,
-			   __const char *__msgid1, __const char *__msgid2,
+extern char *__dcngettext (const char *__domainname,
+			   const char *__msgid1, const char *__msgid2,
 			   unsigned long int __n, int __category)
      __attribute_format_arg__ (2) __attribute_format_arg__ (3);
-extern char *__dcngettext_internal (__const char *__domainname,
-				    __const char *__msgid1,
-				    __const char *__msgid2,
+extern char *__dcngettext_internal (const char *__domainname,
+				    const char *__msgid1,
+				    const char *__msgid2,
 				    unsigned long int __n, int __category)
      __attribute_format_arg__ (2) __attribute_format_arg__ (3)
      attribute_hidden;
 
-extern char *__textdomain (__const char *__domainname);
-extern char *__bindtextdomain (__const char *__domainname,
-			       __const char *__dirname);
-extern char *__bind_textdomain_codeset (__const char *__domainname,
-					__const char *__codeset);
+extern char *__textdomain (const char *__domainname);
+extern char *__bindtextdomain (const char *__domainname,
+			       const char *__dirname);
+extern char *__bind_textdomain_codeset (const char *__domainname,
+					const char *__codeset);
 
 extern const char _libc_intl_domainname[];
 libc_hidden_proto (_libc_intl_domainname)
diff --git a/include/mntent.h b/include/mntent.h
index 421f1df5de..3a75f0ddfd 100644
--- a/include/mntent.h
+++ b/include/mntent.h
@@ -2,8 +2,8 @@
 #include <misc/mntent.h>
 
 /* Now define the internal interfaces.  */
-extern FILE *__setmntent (__const char *__file, __const char *__mode);
-extern FILE *__setmntent_internal (__const char *__file, __const char *__mode);
+extern FILE *__setmntent (const char *__file, const char *__mode);
+extern FILE *__setmntent_internal (const char *__file, const char *__mode);
 extern struct mntent *__getmntent_r (FILE *__stream,
 				     struct mntent *__result,
 				     char *__buffer, int __bufsize);
@@ -11,11 +11,10 @@ extern struct mntent *__getmntent_r_internal (FILE *__stream,
 					      struct mntent *__result,
 					      char *__buffer, int __bufsize)
      attribute_hidden;
-extern int __addmntent (FILE *__stream, __const struct mntent *__mnt);
+extern int __addmntent (FILE *__stream, const struct mntent *__mnt);
 extern int __endmntent (FILE *__stream);
 extern int __endmntent_internal (FILE *__stream) attribute_hidden;
-extern char *__hasmntopt (__const struct mntent *__mnt,
-			  __const char *__opt);
+extern char *__hasmntopt (const struct mntent *__mnt, const char *__opt);
 
 #ifndef NOT_IN_libc
 # define __setmntent(file, mode) INTUSE(__setmntent) (file, mode)
diff --git a/include/netdb.h b/include/netdb.h
index d5154c51d9..0db3579259 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -39,20 +39,20 @@ extern int __old_gethostent_r (struct hostent *__restrict __result_buf,
 			       struct hostent **__restrict __result,
 			       int *__restrict __h_errnop);
 
-extern int __gethostbyaddr_r (__const void *__restrict __addr,
+extern int __gethostbyaddr_r (const void *__restrict __addr,
 			      socklen_t __len, int __type,
 			      struct hostent *__restrict __result_buf,
 			      char *__restrict __buf, size_t __buflen,
 			      struct hostent **__restrict __result,
 			      int *__restrict __h_errnop);
-extern int __old_gethostbyaddr_r (__const void *__restrict __addr,
+extern int __old_gethostbyaddr_r (const void *__restrict __addr,
 				  socklen_t __len, int __type,
 				  struct hostent *__restrict __result_buf,
 				  char *__restrict __buf, size_t __buflen,
 				  struct hostent **__restrict __result,
 				  int *__restrict __h_errnop);
 
-extern int __gethostbyaddr2_r (__const void *__restrict __addr,
+extern int __gethostbyaddr2_r (const void *__restrict __addr,
 			       socklen_t __len, int __type,
 			       struct hostent *__restrict __result_buf,
 			       char *__restrict __buf, size_t __buflen,
@@ -60,29 +60,29 @@ extern int __gethostbyaddr2_r (__const void *__restrict __addr,
 			       int *__restrict __h_errnop,
 			       int32_t *ttlp);
 
-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);
-extern int __old_gethostbyname_r (__const char *__restrict __name,
+extern int __old_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);
 
-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,
 			       int *__restrict __h_errnop);
-extern int __old_gethostbyname2_r (__const char *__restrict __name, int __af,
+extern int __old_gethostbyname2_r (const char *__restrict __name, int __af,
 				   struct hostent *__restrict __result_buf,
 				   char *__restrict __buf, size_t __buflen,
 				   struct hostent **__restrict __result,
 				   int *__restrict __h_errnop);
 
-extern int __gethostbyname3_r (__const char *__restrict __name, int __af,
+extern int __gethostbyname3_r (const char *__restrict __name, int __af,
 			       struct hostent *__restrict __result_buf,
 			       char *__restrict __buf, size_t __buflen,
 			       struct hostent **__restrict __result,
@@ -109,12 +109,12 @@ extern int __old_getnetbyaddr_r (uint32_t __net, int __type,
 				 struct netent **__restrict __result,
 				 int *__restrict __h_errnop);
 
-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,
 			     int *__restrict __h_errnop);
-extern int __old_getnetbyname_r (__const char *__restrict __name,
+extern int __old_getnetbyname_r (const char *__restrict __name,
 				 struct netent *__restrict __result_buf,
 				 char *__restrict __buf, size_t __buflen,
 				 struct netent **__restrict __result,
@@ -128,24 +128,24 @@ extern int __old_getservent_r (struct servent *__restrict __result_buf,
 			       char *__restrict __buf, size_t __buflen,
 			       struct servent **__restrict __result);
 
-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);
-extern int __old_getservbyname_r (__const char *__restrict __name,
-				  __const char *__restrict __proto,
+extern int __old_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);
 
 extern int __getservbyport_r (int __port,
-			      __const char *__restrict __proto,
+			      const char *__restrict __proto,
 			      struct servent *__restrict __result_buf,
 			      char *__restrict __buf, size_t __buflen,
 			      struct servent **__restrict __result);
 extern int __old_getservbyport_r (int __port,
-				  __const char *__restrict __proto,
+				  const char *__restrict __proto,
 				  struct servent *__restrict __result_buf,
 				  char *__restrict __buf, size_t __buflen,
 				  struct servent **__restrict __result);
@@ -158,11 +158,11 @@ extern int __old_getprotoent_r (struct protoent *__restrict __result_buf,
 				char *__restrict __buf, size_t __buflen,
 				struct protoent **__restrict __result);
 
-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);
-extern int __old_getprotobyname_r (__const char *__restrict __name,
+extern int __old_getprotobyname_r (const char *__restrict __name,
 				   struct protoent *__restrict __result_buf,
 				   char *__restrict __buf, size_t __buflen,
 				   struct protoent **__restrict __result);
diff --git a/include/pwd.h b/include/pwd.h
index ef9b61a614..465c17c50c 100644
--- a/include/pwd.h
+++ b/include/pwd.h
@@ -13,10 +13,10 @@ extern int __getpwuid_r (__uid_t __uid, struct passwd *__resultbuf,
 extern int __old_getpwuid_r (__uid_t __uid, struct passwd *__resultbuf,
 			     char *__buffer, size_t __buflen,
 			     struct passwd **__result);
-extern int __getpwnam_r (__const char *__name, struct passwd *__resultbuf,
+extern int __getpwnam_r (const char *__name, struct passwd *__resultbuf,
 			 char *__buffer, size_t __buflen,
 			 struct passwd **__result);
-extern int __old_getpwnam_r (__const char *__name, struct passwd *__resultbuf,
+extern int __old_getpwnam_r (const char *__name, struct passwd *__resultbuf,
 			     char *__buffer, size_t __buflen,
 			     struct passwd **__result);
 extern int __fgetpwent_r (FILE * __stream, struct passwd *__resultbuf,
@@ -35,13 +35,13 @@ libc_hidden_proto (_nss_files_parse_pwent)
 extern enum nss_status _nss_ ## service ## _setpwent (int);		\
 extern enum nss_status _nss_ ## service ## _endpwent (void);		\
 extern enum nss_status _nss_ ## service ## _getpwnam_r			\
-                       (const char *name, struct passwd *pwd,		\
+		       (const char *name, struct passwd *pwd,		\
 			char *buffer, size_t buflen, int *errnop);	\
 extern enum nss_status _nss_ ## service ## _getpwuid_r			\
-                       (uid_t uid, struct passwd *pwd,			\
+		       (uid_t uid, struct passwd *pwd,			\
 			char *buffer, size_t buflen, int *errnop);	\
 extern enum nss_status _nss_ ## service ##_getpwent_r			\
-                       (struct passwd *result, char *buffer,		\
+		       (struct passwd *result, char *buffer,		\
 			size_t buflen, int *errnop);
 
 DECLARE_NSS_PROTOTYPES (compat)
diff --git a/include/rpc/netdb.h b/include/rpc/netdb.h
index f7021e7aba..65af237e50 100644
--- a/include/rpc/netdb.h
+++ b/include/rpc/netdb.h
@@ -1,10 +1,10 @@
 #ifndef _RPC_NETDB_H
 #include <sunrpc/rpc/netdb.h>
 
-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);
-extern int __old_getrpcbyname_r (__const char *__name,
+extern int __old_getrpcbyname_r (const char *__name,
 				 struct rpcent *__result_buf,
 				 char *__buffer, size_t __buflen,
 				 struct rpcent **__result);
diff --git a/include/sched.h b/include/sched.h
index 7b057ea833..1eae9f72ff 100644
--- a/include/sched.h
+++ b/include/sched.h
@@ -3,10 +3,10 @@
 
 /* Now define the internal interfaces.  */
 extern int __sched_setparam (__pid_t __pid,
-			     __const struct sched_param *__param);
+			     const struct sched_param *__param);
 extern int __sched_getparam (__pid_t __pid, struct sched_param *__param);
 extern int __sched_setscheduler (__pid_t __pid, int __policy,
-				 __const struct sched_param *__param);
+				 const struct sched_param *__param);
 libc_hidden_proto (__sched_setscheduler)
 extern int __sched_getscheduler (__pid_t __pid);
 extern int __sched_yield (void);
diff --git a/include/search.h b/include/search.h
index e82f02832b..d1f3a92e83 100644
--- a/include/search.h
+++ b/include/search.h
@@ -8,12 +8,12 @@ libc_hidden_proto (lfind)
 
 /* Now define the internal interfaces.  */
 extern void __hdestroy (void);
-extern void *__tsearch (__const void *__key, void **__rootp,
+extern void *__tsearch (const void *__key, void **__rootp,
 			__compar_fn_t compar);
-extern void *__tfind (__const void *__key, void *__const *__rootp,
+extern void *__tfind (const void *__key, void *const *__rootp,
 		      __compar_fn_t compar);
-extern void *__tdelete (__const void *__key, void **__rootp,
+extern void *__tdelete (const void *__key, void **__rootp,
 			__compar_fn_t compar);
-extern void __twalk (__const void *__root, __action_fn_t action);
+extern void __twalk (const void *__root, __action_fn_t action);
 extern void __tdestroy (void *__root, __free_fn_t freefct);
 #endif
diff --git a/include/shadow.h b/include/shadow.h
index 166f6846b2..a3f897cba1 100644
--- a/include/shadow.h
+++ b/include/shadow.h
@@ -7,13 +7,13 @@ extern int __getspent_r (struct spwd *__result_buf, char *__buffer,
      attribute_hidden;
 extern int __old_getspent_r (struct spwd *__result_buf, char *__buffer,
 			     size_t __buflen, struct spwd **__result);
-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);
-extern int __old_getspnam_r (__const char *__name, struct spwd *__result_buf,
+extern int __old_getspnam_r (const char *__name, struct spwd *__result_buf,
 			     char *__buffer, size_t __buflen,
 			     struct spwd **__result);
-extern int __sgetspent_r (__const char *__string,
+extern int __sgetspent_r (const char *__string,
 			  struct spwd *__result_buf, char *__buffer,
 			  size_t __buflen, struct spwd **__result);
 extern int __fgetspent_r (FILE *__stream, struct spwd *__result_buf,
@@ -32,10 +32,10 @@ libc_hidden_proto (_nss_files_parse_spent)
 extern enum nss_status _nss_ ## service ## _setspent (int);		\
 extern enum nss_status _nss_ ## service ## _endspent (void);		\
 extern enum nss_status _nss_ ## service ## _getspent_r			\
-                       (struct spwd *pwd, char *buffer, size_t buflen,	\
+		       (struct spwd *pwd, char *buffer, size_t buflen,	\
 			int *errnop);					\
 extern enum nss_status _nss_ ## service ## _getspnam_r			\
-                       (const char *name, struct spwd *pwd,		\
+		       (const char *name, struct spwd *pwd,		\
 			char *buffer, size_t buflen, int *errnop);
 
 DECLARE_NSS_PROTOTYPES (compat)
diff --git a/include/signal.h b/include/signal.h
index 6bbfbcf808..6250d30f77 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -17,31 +17,31 @@ libc_hidden_proto (__libc_current_sigrtmax)
 /* Now define the internal interfaces.  */
 extern __sighandler_t __bsd_signal (int __sig, __sighandler_t __handler);
 extern int __kill (__pid_t __pid, int __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);
 libc_hidden_proto (__sigaction)
 extern int __sigblock (int __mask);
 extern int __sigsetmask (int __mask);
 extern int __sigprocmask (int __how,
-			  __const sigset_t *__set, sigset_t *__oset);
-extern int __sigsuspend (__const sigset_t *__set);
+			  const sigset_t *__set, sigset_t *__oset);
+extern int __sigsuspend (const sigset_t *__set);
 libc_hidden_proto (__sigsuspend)
 #ifndef NO_CANCELLATION
-extern int __sigsuspend_nocancel (__const sigset_t *__set) attribute_hidden;
+extern int __sigsuspend_nocancel (const sigset_t *__set) attribute_hidden;
 #endif
-extern int __sigwait (__const sigset_t *__set, int *__sig);
+extern int __sigwait (const sigset_t *__set, int *__sig);
 libc_hidden_proto (__sigwait)
-extern int __sigwaitinfo (__const sigset_t *__set, siginfo_t *__info);
+extern int __sigwaitinfo (const sigset_t *__set, siginfo_t *__info);
 libc_hidden_proto (__sigwaitinfo)
-extern int __sigtimedwait (__const sigset_t *__set, siginfo_t *__info,
-			   __const struct timespec *__timeout);
+extern int __sigtimedwait (const sigset_t *__set, siginfo_t *__info,
+			   const struct timespec *__timeout);
 libc_hidden_proto (__sigtimedwait)
 extern int __sigqueue (__pid_t __pid, int __sig,
-		       __const union sigval __val);
-extern int __sigvec (int __sig, __const struct sigvec *__vec,
+		       const union sigval __val);
+extern int __sigvec (int __sig, const struct sigvec *__vec,
 		     struct sigvec *__ovec);
 extern int __sigreturn (struct sigcontext *__scp);
-extern int __sigaltstack (__const struct sigaltstack *__ss,
+extern int __sigaltstack (const struct sigaltstack *__ss,
 			  struct sigaltstack *__oss);
 extern int __libc_sigaction (int sig, const struct sigaction *act,
 			     struct sigaction *oact);
diff --git a/include/stdio.h b/include/stdio.h
index 6b053b8aee..5f4495d0d0 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -7,23 +7,23 @@
 /* Now define the internal interfaces.  */
 extern int __fcloseall (void);
 extern int __snprintf (char *__restrict __s, size_t __maxlen,
-		       __const char *__restrict __format, ...)
+		       const char *__restrict __format, ...)
      __attribute__ ((__format__ (__printf__, 3, 4)));
 extern int __vsnprintf (char *__restrict __s, size_t __maxlen,
-			__const char *__restrict __format, _G_va_list __arg)
+			const char *__restrict __format, _G_va_list __arg)
      __attribute__ ((__format__ (__printf__, 3, 0)));
 extern int __vfscanf (FILE *__restrict __s,
-		      __const char *__restrict __format,
+		      const char *__restrict __format,
 		      _G_va_list __arg)
      __attribute__ ((__format__ (__scanf__, 2, 0)));
 libc_hidden_proto (__vfscanf)
-extern int __vscanf (__const char *__restrict __format,
+extern int __vscanf (const char *__restrict __format,
 		     _G_va_list __arg)
      __attribute__ ((__format__ (__scanf__, 1, 0)));
 extern _IO_ssize_t __getline (char **__lineptr, size_t *__n,
 			      FILE *__stream);
-extern int __vsscanf (__const char *__restrict __s,
-		      __const char *__restrict __format,
+extern int __vsscanf (const char *__restrict __s,
+		      const char *__restrict __format,
 		      _G_va_list __arg)
      __attribute__ ((__format__ (__scanf__, 2, 0)));
 
@@ -52,17 +52,17 @@ extern int __obstack_vprintf_chk (struct obstack *, int, const char *,
 #endif
 
 extern int __isoc99_fscanf (FILE *__restrict __stream,
-			    __const char *__restrict __format, ...) __wur;
-extern int __isoc99_scanf (__const char *__restrict __format, ...) __wur;
-extern int __isoc99_sscanf (__const char *__restrict __s,
-			    __const char *__restrict __format, ...) __THROW;
+			    const char *__restrict __format, ...) __wur;
+extern int __isoc99_scanf (const char *__restrict __format, ...) __wur;
+extern int __isoc99_sscanf (const char *__restrict __s,
+			    const char *__restrict __format, ...) __THROW;
 extern int __isoc99_vfscanf (FILE *__restrict __s,
-			     __const char *__restrict __format,
+			     const char *__restrict __format,
 			     _G_va_list __arg) __wur;
-extern int __isoc99_vscanf (__const char *__restrict __format,
+extern int __isoc99_vscanf (const char *__restrict __format,
 			    _G_va_list __arg) __wur;
-extern int __isoc99_vsscanf (__const char *__restrict __s,
-			     __const char *__restrict __format,
+extern int __isoc99_vsscanf (const char *__restrict __s,
+			     const char *__restrict __format,
 			     _G_va_list __arg) __THROW;
 libc_hidden_proto (__isoc99_vsscanf)
 libc_hidden_proto (__isoc99_vfscanf)
@@ -77,7 +77,7 @@ extern FILE *__old_tmpfile (void);
 #  include <stddef.h>
 /* Generate a unique file name (and possibly open it).  */
 extern int __path_search (char *__tmpl, size_t __tmpl_len,
-			  __const char *__dir, __const char *__pfx,
+			  const char *__dir, const char *__pfx,
 			  int __try_tempdir);
 
 extern int __gen_tempname (char *__tmpl, int __suffixlen, int __flags,
@@ -88,9 +88,9 @@ extern int __gen_tempname (char *__tmpl, int __suffixlen, int __flags,
 #  define __GT_NOCREATE	2	/* just find a name not currently in use */
 
 /* Print out MESSAGE on the error output and abort.  */
-extern void __libc_fatal (__const char *__message)
+extern void __libc_fatal (const char *__message)
      __attribute__ ((__noreturn__));
-extern void __libc_message (int do_abort, __const char *__fnt, ...);
+extern void __libc_message (int do_abort, const char *__fnt, ...);
 extern void __fortify_fail (const char *msg)
      __attribute__ ((__noreturn__)) internal_function;
 libc_hidden_proto (__fortify_fail)
@@ -111,11 +111,11 @@ extern wint_t __getwc_unlocked (FILE *__fp);
 extern int __fxprintf (FILE *__fp, const char *__fmt, ...)
      __attribute__ ((__format__ (__printf__, 2, 3)));
 
-extern __const char *__const _sys_errlist_internal[] attribute_hidden;
+extern const char *const _sys_errlist_internal[] attribute_hidden;
 extern int _sys_nerr_internal attribute_hidden;
 
 extern int __asprintf_internal (char **__restrict __ptr,
-				__const char *__restrict __fmt, ...)
+				const char *__restrict __fmt, ...)
      attribute_hidden __attribute__ ((__format__ (__printf__, 2, 3)));
 #  if !defined NOT_IN_libc && !defined _ISOMAC
 #    define __asprintf(ptr, fmt, args...) \
diff --git a/include/stdlib.h b/include/stdlib.h
index 816f8ffc2e..fc9ef7f5d6 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -73,12 +73,11 @@ extern int __drand48_iterate (unsigned short int __xsubi[3],
 /* Global state for non-reentrant functions.  Defined in drand48-iter.c.  */
 extern struct drand48_data __libc_drand48_data attribute_hidden;
 
-extern int __setenv (__const char *__name, __const char *__value,
-		     int __replace);
-extern int __unsetenv (__const char *__name);
+extern int __setenv (const char *__name, const char *__value, int __replace);
+extern int __unsetenv (const char *__name);
 extern int __clearenv (void);
-extern char *__canonicalize_file_name (__const char *__name);
-extern char *__realpath (__const char *__name, char *__resolved);
+extern char *__canonicalize_file_name (const char *__name);
+extern char *__realpath (const char *__name, char *__resolved);
 extern int __ptsname_r (int __fd, char *__buf, size_t __buflen);
 # ifndef _ISOMAC
 extern int __ptsname_internal (int fd, char *buf, size_t buflen,
@@ -109,31 +108,31 @@ extern void *__libc_memalign (size_t alignment, size_t size)
 extern int __libc_system (const char *line);
 
 
-extern double __strtod_internal (__const char *__restrict __nptr,
+extern double __strtod_internal (const char *__restrict __nptr,
 				 char **__restrict __endptr, int __group)
      __THROW __nonnull ((1)) __wur;
-extern float __strtof_internal (__const char *__restrict __nptr,
+extern float __strtof_internal (const char *__restrict __nptr,
 				char **__restrict __endptr, int __group)
      __THROW __nonnull ((1)) __wur;
-extern long double __strtold_internal (__const char *__restrict __nptr,
+extern long double __strtold_internal (const char *__restrict __nptr,
 				       char **__restrict __endptr,
 				       int __group)
      __THROW __nonnull ((1)) __wur;
-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;
-extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
+extern unsigned long int __strtoul_internal (const char *__restrict __nptr,
 					     char **__restrict __endptr,
 					     int __base, int __group)
      __THROW __nonnull ((1)) __wur;
 __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;
 __extension__
-extern unsigned long long int __strtoull_internal (__const char *
+extern unsigned long long int __strtoull_internal (const char *
 						   __restrict __nptr,
 						   char **__restrict __endptr,
 						   int __base, int __group)
@@ -146,31 +145,31 @@ libc_hidden_proto (__strtoll_internal)
 libc_hidden_proto (__strtoul_internal)
 libc_hidden_proto (__strtoull_internal)
 
-extern double ____strtod_l_internal (__const char *__restrict __nptr,
+extern double ____strtod_l_internal (const char *__restrict __nptr,
 				     char **__restrict __endptr, int __group,
 				     __locale_t __loc);
-extern float ____strtof_l_internal (__const char *__restrict __nptr,
+extern float ____strtof_l_internal (const char *__restrict __nptr,
 				    char **__restrict __endptr, int __group,
 				    __locale_t __loc);
-extern long double ____strtold_l_internal (__const char *__restrict __nptr,
+extern long double ____strtold_l_internal (const char *__restrict __nptr,
 					   char **__restrict __endptr,
 					   int __group, __locale_t __loc);
-extern long int ____strtol_l_internal (__const char *__restrict __nptr,
+extern long int ____strtol_l_internal (const char *__restrict __nptr,
 				       char **__restrict __endptr,
 				       int __base, int __group,
 				       __locale_t __loc);
-extern unsigned long int ____strtoul_l_internal (__const char *
+extern unsigned long int ____strtoul_l_internal (const char *
 						 __restrict __nptr,
 						 char **__restrict __endptr,
 						 int __base, int __group,
 						 __locale_t __loc);
 __extension__
-extern long long int ____strtoll_l_internal (__const char *__restrict __nptr,
+extern long long int ____strtoll_l_internal (const char *__restrict __nptr,
 					     char **__restrict __endptr,
 					     int __base, int __group,
 					     __locale_t __loc);
 __extension__
-extern unsigned long long int ____strtoull_l_internal (__const char *
+extern unsigned long long int ____strtoull_l_internal (const char *
 						       __restrict __nptr,
 						       char **
 						       __restrict __endptr,
diff --git a/include/string.h b/include/string.h
index f73bbf9f43..0b49b8fe7c 100644
--- a/include/string.h
+++ b/include/string.h
@@ -2,42 +2,42 @@
 
 #include <sys/types.h>
 
-extern void *__memccpy (void *__dest, __const void *__src,
+extern void *__memccpy (void *__dest, const void *__src,
 			int __c, size_t __n);
 
-extern size_t __strnlen (__const char *__string, size_t __maxlen)
+extern size_t __strnlen (const char *__string, size_t __maxlen)
      __attribute_pure__;
 
-extern char *__strsep (char **__stringp, __const char *__delim);
+extern char *__strsep (char **__stringp, const char *__delim);
 
-extern int __strverscmp (__const char *__s1, __const char *__s2)
+extern int __strverscmp (const char *__s1, const char *__s2)
      __attribute_pure__;
 
-extern int __strncasecmp (__const char *__s1, __const char *__s2,
+extern int __strncasecmp (const char *__s1, const char *__s2,
 			  size_t __n)
      __attribute_pure__;
 
-extern int __strcasecmp (__const char *__s1, __const char *__s2)
+extern int __strcasecmp (const char *__s1, const char *__s2)
      __attribute_pure__;
 
-extern char *__strcasestr (__const char *__haystack, __const char *__needle)
+extern char *__strcasestr (const char *__haystack, const char *__needle)
      __attribute_pure__;
 
-extern char *__strdup (__const char *__string)
+extern char *__strdup (const char *__string)
      __attribute_malloc__;
-extern char *__strndup (__const char *__string, size_t __n)
+extern char *__strndup (const char *__string, size_t __n)
      __attribute_malloc__;
 
-extern void *__rawmemchr (__const void *__s, int __c)
+extern void *__rawmemchr (const void *__s, int __c)
      __attribute_pure__;
 
-extern char *__strchrnul (__const char *__s, int __c)
+extern char *__strchrnul (const char *__s, int __c)
      __attribute_pure__;
 
-extern void *__memrchr (__const void *__s, int __c, size_t __n)
+extern void *__memrchr (const void *__s, int __c, size_t __n)
      __attribute_pure__;
 
-extern void *__memchr (__const void *__s, int __c, size_t __n)
+extern void *__memchr (const void *__s, int __c, size_t __n)
      __attribute_pure__;
 
 extern int __ffs (int __i) __attribute__ ((const));
@@ -59,7 +59,7 @@ extern __typeof (strncasecmp_l) __strncasecmp_l;
 # 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';						      \
@@ -83,7 +83,7 @@ libc_hidden_proto (strcoll)
 libc_hidden_proto (__strcoll_l)
 libc_hidden_proto (__strxfrm_l)
 libc_hidden_proto (__strtok_r)
-extern char *__strsep_g (char **__stringp, __const char *__delim);
+extern char *__strsep_g (char **__stringp, const char *__delim);
 libc_hidden_proto (__strsep_g)
 libc_hidden_proto (strnlen)
 
diff --git a/include/sys/socket.h b/include/sys/socket.h
index df892783a0..d45c99d1cf 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -26,9 +26,9 @@ extern int __getpeername (int __fd, __SOCKADDR_ARG __addr,
 			  socklen_t *__len) attribute_hidden;
 
 /* Send N bytes of BUF to socket FD.  Returns the number sent or -1.  */
-extern ssize_t __libc_send (int __fd, __const void *__buf, size_t __n,
+extern ssize_t __libc_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);
+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.
@@ -37,7 +37,7 @@ extern ssize_t __libc_recv (int __fd, void *__buf, size_t __n, int __flags);
 
 /* Send N bytes of BUF on socket FD to peer at address ADDR (which is
    ADDR_LEN bytes long).  Returns the number sent, or -1 for errors.  */
-extern ssize_t __libc_sendto (int __fd, __const void *__buf, size_t __n,
+extern ssize_t __libc_sendto (int __fd, const void *__buf, size_t __n,
 			      int __flags, __CONST_SOCKADDR_ARG __addr,
 			      socklen_t __addr_len);
 
@@ -69,10 +69,10 @@ extern ssize_t __recv (int __fd, void *__buf, size_t __n, int __flags)
 
 /* Send N bytes of BUF on socket FD to peer at address ADDR (which is
    ADDR_LEN bytes long).  Returns the number sent, or -1 for errors.  */
-extern ssize_t __libc_sendto (int __fd, __const void *__buf, size_t __n,
+extern ssize_t __libc_sendto (int __fd, const void *__buf, size_t __n,
 			      int __flags, __CONST_SOCKADDR_ARG __addr,
 			      socklen_t __addr_len);
-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) attribute_hidden;
 
@@ -86,9 +86,9 @@ extern ssize_t __recvfrom (int __fd, void *__restrict __buf, size_t __n,
 
 /* Send a message described MESSAGE on socket FD.
    Returns the number of bytes sent, or -1 for errors.  */
-extern ssize_t __libc_sendmsg (int __fd, __const struct msghdr *__message,
+extern ssize_t __libc_sendmsg (int __fd, const struct msghdr *__message,
 			       int __flags);
-extern ssize_t __sendmsg (int __fd, __const struct msghdr *__message,
+extern ssize_t __sendmsg (int __fd, const struct msghdr *__message,
 			  int __flags) attribute_hidden;
 
 /* Receive a message as described by MESSAGE from socket FD.
@@ -102,7 +102,7 @@ extern ssize_t __recvmsg (int __fd, struct msghdr *__message,
    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,
+			 const void *__optval,
 			 socklen_t __optlen) attribute_hidden;
 
 /* Put the current value for socket FD's option OPTNAME at protocol level LEVEL
diff --git a/include/sys/stat.h b/include/sys/stat.h
index cca0500ec2..a6cf60f401 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -2,14 +2,14 @@
 #include <io/sys/stat.h>
 
 /* Now define the internal interfaces. */
-extern int __stat (__const char *__file, struct stat *__buf);
+extern int __stat (const char *__file, struct stat *__buf);
 extern int __fstat (int __fd, struct stat *__buf);
-extern int __lstat (__const char *__file, struct stat *__buf);
-extern int __chmod (__const char *__file, __mode_t __mode);
+extern int __lstat (const char *__file, struct stat *__buf);
+extern int __chmod (const char *__file, __mode_t __mode);
 extern int __fchmod (int __fd, __mode_t __mode);
 extern __mode_t __umask (__mode_t __mask);
-extern int __mkdir (__const char *__path, __mode_t __mode);
-extern int __mknod (__const char *__path,
+extern int __mkdir (const char *__path, __mode_t __mode);
+extern int __mknod (const char *__path,
 		    __mode_t __mode, __dev_t __dev);
 #if !defined NOT_IN_libc || defined IS_IN_rtld
 hidden_proto (__fxstat)
@@ -19,12 +19,12 @@ hidden_proto (__lxstat64)
 hidden_proto (__xstat)
 hidden_proto (__xstat64)
 #endif
-extern __inline__ int __stat (__const char *__path, struct stat *__statbuf)
+extern __inline__ int __stat (const char *__path, struct stat *__statbuf)
 {
   return __xstat (_STAT_VER, __path, __statbuf);
 }
 libc_hidden_proto (__xmknod)
-extern __inline__ int __mknod (__const char *__path, __mode_t __mode,
+extern __inline__ int __mknod (const char *__path, __mode_t __mode,
 			       __dev_t __dev)
 {
   return __xmknod (_MKNOD_VER, __path, __mode, &__dev);
diff --git a/include/sys/statfs.h b/include/sys/statfs.h
index 80786a71f8..e34ad02965 100644
--- a/include/sys/statfs.h
+++ b/include/sys/statfs.h
@@ -2,9 +2,9 @@
 #include <io/sys/statfs.h>
 
 /* Now define the internal interfaces.  */
-extern int __statfs (__const char *__file, struct statfs *__buf);
+extern int __statfs (const char *__file, struct statfs *__buf);
 libc_hidden_proto (__statfs)
 extern int __fstatfs (int __fildes, struct statfs *__buf);
-extern int __statfs64 (__const char *__file, struct statfs64 *__buf);
+extern int __statfs64 (const char *__file, struct statfs64 *__buf);
 extern int __fstatfs64 (int __fildes, struct statfs64 *__buf);
 #endif
diff --git a/include/sys/statvfs.h b/include/sys/statvfs.h
index b3c6a35c64..74ef2db45d 100644
--- a/include/sys/statvfs.h
+++ b/include/sys/statvfs.h
@@ -2,7 +2,7 @@
 #include <io/sys/statvfs.h>
 
 /* Now define the internal interfaces.  */
-extern int __statvfs64 (__const char *__file, struct statvfs64 *__buf);
+extern int __statvfs64 (const char *__file, struct statvfs64 *__buf);
 extern int __fstatvfs64 (int __fildes, struct statvfs64 *__buf);
 
 libc_hidden_proto (statvfs)
diff --git a/include/sys/syslog.h b/include/sys/syslog.h
index 8b0d59dad6..c08cfcd1fa 100644
--- a/include/sys/syslog.h
+++ b/include/sys/syslog.h
@@ -3,7 +3,7 @@
 libc_hidden_proto (syslog)
 libc_hidden_proto (vsyslog)
 
-extern void __vsyslog_chk (int __pri, int __flag, __const char *__fmt,
+extern void __vsyslog_chk (int __pri, int __flag, const char *__fmt,
 			   __gnuc_va_list __ap)
      __attribute__ ((__format__ (__printf__, 3, 0)));
 libc_hidden_proto (__vsyslog_chk)
diff --git a/include/sys/time.h b/include/sys/time.h
index ec4055276e..a5ec500cde 100644
--- a/include/sys/time.h
+++ b/include/sys/time.h
@@ -7,20 +7,20 @@ extern int __gettimeofday (struct timeval *__tv,
 extern int __gettimeofday_internal (struct timeval *__tv,
 				    struct timezone *__tz)
 	attribute_hidden;
-extern int __settimeofday (__const struct timeval *__tv,
-			   __const struct timezone *__tz)
+extern int __settimeofday (const struct timeval *__tv,
+			   const struct timezone *__tz)
 	attribute_hidden;
-extern int __adjtime (__const struct timeval *__delta,
+extern int __adjtime (const struct timeval *__delta,
 		      struct timeval *__olddelta);
 extern int __getitimer (enum __itimer_which __which,
 			struct itimerval *__value);
 extern int __setitimer (enum __itimer_which __which,
-			__const struct itimerval *__restrict __new,
+			const struct itimerval *__restrict __new,
 			struct itimerval *__restrict __old)
 	attribute_hidden;
-extern int __utimes (__const char *__file, const struct timeval __tvp[2])
+extern int __utimes (const char *__file, const struct timeval __tvp[2])
 	attribute_hidden;
-extern int __futimes (int fd, __const struct timeval tvp[2]) attribute_hidden;
+extern int __futimes (int fd, const struct timeval tvp[2]) attribute_hidden;
 
 #ifndef NOT_IN_libc
 # define __gettimeofday(tv, tz) INTUSE(__gettimeofday) (tv, tz)
diff --git a/include/sys/uio.h b/include/sys/uio.h
index 8c2b0167c1..1e5d64e47e 100644
--- a/include/sys/uio.h
+++ b/include/sys/uio.h
@@ -2,12 +2,12 @@
 #include <misc/sys/uio.h>
 
 /* Now define the internal interfaces.  */
-extern ssize_t __readv (int __fd, __const struct iovec *__vector,
+extern ssize_t __readv (int __fd, const struct iovec *__vector,
 			int __count);
-extern ssize_t __libc_readv (int __fd, __const struct iovec *__vector,
+extern ssize_t __libc_readv (int __fd, const struct iovec *__vector,
 			     int __count);
-extern ssize_t __writev (int __fd, __const struct iovec *__vector,
+extern ssize_t __writev (int __fd, const struct iovec *__vector,
 			 int __count);
-extern ssize_t __libc_writev (int __fd, __const struct iovec *__vector,
+extern ssize_t __libc_writev (int __fd, const struct iovec *__vector,
 			      int __count);
 #endif
diff --git a/include/time.h b/include/time.h
index e896406db4..0bda094cb4 100644
--- a/include/time.h
+++ b/include/time.h
@@ -57,10 +57,10 @@ extern time_t __mktime_internal (struct tm *__tp,
 				 struct tm *(*__func) (const time_t *,
 						       struct tm *),
 				 time_t *__offset);
-extern struct tm *__localtime_r (__const time_t *__timer,
+extern struct tm *__localtime_r (const time_t *__timer,
 				 struct tm *__tp) attribute_hidden;
 
-extern struct tm *__gmtime_r (__const time_t *__restrict __timer,
+extern struct tm *__gmtime_r (const time_t *__restrict __timer,
 			      struct tm *__restrict __tp);
 libc_hidden_proto (__gmtime_r)
 
@@ -68,11 +68,11 @@ libc_hidden_proto (__gmtime_r)
    offset OFFSET seconds east of UTC,
    and store year, yday, mon, mday, wday, hour, min, sec into *TP.
    Return nonzero if successful.  */
-extern int __offtime (__const time_t *__timer,
+extern int __offtime (const time_t *__timer,
 		      long int __offset,
 		      struct tm *__tp);
 
-extern char *__asctime_r (__const struct tm *__tp, char *__buf);
+extern char *__asctime_r (const struct tm *__tp, char *__buf);
 extern void __tzset (void);
 
 /* Prototype for the internal function to get information based on TZ.  */
@@ -82,13 +82,13 @@ extern struct tm *__tz_convert (const time_t *timer, int use_localtime, struct t
    This is what `sysconf (_SC_TZNAME_MAX)' does.  */
 extern long int __tzname_max (void);
 
-extern int __nanosleep (__const struct timespec *__requested_time,
+extern int __nanosleep (const struct timespec *__requested_time,
 			struct timespec *__remaining);
 libc_hidden_proto (__nanosleep)
-extern int __nanosleep_nocancel (__const struct timespec *__requested_time,
+extern int __nanosleep_nocancel (const struct timespec *__requested_time,
 				 struct timespec *__remaining)
   attribute_hidden;
-extern int __getdate_r (__const char *__string, struct tm *__resbufp);
+extern int __getdate_r (const char *__string, struct tm *__resbufp);
 
 
 /* Determine CLK_TCK value.  */
diff --git a/include/unistd.h b/include/unistd.h
index 3231943b02..4664dc2852 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -20,8 +20,8 @@ libc_hidden_proto (tcgetpgrp)
 libc_hidden_proto (readlinkat)
 
 /* Now define the internal interfaces.  */
-extern int __access (__const char *__name, int __type);
-extern int __euidaccess (__const char *__name, int __type);
+extern int __access (const char *__name, int __type);
+extern int __euidaccess (const char *__name, int __type);
 extern __off64_t __lseek64 (int __fd, __off64_t __offset, int __whence);
 extern __off_t __lseek (int __fd, __off_t __offset, int __whence);
 libc_hidden_proto (__lseek)
@@ -35,31 +35,31 @@ extern ssize_t __pread64 (int __fd, void *__buf, size_t __nbytes,
 			  __off64_t __offset);
 extern ssize_t __libc_pread64 (int __fd, void *__buf, size_t __nbytes,
 			       __off64_t __offset);
-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);
-extern ssize_t __libc_pwrite (int __fd, __const void *__buf, size_t __n,
+extern ssize_t __libc_pwrite (int __fd, const void *__buf, size_t __n,
 			      __off_t __offset);
-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);
 libc_hidden_proto (__pwrite64)
-extern ssize_t __libc_pwrite64 (int __fd, __const void *__buf, size_t __n,
+extern ssize_t __libc_pwrite64 (int __fd, const void *__buf, size_t __n,
 				__off64_t __offset);
 extern ssize_t __libc_read (int __fd, void *__buf, size_t __n);
 libc_hidden_proto (__libc_read)
-extern ssize_t __libc_write (int __fd, __const void *__buf, size_t __n);
+extern ssize_t __libc_write (int __fd, const void *__buf, size_t __n);
 libc_hidden_proto (__libc_write)
 extern int __pipe (int __pipedes[2]);
 libc_hidden_proto (__pipe)
 extern int __pipe2 (int __pipedes[2], int __flags);
 extern unsigned int __sleep (unsigned int __seconds);
-extern int __chown (__const char *__file,
+extern int __chown (const char *__file,
 		    __uid_t __owner, __gid_t __group);
 libc_hidden_proto (__chown)
 extern int __fchown (int __fd,
 		     __uid_t __owner, __gid_t __group);
-extern int __lchown (__const char *__file, __uid_t __owner,
+extern int __lchown (const char *__file, __uid_t __owner,
 		     __gid_t __group);
-extern int __chdir (__const char *__path);
+extern int __chdir (const char *__path);
 extern int __fchdir (int __fd);
 extern char *__getcwd (char *__buf, size_t __size);
 extern int __rmdir (const char *__path);
@@ -72,7 +72,7 @@ extern int __execvpe (const char *file, char *const argv[],
    NULL, an array is allocated with `malloc'; the array is SIZE bytes long,
    unless SIZE <= 0, in which case it is as big as necessary.  */
 
-char *__canonicalize_directory_name_internal (__const char *__thisdir,
+char *__canonicalize_directory_name_internal (const char *__thisdir,
 					      char *__buf,
 					      size_t __size) attribute_hidden;
 
@@ -80,9 +80,9 @@ extern int __dup (int __fd);
 extern int __dup2 (int __fd, int __fd2);
 libc_hidden_proto (__dup2)
 libc_hidden_proto (dup3)
-extern int __execve (__const char *__path, char *__const __argv[],
-		     char *__const __envp[]);
-extern long int __pathconf (__const char *__path, int __name);
+extern int __execve (const char *__path, char *const __argv[],
+		     char *const __envp[]);
+extern long int __pathconf (const char *__path, int __name);
 extern long int __fpathconf (int __fd, int __name);
 extern long int __sysconf (int __name);
 libc_hidden_proto (__sysconf)
@@ -115,10 +115,10 @@ extern __pid_t __vfork (void);
 libc_hidden_proto (__vfork)
 extern int __ttyname_r (int __fd, char *__buf, size_t __buflen);
 extern int __isatty (int __fd);
-extern int __link (__const char *__from, __const char *__to);
-extern int __symlink (__const char *__from, __const char *__to);
-extern ssize_t __readlink (__const char *__path, char *__buf, size_t __len);
-extern int __unlink (__const char *__name);
+extern int __link (const char *__from, const char *__to);
+extern int __symlink (const char *__from, const char *__to);
+extern ssize_t __readlink (const char *__path, char *__buf, size_t __len);
+extern int __unlink (const char *__name);
 extern int __gethostname (char *__name, size_t __len);
 extern int __profil (unsigned short int *__sample_buffer, size_t __size,
 		     size_t __offset, unsigned int __scale);
@@ -129,7 +129,7 @@ libc_hidden_proto (__close)
 extern int __libc_close (int __fd);
 extern ssize_t __read (int __fd, void *__buf, size_t __nbytes);
 libc_hidden_proto (__read)
-extern ssize_t __write (int __fd, __const void *__buf, size_t __n);
+extern ssize_t __write (int __fd, const void *__buf, size_t __n);
 libc_hidden_proto (__write)
 extern __pid_t __fork (void);
 libc_hidden_proto (__fork)
diff --git a/include/utmp.h b/include/utmp.h
index 3a35c599e5..28207d1282 100644
--- a/include/utmp.h
+++ b/include/utmp.h
@@ -2,19 +2,18 @@
 #include <login/utmp.h>
 
 /* Now define the internal interfaces.  */
-extern void __updwtmp (__const char *__wtmp_file,
-		       __const struct utmp *__utmp);
-extern int __utmpname (__const char *__file);
+extern void __updwtmp (const char *__wtmp_file, const struct utmp *__utmp);
+extern int __utmpname (const char *__file);
 extern struct utmp *__getutent (void);
 extern void __setutent (void);
 extern void __endutent (void);
-extern struct utmp *__getutid (__const struct utmp *__id);
-extern struct utmp *__getutline (__const struct utmp *__line);
-extern struct utmp *__pututline (__const struct utmp *__utmp_ptr);
+extern struct utmp *__getutid (const struct utmp *__id);
+extern struct utmp *__getutline (const struct utmp *__line);
+extern struct utmp *__pututline (const struct utmp *__utmp_ptr);
 extern int __getutent_r (struct utmp *__buffer, struct utmp **__result);
-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);
-extern int __getutline_r (__const struct utmp *__line,
+extern int __getutline_r (const struct utmp *__line,
 			  struct utmp *__buffer, struct utmp **__result);
 
 libutil_hidden_proto (login_tty)
diff --git a/include/wchar.h b/include/wchar.h
index 3afe0b6e2e..d2f9e0d166 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -25,27 +25,27 @@ libc_hidden_proto (__wcstold_l)
 libc_hidden_proto (__wcsftime_l)
 
 
-extern double __wcstod_internal (__const wchar_t *__restrict __nptr,
+extern double __wcstod_internal (const wchar_t *__restrict __nptr,
 				 wchar_t **__restrict __endptr, int __group)
      __THROW;
-extern float __wcstof_internal (__const wchar_t *__restrict __nptr,
+extern float __wcstof_internal (const wchar_t *__restrict __nptr,
 				wchar_t **__restrict __endptr, int __group)
      __THROW;
-extern long double __wcstold_internal (__const wchar_t *__restrict __nptr,
+extern long double __wcstold_internal (const wchar_t *__restrict __nptr,
 				       wchar_t **__restrict __endptr,
 				       int __group) __THROW;
-extern long int __wcstol_internal (__const wchar_t *__restrict __nptr,
+extern long int __wcstol_internal (const wchar_t *__restrict __nptr,
 				   wchar_t **__restrict __endptr,
 				   int __base, int __group) __THROW;
-extern unsigned long int __wcstoul_internal (__const wchar_t *__restrict __npt,
+extern unsigned long int __wcstoul_internal (const wchar_t *__restrict __npt,
 					     wchar_t **__restrict __endptr,
 					     int __base, int __group) __THROW;
 __extension__
-extern long long int __wcstoll_internal (__const wchar_t *__restrict __nptr,
+extern long long int __wcstoll_internal (const wchar_t *__restrict __nptr,
 					 wchar_t **__restrict __endptr,
 					 int __base, int __group) __THROW;
 __extension__
-extern unsigned long long int __wcstoull_internal (__const wchar_t *
+extern unsigned long long int __wcstoull_internal (const wchar_t *
 						   __restrict __nptr,
 						   wchar_t **
 						   __restrict __endptr,
@@ -91,65 +91,65 @@ libc_hidden_proto (wmemchr)
 libc_hidden_proto (wmemset)
 
 /* Now define the internal interfaces.  */
-extern int __wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2)
+extern int __wcscasecmp (const wchar_t *__s1, const wchar_t *__s2)
      __attribute_pure__;
-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)
      __attribute_pure__;
-extern size_t __wcslen (__const wchar_t *__s) __attribute_pure__;
-extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen)
+extern size_t __wcslen (const wchar_t *__s) __attribute_pure__;
+extern size_t __wcsnlen (const wchar_t *__s, size_t __maxlen)
      __attribute_pure__;
 extern wchar_t *__wcscat (wchar_t *dest, const wchar_t *src);
 extern wint_t __btowc (int __c);
-extern int __mbsinit (__const __mbstate_t *__ps);
+extern int __mbsinit (const __mbstate_t *__ps);
 extern size_t __mbrtowc (wchar_t *__restrict __pwc,
-			 __const char *__restrict __s, size_t __n,
+			 const char *__restrict __s, size_t __n,
 			 __mbstate_t *__restrict __p);
 libc_hidden_proto (__mbrtowc)
 libc_hidden_proto (__mbrlen)
 extern size_t __wcrtomb (char *__restrict __s, wchar_t __wc,
 			 __mbstate_t *__restrict __ps);
 extern size_t __mbsrtowcs (wchar_t *__restrict __dst,
-			   __const char **__restrict __src,
+			   const char **__restrict __src,
 			   size_t __len, __mbstate_t *__restrict __ps);
 extern size_t __wcsrtombs (char *__restrict __dst,
-			   __const wchar_t **__restrict __src,
+			   const wchar_t **__restrict __src,
 			   size_t __len, __mbstate_t *__restrict __ps);
 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);
 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);
 extern wchar_t *__wcsncpy (wchar_t *__restrict __dest,
-			 __const wchar_t *__restrict __src, size_t __n);
-extern wchar_t *__wcpcpy (wchar_t *__dest, __const wchar_t *__src);
-extern wchar_t *__wcpncpy (wchar_t *__dest, __const wchar_t *__src,
+			   const wchar_t *__restrict __src, size_t __n);
+extern wchar_t *__wcpcpy (wchar_t *__dest, const wchar_t *__src);
+extern wchar_t *__wcpncpy (wchar_t *__dest, const wchar_t *__src,
 			   size_t __n);
-extern wchar_t *__wmemcpy (wchar_t *__s1, __const wchar_t *s2,
+extern wchar_t *__wmemcpy (wchar_t *__s1, const wchar_t *s2,
 			   size_t __n);
 extern wchar_t *__wmempcpy (wchar_t *__restrict __s1,
-			    __const wchar_t *__restrict __s2,
+			    const wchar_t *__restrict __s2,
 			    size_t __n);
-extern wchar_t *__wmemmove (wchar_t *__s1, __const wchar_t *__s2,
+extern wchar_t *__wmemmove (wchar_t *__s1, const wchar_t *__s2,
 			    size_t __n);
-extern wchar_t *__wcschrnul (__const wchar_t *__s, wchar_t __wc)
+extern wchar_t *__wcschrnul (const wchar_t *__s, wchar_t __wc)
      __attribute_pure__;
 
 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)) */;
 extern int __vswprintf (wchar_t *__restrict __s, size_t __n,
-			__const wchar_t *__restrict __format,
+			const wchar_t *__restrict __format,
 			__gnuc_va_list __arg)
      /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
 extern int __fwprintf (__FILE *__restrict __s,
-		       __const wchar_t *__restrict __format, ...)
+		       const wchar_t *__restrict __format, ...)
      /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;
 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))) */;
 #ifndef __cplusplus
@@ -159,7 +159,7 @@ extern int __vfwprintf_chk (FILE *__restrict __s, int __flag,
      /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
 extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n,
 			    int __flag, size_t __s_len,
-			    __const wchar_t *__restrict __format,
+			    const wchar_t *__restrict __format,
 			    __gnuc_va_list __arg)
      /* __attribute__ ((__format__ (__wprintf__, 5, 0))) */;
 libc_hidden_proto (__vfwprintf_chk)
@@ -167,18 +167,18 @@ libc_hidden_proto (__vswprintf_chk)
 #endif
 
 extern int __isoc99_fwscanf (__FILE *__restrict __stream,
-			     __const wchar_t *__restrict __format, ...);
-extern int __isoc99_wscanf (__const wchar_t *__restrict __format, ...);
-extern int __isoc99_swscanf (__const wchar_t *__restrict __s,
-			     __const wchar_t *__restrict __format, ...)
+			     const wchar_t *__restrict __format, ...);
+extern int __isoc99_wscanf (const wchar_t *__restrict __format, ...);
+extern int __isoc99_swscanf (const wchar_t *__restrict __s,
+			     const wchar_t *__restrict __format, ...)
      __THROW;
 extern int __isoc99_vfwscanf (__FILE *__restrict __s,
-			      __const wchar_t *__restrict __format,
+			      const wchar_t *__restrict __format,
 			      __gnuc_va_list __arg);
-extern int __isoc99_vwscanf (__const wchar_t *__restrict __format,
+extern int __isoc99_vwscanf (const wchar_t *__restrict __format,
 			     __gnuc_va_list __arg);
-extern int __isoc99_vswscanf (__const wchar_t *__restrict __s,
-			      __const wchar_t *__restrict __format,
+extern int __isoc99_vswscanf (const wchar_t *__restrict __s,
+			      const wchar_t *__restrict __format,
 			      __gnuc_va_list __arg) __THROW;
 libc_hidden_proto (__isoc99_vswscanf)
 libc_hidden_proto (__isoc99_vfwscanf)
diff --git a/include/wctype.h b/include/wctype.h
index 2828c3ad3d..9833f958dd 100644
--- a/include/wctype.h
+++ b/include/wctype.h
@@ -48,7 +48,7 @@ extern int __iswxdigit_l_internal (wint_t __wc, __locale_t __locale)
 extern int __iswspace (wint_t __wc);
 extern int __iswctype (wint_t __wc, wctype_t __desc);
 extern int __iswctype_internal (wint_t __wc, wctype_t __desc) attribute_hidden;
-extern wctype_t __wctype (__const char *__property);
+extern wctype_t __wctype (const char *__property);
 extern wctrans_t __wctrans (const char *__property);
 extern wint_t __towctrans (wint_t __wc, wctrans_t __desc);