From patchwork Fri Jun 3 15:41:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Hayward X-Patchwork-Id: 629882 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rLpHF1gbgz9t80 for ; Sat, 4 Jun 2016 01:41:44 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=NsCR9GmT; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :subject:from:to:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=ukAZw874uHmi5VFV 7nQRo497QC9U7SFzx2hWWq6w52Yrikav7Se7FdDxr349DwG7hlH7pKwgBnSx1YFq 3FHYvOUHM2lA6Ko054VG//QsAb81hfYxUP9XtyNr59QGGsEjUSuuLliQXrapqFjo 5SPDqkntrvYdR0xP8mutBpi2Bh8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :subject:from:to:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=ThneV29mOpkDZQm4TK1qPO yJDew=; b=NsCR9GmTvQT+xQakcjR+0haRO5jVrR+NLEkPlhlv011peFRQRDOXne sZ4mF+CxN+FSLw8lPRnWovi1Imv7AyYIYlLYV3Gn3hRyEQtCClBdFJr3LkQXowgx u1sWExzEM9kRgL3bNatDOVsPivobcMtpgVBAnMlCGpMJI5YESMFz4= Received: (qmail 129271 invoked by alias); 3 Jun 2016 15:41:35 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 129262 invoked by uid 89); 3 Jun 2016 15:41:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:789, becuase, Hx-spam-relays-external:ESMTPA X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 03 Jun 2016 15:41:24 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 45011F for ; Fri, 3 Jun 2016 08:41:54 -0700 (PDT) Received: from [10.45.32.211] (e105284-mac.manchester.arm.com [10.45.32.211]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 21DEF3F253 for ; Fri, 3 Jun 2016 08:41:21 -0700 (PDT) User-Agent: Microsoft-MacOutlook/14.6.3.160329 Date: Fri, 03 Jun 2016 16:41:21 +0100 Subject: [PATCH] Fix check_GNU_style.sh for BSD / Mac OS X From: Alan Hayward To: "gcc-patches@gcc.gnu.org" Message-ID: Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit check_GNU_style.sh fails to detect lines >80 chars on BSD / Mac OS X systems. This is becuase paste is being called with an empty delimiter list. Instead \0 should be used. Tested on Ubuntu 14.04 and OS X 10.9.5 contrib/ * check_GNU_style.sh: Fix paste args for BSD Alan diff --git a/contrib/check_GNU_style.sh b/contrib/check_GNU_style.sh index a7478f8f573132aef5ed1010f0cf5b13f08350d4..87a276c9cf47b5e07c4407f740ce05dce 1928c30 100755 --- a/contrib/check_GNU_style.sh +++ b/contrib/check_GNU_style.sh @@ -191,7 +191,7 @@ col (){ # Combine prefix back with long lines. # Filter out empty lines. local found=false - paste -d '' "$tmp2" "$tmp3" \ + paste -d '\0' "$tmp2" "$tmp3" \ | grep -v '^[0-9][0-9]*:+$' \ > "$tmp" && found=true