Recent addition of the GCC __attribute__(alloc_size) to some functions
in mem.h broke the build when using Clang 3.5. This commit introduces
configure-time checks for all GCC attributes used in the Serval source
code, and adapts accordingly.
Internally the strbuf_local_buf(x) macro uses sizeof(x) to determine
the size of the buffer, but this will give the wrong behaviour if x
is a pointer (char *x), not an array (char x[]). With this change,
invoking it with a pointer will cause a compile error.
The safety check makes use of the GCC extensions: __builtin_object_size()
and __attribute__((alloc_size(n)). Under non-GCC compilers, the safety
check will not be performed.
Config Object Model parser now returns bitmask result of CFxxx flags and only
allocates root node if the config file is non-empty.
Added emalloc_zero().