Allow tracepoint providers to be compiled with g++
Move enumeration definition out of lttng_ust_lib_ring_buffer_config to
make them visible at global scope for C++ compilers.
Modify designated initializers: reordering initializers, add missing
initializers, reformat nested initializers, in order to make g++
compile.
Relevant discussion:
> So each field need to be listed ? We usually don't put NULL
> initialization for structures that are always in zero-initialized
> memory. (coding style)
This is related to a known issue of g++:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55606 (Bug 55606 - sorry,
unimplemented: non-trivial designated initializers not supported).
g++'s 'trivial designated initializers' means no out-of-order
initialization, no missing
initialization (except the fields on the tail of a struct), and nested
initialization should be done in the form {.foo = {.bar = 1}} instead of
{.foo.bar = 1}. That's why I made such modification.
> Are those changes also compatible with the LLVM c++ compiler ?
Actually, clang++ have designated initializers better supported than g++.
All the modification about designated initializers are not required for
clang++. No need to add NULL initialization, reorder initializations or
change {.foo.bar = 1} into {.foo = {.bar = 1}}. These (ugly) hacks are just
to make g++ happy.
[ Updates done by Mathieu Desnoyers to fix merge conflicts. Updated
README. ]