1 // Macros for correct module ordering.
6 // global constructor/destructor naming.
7 #include "cln/config.h"
9 // Concatenation of macroexpanded tokens.
10 // Equivalent to CL_CONCAT in src/base/cl_macros.h which we do not want
11 // to expose, however.
12 #define CL_CONCATENATE_(xxx,yyy) xxx##yyy
13 #define CL_CONCATENATE(xxx,yyy) CL_CONCATENATE_(xxx,yyy)
15 // Sometimes a link time dependency is needed, but without requirements
16 // on initialization order.
18 // CL_FORCE_LINK(dummy,external_variable)
19 // forces a link time reference to the external_variable.
22 // This definition does not work. It gets optimized away by g++ 3.1.
23 #define CL_FORCE_LINK(dummy,external_variable) \
24 static const void* const dummy[] = { &dummy, &external_variable };
26 #define CL_FORCE_LINK(dummy,external_variable) \
30 if ((void*) &external_variable == (void*) this) \
34 CL_CONCATENATE(dummy,_instance);
37 #endif /* _CL_MODULES_H */