From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 2A7CB1F8C6 for ; Sun, 20 Jun 2021 01:23:23 +0000 (UTC) Received: from localhost ([::1]:57160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lumBG-0005Ia-9I for normalperson@yhbt.net; Sat, 19 Jun 2021 21:23:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lumBD-0005ID-Fz for bug-gnulib@gnu.org; Sat, 19 Jun 2021 21:23:19 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.20]:25628) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lumBB-00010Q-Py for bug-gnulib@gnu.org; Sat, 19 Jun 2021 21:23:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1624152196; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=ejQmUpJ7wArpkBCkqc6FAXuRopTHg7+qNEapWdfik0k=; b=E8JOJ937udWxWNzp4DJbbQTPXHRepiJLK2+XFyLDSDlqKM9YMGGZat0I62ofLw8VNl itEctmOBbUZWhFAwtb5CHLPFS08XixosBR51Gvq+p+fAO33q93dDK3Zs5EmZzmHkvaw/ 8O75PxIIBFf1rB5v7AXZMA/x0qTIWSViOjDAro1b4f/PeE3cpC0DcYHzIQigGWAFUzuk R4SOxM0UOAYw5rBq8SnNeQQJWYFkv5aSkx9huMFBFomiRfqjHGmCn/Ql2MBaGqZMZ7eR 318iZ+qNL1t+InFC1XsvW6q9DBV8R+jop2SyQuWIn6Lk8fLlMqRx4fFwDrs9nRMGBYvf 2sAg== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOGKf9yfs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 47.27.3 DYNA|AUTH) with ESMTPSA id 401b97x5K1NF83V (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Sun, 20 Jun 2021 03:23:15 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org Subject: declared.sh: Allow parsing 'extern "C"' lines Date: Sun, 20 Jun 2021 03:23:15 +0200 Message-ID: <4104549.e3xb1KOkY4@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-210-generic; KDE/5.18.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=85.215.255.20; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" 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 # 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 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 } }'