ndb_types.h

Go to the documentation of this file.
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 #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

Generated on Wed Jul 20 21:05:07 2005 for MySQL 5.0.9 Beta by  doxygen 1.4.3