From patchwork Fri Nov 1 17:47:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 287879 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 369812C00DC for ; Sat, 2 Nov 2013 04:47:42 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :date:to:subject:mime-version:content-type :content-transfer-encoding:message-id; q=dns; s=default; b=uRjTn 0ulXTsbQHB84SMmmnw9J4wF+L1xj0/CqhCvzTl7CXeNr5I7uIbwa1+TPLDZAar9/ 3xARB26dGeZJeUiadvJwBHvDbqGjakxdpWsxFwf1Pzya4V/OV7Ild1Upgnyx1rY4 d/3nswVeSyPwJslP0YS0EBdvTQw017rsDaBWx4= 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:from :date:to:subject:mime-version:content-type :content-transfer-encoding:message-id; s=default; bh=zS79asfu7dt Y581XA902ZNuIAoM=; b=Pol0LWM9NDSJr6+jr/4Q9AxUYMW+NSEAbofGjCXWLDz pU7aw5lZCAlLALFzwqFy8/mscLSzVFGLMjsNSsYTy6eGyPo+lbhrpmZJAVLjFOGt Tdi5SZWyU/Vdb+vLbUTOCagB9hZLhoMwWMwPpq2wx6qHws/iwZpiO3M+leOwtTEk = Received: (qmail 1681 invoked by alias); 1 Nov 2013 17:47: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 1664 invoked by uid 89); 1 Nov 2013 17:47:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: multi.imgtec.com Received: from multi.imgtec.com (HELO multi.imgtec.com) (194.200.65.239) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 01 Nov 2013 17:47:33 +0000 From: "Steve Ellcey " Date: Fri, 1 Nov 2013 10:47:26 -0700 To: Subject: [Patch] Fix type of clock_t in timevar.c User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Message-ID: <6c2369fb-2e6d-46d9-8eb1-06de1902aac9@BAMAIL02.ba.imgtec.org> X-SEF-Processed: 7_3_0_01192__2013_11_01_17_47_30 While working on a canadian cross build I ran into a problem with the type of clock_t. If HAVE_CLOCK_T is not defined timevar.c defines it to be int. I think the type should be long. I am using the mingw compilers on linux in my canadian cross build and HAVE_CLOCK_T is not getting set but when building I get a conflict between the definition of clock_t in /usr/i586-mingw32msvc/include/time.h (long) and the definition in timevar.c. Since mingw and linux and glibc and newlib all seem to agree on long I would like to change timevar.c to agree with them. Tested with my canadian cross build and a native x86 linux build. OK to checkin? Steve Ellcey sellcey@mips.com 2013-11-01 Steve Ellcey * timevar.c: Fix type of clock_t. diff --git a/gcc/timevar.c b/gcc/timevar.c index 23b7118..b66f94a 100644 --- a/gcc/timevar.c +++ b/gcc/timevar.c @@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see #include "timevar.h" #ifndef HAVE_CLOCK_T -typedef int clock_t; +typedef long clock_t; #endif #ifndef HAVE_STRUCT_TMS