Updated binary toolchain for kernel 2.4 target (gcc 4.2.4, binutils 2.20.1)
[tomato.git] / tools / brcm / K24 / hndtools-mipsel-uclibc-4.2.4 / include / bits / uClibc_uwchar.h
blobba2c42db78b08cd3440722d493d006072b3e3351
1 /* Copyright (C) 2003 Manuel Novoa III
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
8 * The GNU C 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 * Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with the GNU C Library; if not, write to the Free
15 * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
16 * 02111-1307 USA.
19 /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
21 * Besides uClibc, I'm using this code in my libc for elks, which is
22 * a 16-bit environment with a fairly limited compiler. It would make
23 * things much easier for me if this file isn't modified unnecessarily.
24 * In particular, please put any new or replacement functions somewhere
25 * else, and modify the makefile to use your version instead.
26 * Thanks. Manuel
28 * ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! */
31 /* Define an internal unsigned int type __uwchar_t just large enough
32 * to hold a wchar_t.
35 #ifndef _UCLIBC_UWCHAR_H
36 #define _UCLIBC_UWCHAR_H
38 #include <limits.h>
39 #include <stdint.h>
41 #if WCHAR_MIN == 0
42 typedef wchar_t __uwchar_t;
43 #elif WCHAR_MAX <= USHRT_MAX
44 typedef unsigned short __uwchar_t;
45 #elif WCHAR_MAX <= UINT_MAX
46 typedef unsigned int __uwchar_t;
47 #elif WCHAR_MAX <= ULONG_MAX
48 typedef unsigned long __uwchar_t;
49 #elif defined(ULLONG_MAX) && (WCHAR_MAX <= ULLONG_MAX)
50 typedef unsigned long long __uwchar_t;
51 #elif WCHAR_MAX <= UINTMAX_MAX
52 typedef uintmax_t __uwchar_t;
53 #else
54 #error Can not determine an appropriate type for __uwchar_t!
55 #endif
57 #endif /* _UCLIBC_UWCHAR_H */