| 1 | /* Copyright (C) 2003 Manuel Novoa III |
|---|
| 2 | * |
|---|
| 3 | * This library is free software; you can redistribute it and/or |
|---|
| 4 | * modify it under the terms of the GNU Library General Public |
|---|
| 5 | * License as published by the Free Software Foundation; either |
|---|
| 6 | * version 2 of the License, or (at your option) any later version. |
|---|
| 7 | * |
|---|
| 8 | * This library is distributed in the hope that it will be useful, |
|---|
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 11 | * Library General Public License for more details. |
|---|
| 12 | * |
|---|
| 13 | * You should have received a copy of the GNU Library General Public |
|---|
| 14 | * License along with this library; if not, write to the Free |
|---|
| 15 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|---|
| 16 | */ |
|---|
| 17 | |
|---|
| 18 | /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! |
|---|
| 19 | * |
|---|
| 20 | * Besides uClibc, I'm using this code in my libc for elks, which is |
|---|
| 21 | * a 16-bit environment with a fairly limited compiler. It would make |
|---|
| 22 | * things much easier for me if this file isn't modified unnecessarily. |
|---|
| 23 | * In particular, please put any new or replacement functions somewhere |
|---|
| 24 | * else, and modify the makefile to use your version instead. |
|---|
| 25 | * Thanks. Manuel |
|---|
| 26 | * |
|---|
| 27 | * ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! */ |
|---|
| 28 | |
|---|
| 29 | #ifndef _UCLIBC_TOUPLOW_H |
|---|
| 30 | #define _UCLIBC_TOUPLOW_H |
|---|
| 31 | |
|---|
| 32 | #include <features.h> |
|---|
| 33 | #include <bits/types.h> |
|---|
| 34 | |
|---|
| 35 | /* glibc uses the equivalent of - typedef __int32_t __ctype_touplow_t; */ |
|---|
| 36 | |
|---|
| 37 | typedef __uint16_t __ctype_mask_t; |
|---|
| 38 | |
|---|
| 39 | #ifdef __UCLIBC_HAS_CTYPE_SIGNED__ |
|---|
| 40 | |
|---|
| 41 | typedef __int16_t __ctype_touplow_t; |
|---|
| 42 | #define __UCLIBC_CTYPE_B_TBL_OFFSET 128 |
|---|
| 43 | #define __UCLIBC_CTYPE_TO_TBL_OFFSET 128 |
|---|
| 44 | |
|---|
| 45 | #else /* __UCLIBC_HAS_CTYPE_SIGNED__ */ |
|---|
| 46 | |
|---|
| 47 | typedef unsigned char __ctype_touplow_t; |
|---|
| 48 | #define __UCLIBC_CTYPE_B_TBL_OFFSET 1 |
|---|
| 49 | #define __UCLIBC_CTYPE_TO_TBL_OFFSET 0 |
|---|
| 50 | |
|---|
| 51 | #endif /* __UCLIBC_HAS_CTYPE_SIGNED__ */ |
|---|
| 52 | |
|---|
| 53 | #endif /* _UCLIBC_TOUPLOW_H */ |
|---|
| 54 | |
|---|