From: Bruno Haible Date: Sat, 6 Oct 2018 08:18:06 +0000 (+0200) Subject: Fix a build failure on mingw with -O0. X-Git-Tag: v0.20~365 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4cc09d841e6441367cc6c2958df2004b243ea1d;p=thirdparty%2Fgettext.git 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" {}. --- 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. */"