00001 /* 00002 * Copyright 2010 SRI International 00003 * 00004 * This program is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU Lesser General Public License as published by 00006 * the Free Software Foundation, either version 3 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00018 #ifndef __KARTO_TYPES__ 00019 #define __KARTO_TYPES__ 00020 00021 #include <cstddef> 00022 00027 #if defined(_MSC_VER) 00028 00029 typedef signed __int8 kt_int8s; 00030 typedef unsigned __int8 kt_int8u; 00031 00032 typedef signed __int16 kt_int16s; 00033 typedef unsigned __int16 kt_int16u; 00034 00035 typedef signed __int32 kt_int32s; 00036 typedef unsigned __int32 kt_int32u; 00037 00038 typedef signed __int64 kt_int64s; 00039 typedef unsigned __int64 kt_int64u; 00040 00041 #else 00042 00043 #include <stdint.h> 00044 00045 typedef int8_t kt_int8s; 00046 typedef uint8_t kt_int8u; 00047 00048 typedef int16_t kt_int16s; 00049 typedef uint16_t kt_int16u; 00050 00051 typedef int32_t kt_int32s; 00052 typedef uint32_t kt_int32u; 00053 00054 #if defined(__LP64__) 00055 typedef signed long kt_int64s; 00056 typedef unsigned long kt_int64u; 00057 #else 00058 typedef signed long long kt_int64s; 00059 typedef unsigned long long kt_int64u; 00060 #endif 00061 00062 #endif 00063 00064 typedef bool kt_bool; 00065 typedef char kt_char; 00066 typedef float kt_float; 00067 typedef double kt_double; 00068 00069 #endif // __KARTO_TYPES__