00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef STXXL_TYPES_HEADER
00015 #define STXXL_TYPES_HEADER
00016
00017 #ifdef STXXL_BOOST_CONFIG
00018 #include <boost/config.hpp>
00019 #endif
00020
00021 #include <stxxl/bits/namespace.h>
00022
00023
00024 __STXXL_BEGIN_NAMESPACE
00025
00026
00027 #ifdef STXXL_BOOST_CONFIG
00028 #ifdef BOOST_MSVC
00029 typedef __int64 int64;
00030 typedef unsigned __int64 uint64;
00031 #else
00032 typedef long long int int64;
00033 typedef unsigned long long int uint64;
00034 #endif
00035 #else
00036 typedef long long int int64;
00037 typedef unsigned long long int uint64;
00038 #endif
00039
00040
00041
00042 enum { my_pointer_size = sizeof(void *) };
00043
00044 template <int PtrSize>
00045 struct choose_int_types
00046 { };
00047
00048 template <>
00049 struct choose_int_types<4>
00050 {
00051 typedef int int_type;
00052 typedef unsigned unsigned_type;
00053 };
00054
00055 template <>
00056 struct choose_int_types<8>
00057 {
00058 typedef int64 int_type;
00059 typedef uint64 unsigned_type;
00060 };
00061
00062 typedef choose_int_types<my_pointer_size>::int_type int_type;
00063 typedef choose_int_types<my_pointer_size>::unsigned_type unsigned_type;
00064
00065 typedef unsigned_type internal_size_type;
00066 typedef uint64 external_size_type;
00067
00068 __STXXL_END_NAMESPACE
00069
00070 #endif // !STXXL_TYPES_HEADER