public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] newlib: Drop incorrect const qualifier from __loadlocale parameter
@ 2018-10-10  9:21 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2018-10-10  9:21 UTC (permalink / raw)
  To: newlib-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=9479563e4836177414c995730adb96d48da9fb22

commit 9479563e4836177414c995730adb96d48da9fb22
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Wed Oct 10 11:18:02 2018 +0200

    newlib: Drop incorrect const qualifier from __loadlocale parameter
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 newlib/libc/locale/locale.c    | 4 ++--
 newlib/libc/locale/setlocale.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
index 791a775..4c343e4 100644
--- a/newlib/libc/locale/locale.c
+++ b/newlib/libc/locale/locale.c
@@ -463,7 +463,7 @@ currentlocale ()
 extern void __set_ctype (struct __locale_t *, const char *charset);
 
 char *
-__loadlocale (struct __locale_t *loc, int category, const char *new_locale)
+__loadlocale (struct __locale_t *loc, int category, char *new_locale)
 {
   /* At this point a full-featured system would just load the locale
      specific data from the locale files.
@@ -506,7 +506,7 @@ __loadlocale (struct __locale_t *loc, int category, const char *new_locale)
 
 restart:
   if (!locale)
-    locale = (char *) new_locale;
+    locale = new_locale;
   else if (locale != tmp_locale)
     {
       locale = __set_locale_from_locale_alias (locale, tmp_locale);
diff --git a/newlib/libc/locale/setlocale.h b/newlib/libc/locale/setlocale.h
index 25c27cf..a0c8084 100644
--- a/newlib/libc/locale/setlocale.h
+++ b/newlib/libc/locale/setlocale.h
@@ -195,7 +195,7 @@ struct __locale_t
 };
 
 #ifdef _MB_CAPABLE
-extern char *__loadlocale (struct __locale_t *, int, const char *);
+extern char *__loadlocale (struct __locale_t *, int, char *);
 extern const char *__get_locale_env(struct _reent *, int);
 #endif /* _MB_CAPABLE */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-10-10  9:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-10  9:21 [newlib-cygwin] newlib: Drop incorrect const qualifier from __loadlocale parameter Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).