From d4cc09d841e6441367cc6c2958df2004b243ea1d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 6 Oct 2018 10:18:06 +0200 Subject: [PATCH] Fix a build failure on mingw with -O0. Reported at . Fix suggested by Evgeny Grin in . * gnulib-local/build-aux/moopp (func_emit_source_h): Wrap the function declarations in extern "C" {}. --- gnulib-local/build-aux/moopp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gnulib-local/build-aux/moopp b/gnulib-local/build-aux/moopp index 8e001a214..70efc11ad 100755 --- a/gnulib-local/build-aux/moopp +++ b/gnulib-local/build-aux/moopp @@ -516,7 +516,13 @@ func_emit_source_h () 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. */" -- 2.47.3