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"
36 #if defined(TI_CONFIG_ARCH_ARM)
37 # ifdef TI_CONFIG_CPU_S3C2440
38 # include "arch/arm/cpu-s3c2440/type.h"
42 #elif defined(TI_CONFIG_ARCH_LINUX_x86)
43 # include "arch/linux_x86/lib/type.h"
45 # error unknown architecture
49 /* ////////////////////////////////////////////////////////////////////////
52 // invalidate handle value
53 #define TI_INVALID_HANDLE ((ti_handle_t)(-1))
56 #define TI_TRUE ((ti_bool_t)(1))
57 #define TI_FALSE ((ti_bool_t)(0))
60 #define TI_NULL ((void*)0)
62 /* ////////////////////////////////////////////////////////////////////////
66 #define TI_GCC_VERSION_MAJOR (__GNUC__)
67 #define TI_GCC_VERSION_MINOR (__GNUC_MINOR__)
71 # if __GNUC_MINOR__ < 95
72 # define TI_GCC_VERSION_STRING "GNU C/C++ <2.95"
73 # elif __GNUC_MINOR__ == 95
74 # define TI_GCC_VERSION_STRING "GNU C/C++ 2.95"
75 # elif __GNUC_MINOR__ == 96
76 # define TI_GCC_VERSION_STRING "GNU C/C++ 2.96"
78 # define TI_GCC_VERSION_STRING "GNU C/C++ >2.96&&<3.0"
83 # if __GNUC_MINOR__ == 2
84 # define TI_GCC_VERSION_STRING "GNU C/C++ 3.2"
85 # elif __GNUC_MINOR__ == 3
86 # define TI_GCC_VERSION_STRING "GNU C/C++ 3.3"
87 # elif __GNUC_MINOR__ == 4
88 # define TI_GCC_VERSION_STRING "GNU C/C++ 3.4"
90 # define TI_GCC_VERSION_STRING "GNU C/C++ >3.4&&<4.0"
95 # if __GNUC_MINOR__ == 1
96 # define TI_GCC_VERSION_STRING "GNU C/C++ 4.1"
97 # elif __GNUC_MINOR__ == 2
98 # define TI_GCC_VERSION_STRING "GNU C/C++ 4.2"
99 # elif __GNUC_MINOR__ == 3
100 # define TI_GCC_VERSION_STRING "GNU C/C++ 4.3"
101 # elif __GNUC_MINOR__ == 4
102 # define TI_GCC_VERSION_STRING "GNU C/C++ 4.4"
106 # error Unknown GNU C/C++ Compiler Version