The declared.sh file has a problem extracting the first 'extern ...' declaration within an 'extern "C" {' ... '}' block. The line concatenation step produces this intermediate result:
--------------------------------------------------------------------- #if defined _WIN32 && ! defined __CYGWIN__ # include <io.h> # ifdef __cplusplus extern "C" { # endif # if !((defined isatty && defined _GL_UNISTD_H) || defined GNULIB_overrides_isatty) extern int libtextstyle_isatty (int fd); # undef isatty # define isatty libtextstyle_isatty # endif # ifdef __cplusplus } # endif #endif --------------------------------------------------------------------- and the next step does not find the declaration of libtextstyle_isatty in this mess. This patch fixes it. 2021-06-19 Bruno Haible <br...@clisp.org> declared.sh: Allow parsing 'extern "C"' lines. * build-aux/declared.sh: Don't concatenate lines to an 'extern "C" {' line. diff --git a/build-aux/declared.sh b/build-aux/declared.sh index 204e628..0d3e70d 100755 --- a/build-aux/declared.sh +++ b/build-aux/declared.sh @@ -120,11 +120,11 @@ test "$sed_result" = 'aaa' \ # A sed expression that joins 'extern' declarations that are broken over # several lines. sed_join_multiline_externs=' -/^extern [^;]*$/{ +/^extern [^;"]*$/{ :a N s/\n/ /g - /^extern [^;]*$/{ + /^extern [^;"]*$/{ ba } }'