Go to the documentation of this file.
45 #if defined(__cplusplus)
53 # if UCHAR_MAX == 255u
54 typedef unsigned char uint_8t;
56 # error Please define uint_8t as an 8-bit unsigned integer type in brg_types.h
62 # if USHRT_MAX == 65535u
63 typedef unsigned short uint_16t;
65 # error Please define uint_16t as a 16-bit unsigned short type in brg_types.h
71 # if UINT_MAX == 4294967295u
72 # define li_32(h) 0x##h##u
73 typedef unsigned int uint_32t;
74 # elif ULONG_MAX == 4294967295u
75 # define li_32(h) 0x##h##ul
76 typedef unsigned long uint_32t;
77 # elif defined( _CRAY )
78 # error This code needs 32-bit data types, which Cray machines do not provide
80 # error Please define uint_32t as a 32-bit unsigned integer type in brg_types.h
85 # if defined( __BORLANDC__ ) && !defined( __MSDOS__ )
87 # define li_64(h) 0x##h##ull
88 typedef unsigned __int64 uint_64t;
89 # elif defined( _MSC_VER ) && ( _MSC_VER < 1300 )
91 # define li_64(h) 0x##h##ui64
92 typedef unsigned __int64 uint_64t;
93 # elif defined( __sun ) && defined(ULONG_MAX) && ULONG_MAX == 0xfffffffful
95 # define li_64(h) 0x##h##ull
96 typedef unsigned long long uint_64t;
97 # elif defined( __MVS__ )
98 # define li_64(h) 0x##h##ull
99 typedef unsigned int long long uint_64t;
100 # elif defined( UINT_MAX ) && UINT_MAX > 4294967295u
101 # if UINT_MAX == 18446744073709551615u
103 # define li_64(h) 0x##h##u
104 typedef unsigned int uint_64t;
106 # elif defined( ULONG_MAX ) && ULONG_MAX > 4294967295u
107 # if ULONG_MAX == 18446744073709551615ul
109 # define li_64(h) 0x##h##ul
110 typedef unsigned long uint_64t;
112 # elif defined( ULLONG_MAX ) && ULLONG_MAX > 4294967295u
113 # if ULLONG_MAX == 18446744073709551615ull
115 # define li_64(h) 0x##h##ull
116 typedef unsigned long long uint_64t;
118 # elif defined( ULONG_LONG_MAX ) && ULONG_LONG_MAX > 4294967295u
119 # if ULONG_LONG_MAX == 18446744073709551615ull
121 # define li_64(h) 0x##h##ull
122 typedef unsigned long long uint_64t;
127 #if defined( NEED_UINT_64T ) && !defined( BRG_UI64 )
128 # error Please define uint_64t as an unsigned 64 bit type in brg_types.h
131 #ifndef RETURN_VALUES
132 # define RETURN_VALUES
133 # if defined( DLL_EXPORT )
134 # if defined( _MSC_VER ) || defined ( __INTEL_COMPILER )
135 # define VOID_RETURN __declspec( dllexport ) void __stdcall
136 # define INT_RETURN __declspec( dllexport ) int __stdcall
137 # elif defined( __GNUC__ )
138 # define VOID_RETURN __declspec( __dllexport__ ) void
139 # define INT_RETURN __declspec( __dllexport__ ) int
141 # error Use of the DLL is only available on the Microsoft, Intel and GCC compilers
143 # elif defined( DLL_IMPORT )
144 # if defined( _MSC_VER ) || defined ( __INTEL_COMPILER )
145 # define VOID_RETURN __declspec( dllimport ) void __stdcall
146 # define INT_RETURN __declspec( dllimport ) int __stdcall
147 # elif defined( __GNUC__ )
148 # define VOID_RETURN __declspec( __dllimport__ ) void
149 # define INT_RETURN __declspec( __dllimport__ ) int
151 # error Use of the DLL is only available on the Microsoft, Intel and GCC compilers
153 # elif defined( __WATCOMC__ )
154 # define VOID_RETURN void __cdecl
155 # define INT_RETURN int __cdecl
157 # define VOID_RETURN void
158 # define INT_RETURN int
178 #define ui_type(size) uint_##size##t
179 #define dec_unit_type(size,x) typedef ui_type(size) x
180 #define dec_bufr_type(size,bsize,x) typedef ui_type(size) x[bsize / (size >> 3)]
181 #define unit_cast(size,x) ((ui_type(size) )(x))
182 #define ptr_cast(x,size) ((ui_type(size)*)(x))
184 #if defined(__cplusplus)