HALFRED  0.4.0
hal_compiler_support.h
Go to the documentation of this file.
1 
10 #ifndef HAL_COMPILER_SUPPORT_H
11 #define HAL_COMPILER_SUPPORT_H
12 
13 
14 #if defined __ARMCC_VERSION
15 
16 // definitions for the ARM Compiler
17 
18 #define HAL_PACKED __packed
19 #define HAL_INLINE inline
20 #define HAL_WEAK __weak
21 
22 #endif
23 
24 
25 #if defined __GNUC__
26 
27 // definitions for the GCC Compiler
28 #define HAL_INLINE inline
29 
30 #if !defined __MINGW32__
31 #define HAL_PACKED __attribute__((packed))
32 #else
33 #define HAL_PACKED __attribute__((gcc_struct, __packed__))
34 #endif
35 
36 #define HAL_WEAK __attribute__((weak))
37 
38 #endif
39 
40 #if defined _MSC_VER
41 
42 // definitions for the MVSC Compiler
43 
44 #define HAL_PACKED // Project->Properties->C/C++->Code Generation->Struct Member Alignment
45 #define HAL_INLINE __inline
46 
47 #endif
48 
49 
50 #endif /* HAL_COMPILER_SUPPORT_H */