1 /* 2 * Copyright 2007-2009, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _BE_BUILD_H 6 #define _BE_BUILD_H 7 8 9 #define B_BEOS_VERSION_4 0x0400 10 #define B_BEOS_VERSION_4_5 0x0450 11 #define B_BEOS_VERSION_5 0x0500 12 13 #define B_BEOS_VERSION B_BEOS_VERSION_5 14 #define B_BEOS_VERSION_MAUI B_BEOS_VERSION_5 15 16 /* Haiku (API) version */ 17 #define B_HAIKU_VERSION_BEOS 0x00000001 18 #define B_HAIKU_VERSION_BONE 0x00000002 19 #define B_HAIKU_VERSION_DANO 0x00000003 20 #define B_HAIKU_VERSION_1_PRE_ALPHA_1 0x00000011 21 #define B_HAIKU_VERSION_1_ALPHA_1 0x00000100 22 #define B_HAIKU_VERSION_1 0x00010000 23 24 #define B_HAIKU_VERSION B_HAIKU_VERSION_1_PRE_ALPHA_1 25 26 /* Haiku ABI */ 27 #define B_HAIKU_ABI_MAJOR 0xffff0000 28 #define B_HAIKU_ABI_GCC_2 0x00020000 29 #define B_HAIKU_ABI_GCC_4 0x00040000 30 31 #define B_HAIKU_ABI_GCC_2_ANCIENT 0x00020000 32 #define B_HAIKU_ABI_GCC_2_BEOS 0x00020001 33 #define B_HAIKU_ABI_GCC_2_HAIKU 0x00020002 34 35 #if __GNUC__ == 2 36 # define B_HAIKU_ABI B_HAIKU_ABI_GCC_2_HAIKU 37 #elif __GNUC__ == 4 38 # define B_HAIKU_ABI B_HAIKU_ABI_GCC_4 39 #else 40 # error Unsupported gcc version! 41 #endif 42 43 44 #define _UNUSED(argument) argument 45 #define _PACKED __attribute__((packed)) 46 #define _PRINTFLIKE(_format_, _args_) \ 47 __attribute__((format(__printf__, _format_, _args_))) 48 #define _EXPORT 49 #define _IMPORT 50 51 #define B_DEFINE_SYMBOL_VERSION(function, versionedSymbol) \ 52 __asm__(".symver " function "," versionedSymbol) 53 54 #endif /* _BE_BUILD_H */ 55