Reported at <https://savannah.gnu.org/bugs/?36443>.
Fix suggested by Evgeny Grin <k2k@narod.ru>
in <https://savannah.gnu.org/bugs/?36443#comment4>.
* gnulib-local/build-aux/moopp (func_emit_source_h): Wrap the function
declarations in extern "C" {}.
echo "#endif"
echo
echo "/* Functions that invoke the methods. */"
+ echo "#ifdef __cplusplus"
+ echo "extern \"C\" {"
+ echo "#endif"
echo "$all_methods" | sed -e "$sed_remove_empty_lines" -e 's/\([^A-Za-z_0-9]\)\([A-Za-z_0-9][A-Za-z_0-9]*\)[ ]*([^,)]*/\1'"${main_classname}_"'\2 ('"${main_classname}_t first_arg"'/' -e 's,^,extern ,' -e 's,$,;,'
+ echo "#ifdef __cplusplus"
+ echo "}"
+ echo "#endif"
echo
# Now come the implementation details.
echo "/* Type representing an implementation of ${main_classname}_t. */"