mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-30 11:00:41 +08:00
Constify __locale_ctype_ptr and __locale_ctype_ptr_l
Remove _MB_CAPABLE-only _CONST in ctype.h Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
1c25a777b3
commit
b0d341442c
@ -66,10 +66,7 @@ extern int toascii_l (int __c, locale_t __l);
|
|||||||
#define _X 0100
|
#define _X 0100
|
||||||
#define _B 0200
|
#define _B 0200
|
||||||
|
|
||||||
#ifndef _MB_CAPABLE
|
const char *__locale_ctype_ptr (void);
|
||||||
_CONST
|
|
||||||
#endif
|
|
||||||
char *__locale_ctype_ptr (void);
|
|
||||||
# define __CTYPE_PTR (__locale_ctype_ptr ())
|
# define __CTYPE_PTR (__locale_ctype_ptr ())
|
||||||
|
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
@ -103,7 +100,7 @@ char *__locale_ctype_ptr (void);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __POSIX_VISIBLE >= 200809
|
#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 __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))
|
#define isalpha_l(__c,__l) (__ctype_lookup_l(__c,__l)&(_U|_L))
|
||||||
|
@ -982,8 +982,8 @@ _DEFUN_VOID (__locale_mb_cur_max)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
const char *
|
||||||
_DEFUN_VOID (__locale_ctype_ptr)
|
__locale_ctype_ptr (void)
|
||||||
{
|
{
|
||||||
/* Only check if the current thread/reent has a locale. ctype_ptr is unused
|
/* 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. */
|
in __global_locale, rather the global variable __ctype_ptr__ is used. */
|
||||||
@ -992,7 +992,7 @@ _DEFUN_VOID (__locale_ctype_ptr)
|
|||||||
: __ctype_ptr__;
|
: __ctype_ptr__;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
const char *
|
||||||
__locale_ctype_ptr_l (struct __locale_t *locale)
|
__locale_ctype_ptr_l (struct __locale_t *locale)
|
||||||
{
|
{
|
||||||
extern char *__ctype_ptr__;
|
extern char *__ctype_ptr__;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user