diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2005-03-18 17:18:59 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2005-03-18 17:18:59 +0000 |
commit | 45030958d3085a3da6319c02fa9c257bdcb5ada7 (patch) | |
tree | b4f153b702acd352d3ccc75b20dc32159675815d /newlib | |
parent | dc963441613a13b76213d8af85c9d6eddf763f61 (diff) | |
download | cygnal-45030958d3085a3da6319c02fa9c257bdcb5ada7.tar.gz cygnal-45030958d3085a3da6319c02fa9c257bdcb5ada7.tar.bz2 cygnal-45030958d3085a3da6319c02fa9c257bdcb5ada7.zip |
2005-03-18 Hans-Peter Nilsson <hp@axis.com>
Corinna Vinschen <corinna@vinschen.de>
* libc/include/ctype.h: Remove invalid +1 offset from
ctype macro references to __ctype_ptr.
(_ctype_): Move declaration outside #ifndef __cplusplus.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/ChangeLog | 7 | ||||
-rw-r--r-- | newlib/libc/include/ctype.h | 24 |
2 files changed, 19 insertions, 12 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 20db001e8..51e9c1d37 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,10 @@ +2005-03-18 Hans-Peter Nilsson <hp@axis.com> + Corinna Vinschen <corinna@vinschen.de> + + * libc/include/ctype.h: Remove invalid +1 offset from + ctype macro references to __ctype_ptr. + (_ctype_): Move declaration outside #ifndef __cplusplus. + 2005-03-18 Corinna Vinschen <corinna@vinschen.de> * libc/include/machine/setjmp.h (sigsetjmp): Use GCC extension to diff --git a/newlib/libc/include/ctype.h b/newlib/libc/include/ctype.h index 9dccac319..c1ace5077 100644 --- a/newlib/libc/include/ctype.h +++ b/newlib/libc/include/ctype.h @@ -37,21 +37,21 @@ int _EXFUN(_toupper, (int __c)); #define _B 0200 extern __IMPORT _CONST char *__ctype_ptr; +extern __IMPORT _CONST char _ctype_[]; /* For backward compatibility. */ #ifndef __cplusplus -#define isalpha(c) ((__ctype_ptr+1)[(unsigned)(c)]&(_U|_L)) -#define isupper(c) ((__ctype_ptr+1)[(unsigned)(c)]&_U) -#define islower(c) ((__ctype_ptr+1)[(unsigned)(c)]&_L) -#define isdigit(c) ((__ctype_ptr+1)[(unsigned)(c)]&_N) -#define isxdigit(c) ((__ctype_ptr+1)[(unsigned)(c)]&(_X|_N)) -#define isspace(c) ((__ctype_ptr+1)[(unsigned)(c)]&_S) -#define ispunct(c) ((__ctype_ptr+1)[(unsigned)(c)]&_P) -#define isalnum(c) ((__ctype_ptr+1)[(unsigned)(c)]&(_U|_L|_N)) -#define isprint(c) ((__ctype_ptr+1)[(unsigned)(c)]&(_P|_U|_L|_N|_B)) -#define isgraph(c) ((__ctype_ptr+1)[(unsigned)(c)]&(_P|_U|_L|_N)) -#define iscntrl(c) ((__ctype_ptr+1)[(unsigned)(c)]&_C) +#define isalpha(c) ((__ctype_ptr)[(unsigned)(c)]&(_U|_L)) +#define isupper(c) ((__ctype_ptr)[(unsigned)(c)]&_U) +#define islower(c) ((__ctype_ptr)[(unsigned)(c)]&_L) +#define isdigit(c) ((__ctype_ptr)[(unsigned)(c)]&_N) +#define isxdigit(c) ((__ctype_ptr)[(unsigned)(c)]&(_X|_N)) +#define isspace(c) ((__ctype_ptr)[(unsigned)(c)]&_S) +#define ispunct(c) ((__ctype_ptr)[(unsigned)(c)]&_P) +#define isalnum(c) ((__ctype_ptr)[(unsigned)(c)]&(_U|_L|_N)) +#define isprint(c) ((__ctype_ptr)[(unsigned)(c)]&(_P|_U|_L|_N|_B)) +#define isgraph(c) ((__ctype_ptr)[(unsigned)(c)]&(_P|_U|_L|_N)) +#define iscntrl(c) ((__ctype_ptr)[(unsigned)(c)]&_C) -extern __IMPORT _CONST char _ctype_[]; /* Deprecated. */ /* Non-gcc versions will get the library versions, and will be slightly slower */ |