00001 /* Copyright (C) 2003 MySQL AB 00002 00003 This program is free software; you can redistribute it and/or modify 00004 it under the terms of the GNU General Public License as published by 00005 the Free Software Foundation; either version 2 of the License, or 00006 (at your option) any later version. 00007 00008 This program is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with this program; if not, write to the Free Software 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 00016 00021 #ifndef NDB_TYPES_H 00022 #define NDB_TYPES_H 00023 00024 #include <my_config.h> 00025 00026 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(_WIN64) 00027 #define NDB_SIZEOF_CHARP SIZEOF_CHARP 00028 #define NDB_SIZEOF_CHAR SIZEOF_CHAR 00029 #define NDB_SIZEOF_SHORT 2 00030 #define NDB_SIZEOF_INT SIZEOF_INT 00031 #define NDB_SIZEOF_LONG SIZEOF_LONG 00032 #define NDB_SIZEOF_LONG_LONG SIZEOF_LONG_LONG 00033 typedef unsigned __int64 Uint64; 00034 typedef signed __int64 Int64; 00035 #else 00036 #define NDB_SIZEOF_CHARP SIZEOF_CHARP 00037 #define NDB_SIZEOF_CHAR SIZEOF_CHAR 00038 #define NDB_SIZEOF_INT SIZEOF_INT 00039 #define NDB_SIZEOF_SHORT SIZEOF_SHORT 00040 #define NDB_SIZEOF_LONG SIZEOF_LONG 00041 #define NDB_SIZEOF_LONG_LONG SIZEOF_LONG_LONG 00042 typedef unsigned long long Uint64; 00043 typedef signed long long Int64; 00044 #endif 00045 00046 typedef signed char Int8; 00047 typedef unsigned char Uint8; 00048 typedef signed short Int16; 00049 typedef unsigned short Uint16; 00050 typedef signed int Int32; 00051 typedef unsigned int Uint32; 00052 00053 typedef unsigned int UintR; 00054 00055 #ifdef __SIZE_TYPE__ 00056 typedef __SIZE_TYPE__ UintPtr; 00057 #elif NDB_SIZEOF_CHARP == 4 00058 typedef Uint32 UintPtr; 00059 #elif NDB_SIZEOF_CHARP == 8 00060 typedef Uint64 UintPtr; 00061 #else 00062 #error "Unknown size of (char *)" 00063 #endif 00064 00065 #if ! (NDB_SIZEOF_CHAR == 1) 00066 #error "Invalid define for Uint8" 00067 #endif 00068 00069 #if ! (NDB_SIZEOF_SHORT == 2) 00070 #error "Invalid define for Uint16" 00071 #endif 00072 00073 #if ! (NDB_SIZEOF_INT == 4) 00074 #error "Invalid define for Uint32" 00075 #endif 00076 00077 #if ! (NDB_SIZEOF_LONG_LONG == 8) 00078 #error "Invalid define for Uint64" 00079 #endif 00080 00081 #include "ndb_constants.h" 00082 00083 #endif
1.4.7

