 |
OpenZWave Library
1.2
|
Go to the documentation of this file. 33 #if defined(__cplusplus) 40 #if defined( _MSC_VER ) && ( _MSC_VER >= 1300 ) 42 # define ptrint_t intptr_t 43 #elif defined( __ECOS__ ) 44 # define intptr_t unsigned int 45 # define ptrint_t intptr_t 46 #elif defined( __GNUC__ ) && ( __GNUC__ >= 3 ) 47 # define ptrint_t intptr_t 54 # if UINT_MAX == 4294967295u 55 # define li_32(h) 0x##h##u 56 # elif ULONG_MAX == 4294967295u 57 # define li_32(h) 0x##h##ul 58 # elif defined( _CRAY ) 59 # error This code needs 32-bit data types, which Cray machines do not provide 61 # error Please define uint32_t as a 32-bit unsigned integer type in brg_types.h 66 # if defined( __BORLANDC__ ) && !defined( __MSDOS__ ) 68 # define li_64(h) 0x##h##ui64 69 # elif defined( _MSC_VER ) && ( _MSC_VER < 1300 ) 71 # define li_64(h) 0x##h##ui64 72 # elif defined( __sun ) && defined( ULONG_MAX ) && ULONG_MAX == 0xfffffffful 74 # define li_64(h) 0x##h##ull 75 # elif defined( __MVS__ ) 77 # define li_64(h) 0x##h##ull 78 # elif defined( UINT_MAX ) && UINT_MAX > 4294967295u 79 # if UINT_MAX == 18446744073709551615u 81 # define li_64(h) 0x##h##u 83 # elif defined( ULONG_MAX ) && ULONG_MAX > 4294967295u 84 # if ULONG_MAX == 18446744073709551615ul 86 # define li_64(h) 0x##h##ul 88 # elif defined( ULLONG_MAX ) && ULLONG_MAX > 4294967295u 89 # if ULLONG_MAX == 18446744073709551615ull 91 # define li_64(h) 0x##h##ull 93 # elif defined( ULONG_LONG_MAX ) && ULONG_LONG_MAX > 4294967295u 94 # if ULONG_LONG_MAX == 18446744073709551615ull 96 # define li_64(h) 0x##h##ull 101 #if !defined( BRG_UI64 ) 102 # if defined( NEED_UINT_64T ) 103 # error Please define uint64_t as an unsigned 64 bit type in brg_types.h 107 #ifndef RETURN_VALUES 108 # define RETURN_VALUES 109 # if defined( DLL_EXPORT ) 110 # if defined( _MSC_VER ) || defined ( __INTEL_COMPILER ) 111 # define VOID_RETURN __declspec( dllexport ) void __stdcall 112 # define INT_RETURN __declspec( dllexport ) int __stdcall 113 # elif defined( __GNUC__ ) 114 # define VOID_RETURN __declspec( __dllexport__ ) void 115 # define INT_RETURN __declspec( __dllexport__ ) int 117 # error Use of the DLL is only available on the Microsoft, Intel and GCC compilers 119 # elif defined( DLL_IMPORT ) 120 # if defined( _MSC_VER ) || defined ( __INTEL_COMPILER ) 121 # define VOID_RETURN __declspec( dllimport ) void __stdcall 122 # define INT_RETURN __declspec( dllimport ) int __stdcall 123 # elif defined( __GNUC__ ) 124 # define VOID_RETURN __declspec( __dllimport__ ) void 125 # define INT_RETURN __declspec( __dllimport__ ) int 127 # error Use of the DLL is only available on the Microsoft, Intel and GCC compilers 129 # elif defined( __WATCOMC__ ) 130 # define VOID_RETURN void __cdecl 131 # define INT_RETURN int __cdecl 133 # define VOID_RETURN void 134 # define INT_RETURN int 157 #define ALIGN_OFFSET(x,n) (((ptrint_t)(x)) & ((n) - 1)) 158 #define ALIGN_FLOOR(x,n) ((uint8_t*)(x) - ( ((ptrint_t)(x)) & ((n) - 1))) 159 #define ALIGN_CEIL(x,n) ((uint8_t*)(x) + (-((ptrint_t)(x)) & ((n) - 1))) 181 #define UI_TYPE(size) uint##size##_t 182 #define UNIT_TYPEDEF(x,size) typedef UI_TYPE(size) x 183 #define BUFR_TYPEDEF(x,size,bsize) typedef UI_TYPE(size) x[bsize / (size >> 3)] 184 #define UNIT_CAST(x,size) ((UI_TYPE(size) )(x)) 185 #define UPTR_CAST(x,size) ((UI_TYPE(size)*)(x)) 187 #if defined(__cplusplus)