In some versions of GCC it is an error to use extern inside an extern declaration list (a "double extern"). When r_common.h was compiled as part of a C++ source file, a double extern was occurring, causing the build to fail.
Added the macro DENG_EXTERN_C that can be used both in C and C++ sources to specify global extern'd variables and functions with C linkage. It cannot be used inside an extern "C" block, though.
Fixed|GCC: Build errors related to extern
In some versions of GCC it is an error to use extern inside an extern
declaration list (a "double extern"). When r_common.h was compiled as
part of a C++ source file, a double extern was occurring, causing the
build to fail.
Added the macro DENG_EXTERN_C that can be used both in C and C++ sources
to specify global extern'd variables and functions with C linkage. It
cannot be used inside an extern "C" block, though.