1 /* the ti-x embed operation system
3 * it is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
8 * it 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
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with it; If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>
16 * Copyright (C) 2009, Ruki All rights reserved.
17 * Home: <a href="http://www.xxx.org">http://www.xxx.org</a>
22 * \brief the prefix file of ti-x
28 /* ////////////////////////////////////////////////////////////////////////
33 #include "config/config.h"
34 #include "arch/support.h"
36 /* ////////////////////////////////////////////////////////////////////////
39 // invalidate handle value
40 #define TI_INVALID_HANDLE ((ti_handle_t)(-1))
43 #define TI_TRUE ((ti_bool_t)(1))
44 #define TI_FALSE ((ti_bool_t)(0))
47 #define TI_NULL ((void*)0)
49 /* ////////////////////////////////////////////////////////////////////////
53 #define TI_GCC_VERSION_MAJOR (__GNUC__)
54 #define TI_GCC_VERSION_MINOR (__GNUC_MINOR__)
58 # if __GNUC_MINOR__ < 95
59 # define TI_GCC_VERSION_STRING "GNU C/C++ <2.95"
60 # elif __GNUC_MINOR__ == 95
61 # define TI_GCC_VERSION_STRING "GNU C/C++ 2.95"
62 # elif __GNUC_MINOR__ == 96
63 # define TI_GCC_VERSION_STRING "GNU C/C++ 2.96"
65 # define TI_GCC_VERSION_STRING "GNU C/C++ >2.96&&<3.0"
70 # if __GNUC_MINOR__ == 2
71 # define TI_GCC_VERSION_STRING "GNU C/C++ 3.2"
72 # elif __GNUC_MINOR__ == 3
73 # define TI_GCC_VERSION_STRING "GNU C/C++ 3.3"
74 # elif __GNUC_MINOR__ == 4
75 # define TI_GCC_VERSION_STRING "GNU C/C++ 3.4"
77 # define TI_GCC_VERSION_STRING "GNU C/C++ >3.4&&<4.0"
82 # if __GNUC_MINOR__ == 1
83 # define TI_GCC_VERSION_STRING "GNU C/C++ 4.1"
84 # elif __GNUC_MINOR__ == 2
85 # define TI_GCC_VERSION_STRING "GNU C/C++ 4.2"
86 # elif __GNUC_MINOR__ == 3
87 # define TI_GCC_VERSION_STRING "GNU C/C++ 4.3"
88 # elif __GNUC_MINOR__ == 4
89 # define TI_GCC_VERSION_STRING "GNU C/C++ 4.4"
93 # error Unknown GNU C/C++ Compiler Version
97 /* ////////////////////////////////////////////////////////////////////////
100 typedef signed int ti_int_t
;
101 typedef unsigned int ti_uint_t
;
102 typedef ti_int_t ti_bool_t
;
103 typedef ti_uint_t ti_size_t
;
104 typedef signed char ti_int8_t
;
105 typedef unsigned char ti_uint8_t
;
106 typedef signed short ti_int16_t
;
107 typedef unsigned short ti_uint16_t
;
108 typedef ti_int_t ti_int32_t
;
109 typedef ti_uint_t ti_uint32_t
;
110 typedef ti_uint8_t ti_byte_t
;
111 typedef char ti_char_t
;
112 typedef double ti_float_t
;
113 typedef void* ti_handle_t
;
115 #ifdef TI_ARCH_HAVE_INT64
116 typedef signed long long ti_int64_t
;
117 typedef unsigned long long ti_uint64_t
;
119 typedef ti_int32_t ti_int64_t
;
120 typedef ti_uint32_t ti_uint64_t
;