integers.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00028
00029
00030 #ifndef INTEGERS_HPP
00031 #define INTEGERS_HPP
00032
00033 #include "../my_config.h"
00034
00035 #ifndef OS_BITS
00036
00037 #if HAVE_INTTYPES_H
00038 extern "C"
00039 {
00040 #include <inttypes.h>
00041 }
00042
00043 namespace libdar
00044 {
00045
00046 typedef unsigned char U_8;
00047 typedef uint16_t U_16;
00048 typedef uint32_t U_32;
00049 typedef uint64_t U_64;
00050 typedef unsigned int U_I;
00051 typedef signed char S_8;
00052 typedef int16_t S_16;
00053 typedef int32_t S_32;
00054 typedef int64_t S_64;
00055 typedef signed int S_I;
00056
00057 }
00058
00059 #else // HAVE_INTTYPES_H
00060 #error "Cannot determine interger types, use --enable-os-bits=... with the 'configure' script according to your system's CPU register size"
00061 #endif // HAVE_INTTYPES_H
00062
00063 #else // OS_BITS not defined
00064 #if OS_BITS == 32
00065
00066 namespace libdar
00067 {
00068 typedef unsigned char U_8;
00069 typedef unsigned short U_16;
00070 typedef unsigned long U_32;
00071 typedef unsigned long long U_64;
00072 typedef unsigned int U_I;
00073 typedef signed char S_8;
00074 typedef signed short S_16;
00075 typedef signed long S_32;
00076 typedef signed long long S_64;
00077 typedef signed int S_I;
00078
00079 }
00080
00081 #else
00082 #if OS_BITS == 64
00083
00084 namespace libdar
00085 {
00086 typedef unsigned char U_8;
00087 typedef unsigned short U_16;
00088 typedef unsigned int U_32;
00089 typedef unsigned long long U_64;
00090 typedef unsigned int U_I;
00091 typedef signed char S_8;
00092 typedef signed short S_16;
00093 typedef signed int S_32;
00094 typedef signed long long S_64;
00095 typedef signed int S_I;
00096
00097 }
00098
00099 #else
00100 #error "unknown value given to --enable-os-bits=... check the 'configure' script arguments"
00101
00102
00103
00104
00105 #endif // OS_BITS == 64
00106 #endif // OS_BITS == 32
00107 #endif // OS_BITS not defined
00108
00109 #endif // header file multiple inclusion protection