1 #ifndef __OT_LAYOUT_CONFIG_H__
2 #define __OT_LAYOUT_CONFIG_H__
4 /************************************************************************/
5 /************************************************************************/
7 /***** CONFIGURATION MACROS *****/
9 /************************************************************************/
10 /************************************************************************/
13 # define OTL_BEGIN_HEADER extern "C" {
15 # define OTL_BEGIN_HEADER /* nothing */
19 # define OTL_END_HEADER }
21 # define OTL_END_HEADER /* nothing */
26 # define OTL_API( x ) extern "C"
28 # define OTL_API( x ) extern x
33 # define OTL_APIDEF( x ) x
37 # define OTL_LOCAL( x ) extern x
41 # define OTL_LOCALDEF( x ) x
44 #define OTL_BEGIN_STMNT do {
45 #define OTL_END_STMNT } while (0)
46 #define OTL_DUMMY_STMNT OTL_BEGIN_STMNT OTL_END_STMNT
48 #define OTL_UNUSED( x ) (x)=(x)
49 #define OTL_UNUSED_CONST(x) (void)(x)
53 #if UINT_MAX == 0xFFFFU
54 # define OTL_SIZEOF_INT 2
55 #elif UINT_MAX == 0xFFFFFFFFU
56 # define OTL_SIZEOF_INT 4
57 #elif UINT_MAX > 0xFFFFFFFFU && UINT_MAX == 0xFFFFFFFFFFFFFFFFU
58 # define OTL_SIZEOF_INT 8
60 # error "unsupported number of bytes in 'int' type!"
63 #if ULONG_MAX == 0xFFFFFFFFU
64 # define OTL_SIZEOF_LONG 4
65 #elif ULONG_MAX > 0xFFFFFFFFU && ULONG_MAX == 0xFFFFFFFFFFFFFFFFU
66 # define OTL_SIZEOF_LONG 8
68 # error "unsupported number of bytes in 'long' type!"
72 #define OTL_jmp_buf jmp_buf
73 #define otl_setjmp setjmp
74 #define otl_longjmp longjmp
78 #endif /* __OT_LAYOUT_CONFIG_H__ */