summaryrefslogtreecommitdiffstats
path: root/newlib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/include/ctype.h7
-rw-r--r--newlib/libc/locale/locale.c6
2 files changed, 5 insertions, 8 deletions
diff --git a/newlib/libc/include/ctype.h b/newlib/libc/include/ctype.h
index d34b8e5cd..31577d16e 100644
--- a/newlib/libc/include/ctype.h
+++ b/newlib/libc/include/ctype.h
@@ -66,10 +66,7 @@ extern int toascii_l (int __c, locale_t __l);
#define _X 0100
#define _B 0200
-#ifndef _MB_CAPABLE
-_CONST
-#endif
-char *__locale_ctype_ptr (void);
+const char *__locale_ctype_ptr (void);
# define __CTYPE_PTR (__locale_ctype_ptr ())
#ifndef __cplusplus
@@ -103,7 +100,7 @@ char *__locale_ctype_ptr (void);
#endif
#if __POSIX_VISIBLE >= 200809
-char *__locale_ctype_ptr_l (locale_t);
+const char *__locale_ctype_ptr_l (locale_t);
#define __ctype_lookup_l(__c,__l) ((__locale_ctype_ptr_l(__l)+sizeof(""[__c]))[(int)(__c)])
#define isalpha_l(__c,__l) (__ctype_lookup_l(__c,__l)&(_U|_L))
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
index 795e163e0..58c28490c 100644
--- a/newlib/libc/locale/locale.c
+++ b/newlib/libc/locale/locale.c
@@ -982,8 +982,8 @@ _DEFUN_VOID (__locale_mb_cur_max)
#endif
}
-char *
-_DEFUN_VOID (__locale_ctype_ptr)
+const char *
+__locale_ctype_ptr (void)
{
/* Only check if the current thread/reent has a locale. ctype_ptr is unused
in __global_locale, rather the global variable __ctype_ptr__ is used. */
@@ -992,7 +992,7 @@ _DEFUN_VOID (__locale_ctype_ptr)
: __ctype_ptr__;
}
-char *
+const char *
__locale_ctype_ptr_l (struct __locale_t *locale)
{
extern char *__ctype_ptr__;