00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00021 #ifndef NDB_TYPES_H
00022 #define NDB_TYPES_H
00023
00024 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(_WIN64)
00025 #define NDB_SIZEOF_CHARP SIZEOF_CHARP
00026 #define NDB_SIZEOF_CHAR SIZEOF_CHAR
00027 #define NDB_SIZEOF_SHORT 2
00028 #define NDB_SIZEOF_INT SIZEOF_INT
00029 #define NDB_SIZEOF_LONG SIZEOF_LONG
00030 #define NDB_SIZEOF_LONG_LONG SIZEOF_LONG_LONG
00031 typedef unsigned __int64 Uint64;
00032 typedef signed __int64 Int64;
00033 #else
00034 #define NDB_SIZEOF_CHARP 4
00035 #define NDB_SIZEOF_CHAR 1
00036 #define NDB_SIZEOF_INT 4
00037 #define NDB_SIZEOF_SHORT 2
00038 #define NDB_SIZEOF_LONG 4
00039 #define NDB_SIZEOF_LONG_LONG 8
00040 typedef unsigned long long Uint64;
00041 typedef signed long long Int64;
00042 #endif
00043
00044 typedef signed char Int8;
00045 typedef unsigned char Uint8;
00046 typedef signed short Int16;
00047 typedef unsigned short Uint16;
00048 typedef signed int Int32;
00049 typedef unsigned int Uint32;
00050
00051 typedef unsigned int UintR;
00052
00053 #ifdef __SIZE_TYPE__
00054 typedef __SIZE_TYPE__ UintPtr;
00055 #elif NDB_SIZEOF_CHARP == 4
00056 typedef Uint32 UintPtr;
00057 #elif NDB_SIZEOF_CHARP == 8
00058 typedef Uint64 UintPtr;
00059 #else
00060 #error "Unknown size of (char *)"
00061 #endif
00062
00063 #if ! (NDB_SIZEOF_CHAR == 1)
00064 #error "Invalid define for Uint8"
00065 #endif
00066
00067 #if ! (NDB_SIZEOF_SHORT == 2)
00068 #error "Invalid define for Uint16"
00069 #endif
00070
00071 #if ! (NDB_SIZEOF_INT == 4)
00072 #error "Invalid define for Uint32"
00073 #endif
00074
00075 #if ! (NDB_SIZEOF_LONG_LONG == 8)
00076 #error "Invalid define for Uint64"
00077 #endif
00078
00079 #include "ndb_constants.h"
00080
00081 #endif