diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-07-01 12:45:52 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-07-01 12:45:52 +0400 |
commit | ca56076ae22c4e4eaafed078c3d0a3b29871e385 (patch) | |
tree | c365edee96208ae42acf6d937719fdfc4ba3cc53 /newlib/libc/ctype | |
parent | 5eb491d26e14e7f46f99aabc692322e864fcdd8d (diff) |
2010-06-29 Antony King <antony.king@sr.com>
* libc/ctype/ctype_.c (__ctype_ptr): Reinstate definition (guarded by
_NEED_OLD_CTYPE_PTR_DEFINITION) for backwards compatibility with newlib
1.16.0 and earlier.
2010-06-28 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* libc/include/sys/stat.h: Add ACCESSPERMS, ALLPERMS, and DEFFILEMODE.
Diffstat (limited to 'newlib/libc/ctype')
-rw-r--r-- | newlib/libc/ctype/ctype_.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/newlib/libc/ctype/ctype_.c b/newlib/libc/ctype/ctype_.c index 78212776c..c3615d2a1 100644 --- a/newlib/libc/ctype/ctype_.c +++ b/newlib/libc/ctype/ctype_.c @@ -98,6 +98,13 @@ char _ctype_b[128 + 256] = { _CTYPE_DATA_128_255 }; +#ifdef _NEED_OLD_CTYPE_PTR_DEFINITION +#ifndef _MB_CAPABLE +_CONST +#endif +char __EXPORT *__ctype_ptr = (char *) _ctype_b + 128; +#endif + #ifndef _MB_CAPABLE _CONST #endif @@ -129,6 +136,13 @@ _CONST char _ctype_[1 + 256] = { _CTYPE_DATA_128_255 }; +#ifdef _NEED_OLD_CTYPE_PTR_DEFINITION +#ifndef _MB_CAPABLE +_CONST +#endif +char *__ctype_ptr = (char *) _ctype_ + 1; +#endif + #ifndef _MB_CAPABLE _CONST #endif @@ -160,8 +174,14 @@ __set_ctype (const char *charset) else ++idx; # if defined(ALLOW_NEGATIVE_CTYPE_INDEX) +#ifdef _NEED_OLD_CTYPE_PTR_DEFINITION + __ctype_ptr = (char *) (__ctype_iso[idx] + 128); +#endif __ctype_ptr__ = (char *) (__ctype_iso[idx] + 127); # else +#ifdef _NEED_OLD_CTYPE_PTR_DEFINITION + __ctype_ptr = (char *) __ctype_iso[idx] + 1; +#endif __ctype_ptr__ = (char *) __ctype_iso[idx]; # endif return; @@ -172,8 +192,14 @@ __set_ctype (const char *charset) if (idx < 0) break; # if defined(ALLOW_NEGATIVE_CTYPE_INDEX) +#ifdef _NEED_OLD_CTYPE_PTR_DEFINITION + __ctype_ptr = (char *) (__ctype_cp[idx] + 128); +#endif __ctype_ptr__ = (char *) (__ctype_cp[idx] + 127); # else +#ifdef _NEED_OLD_CTYPE_PTR_DEFINITION + __ctype_ptr = (char *) __ctype_cp[idx] + 1; +#endif __ctype_ptr__ = (char *) __ctype_cp[idx]; # endif return; @@ -182,8 +208,14 @@ __set_ctype (const char *charset) break; } # if defined(ALLOW_NEGATIVE_CTYPE_INDEX) +#ifdef _NEED_OLD_CTYPE_PTR_DEFINITION + __ctype_ptr = (char *) _ctype_b + 128; +#endif __ctype_ptr__ = (char *) _ctype_b + 127; # else +#ifdef _NEED_OLD_CTYPE_PTR_DEFINITION + __ctype_ptr = (char *) _ctype_ + 1; +#endif __ctype_ptr__ = (char *) _ctype_; # endif } |