From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89990 invoked by alias); 21 Apr 2015 11:26:52 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 89977 invoked by uid 89); 21 Apr 2015 11:26:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_HDRS_LCASE,T_MANY_HDRS_LCASE,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mailout1.w1.samsung.com Received: from mailout1.w1.samsung.com (HELO mailout1.w1.samsung.com) (210.118.77.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 21 Apr 2015 11:26:49 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NN500HY3MGLZ690@mailout1.w1.samsung.com> for gcc-patches@gcc.gnu.org; Tue, 21 Apr 2015 12:26:45 +0100 (BST) Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id DB.12.04846.5F336355; Tue, 21 Apr 2015 12:26:45 +0100 (BST) Received: from [106.109.9.145] by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NN500E6HMGKDW90@eusync4.samsung.com>; Tue, 21 Apr 2015 12:26:45 +0100 (BST) Message-id: <553633FB.3050206@samsung.com> Date: Tue, 21 Apr 2015 11:26:00 -0000 From: Yury Gribov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-version: 1.0 To: GCC Patches Cc: Trevor Saunders , Diego Novillo , Tom de Vries Subject: [PATCH] Skip preprocessor directives in mklog Content-type: multipart/mixed; boundary=------------050002000904020106000402 X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg01138.txt.bz2 This is a multi-part message in MIME format. --------------050002000904020106000402 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 245 Hi all, Contrib/mklog is currently faked by preprocessor directives inside functions to produce invalid ChangeLog. The attached patch fixes this. Tested with my local mklog testsuite and http://paste.debian.net/167999/ . Ok to commit? -Y --------------050002000904020106000402 Content-Type: text/x-patch; name="mklog-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mklog-1.diff" Content-length: 817 commit 23a738d05393676e72db82cb527d5fb1b3060e2f Author: Yury Gribov Date: Tue Apr 21 14:17:23 2015 +0300 2015-04-21 Yury Gribov * mklog: Ignore preprocessor directives. diff --git a/contrib/mklog b/contrib/mklog index f7974a7..455614b 100755 --- a/contrib/mklog +++ b/contrib/mklog @@ -131,7 +131,6 @@ sub is_unified_hunk_start { } # Check if line is a top-level declaration. -# TODO: ignore preprocessor directives except maybe #define ? sub is_top_level { my ($function, $is_context_diff) = (@_); if (is_unified_hunk_start ($function) @@ -143,7 +142,7 @@ sub is_top_level { } else { $function =~ s/^.//; } - return $function && $function !~ /^[\s{]/; + return $function && $function !~ /^[\s{#]/; } # Read contents of .diff file --------------050002000904020106000402--