Go to the documentation of this file.00001
00008
00009
00010
00011
00012 #ifndef ECL_PORTABLE_TYPES_HPP_
00013 #define ECL_PORTABLE_TYPES_HPP_
00014
00015
00016
00017
00018
00019 #include <ecl/config/ecl.hpp>
00020 #include <limits>
00021
00022
00023
00024
00025
00026 namespace ecl {
00027
00028
00029
00030
00031
00032 #if ECL_SIZE_OF_CHAR == 1
00033 typedef char int8;
00034 typedef unsigned char uint8;
00035 #else
00036 #error "ecl::int8 could not be typedef'd (probably faulty ecl logic)."
00037 #endif
00038
00039 #if ECL_SIZE_OF_SHORT == 2
00040 typedef short int16;
00041 typedef unsigned short uint16;
00042 #else
00043 #error "ecl::int16 could not be typedef'd (probably faulty ecl logic)."
00044 #endif
00045
00046 #if ECL_SIZE_OF_INT == 4
00047 typedef int int32;
00048 typedef unsigned int uint32;
00049 #else
00050 #error "ecl::int32 could not be typedef'd (probably faulty ecl logic)."
00051 #endif
00052
00053 #if ECL_SIZE_OF_LONG == 4
00054 typedef long long int64;
00055 typedef unsigned long long uint64;
00056 #elif ECL_SIZE_OF_LONG == 8
00057 typedef long int64;
00058 typedef unsigned long uint64;
00059 #else
00060 #error "ecl::int64 could not be typedef'd (probably faulty ecl logic)."
00061 #endif
00062
00063
00064
00065
00066
00067 #if ECL_SIZE_OF_FLOAT == 4
00068 typedef float float32;
00069 #else
00070 #error "ecl::float32 could not be typedef'd (probably faulty ecl logic)."
00071 #endif
00072 #if ECL_SIZE_OF_DOUBLE == 8
00073 typedef double float64;
00074 #elif ECL_SIZE_OF_LONG_DOUBLE == 8
00075 typedef long double float64;
00076 #else
00077 #error "ecl::float64 could not be typedef'd (probably faulty ecl logic)."
00078 #endif
00079 #if ECL_SIZE_OF_LONG_DOUBLE == 12
00080 typedef long double float96;
00081 #elif ECL_SIZE_OF_LONG_DOUBLE == 16
00082 typedef long double float128;
00083 #else
00084 #define ECL_LONG_DOUBLE_UNDEFINED
00085 #define ECL_LONG_LONG_DOUBLE_UNDEFINED
00086
00087 #endif
00088
00089 }
00090
00091 #endif