From patchwork Mon Aug 29 20:41:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yaakov Selkowitz X-Patchwork-Id: 74924 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1810853qga; Mon, 29 Aug 2016 13:42:19 -0700 (PDT) X-Received: by 10.98.100.67 with SMTP id y64mr35889564pfb.84.1472503339712; Mon, 29 Aug 2016 13:42:19 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id x76si40887691pfd.200.2016.08.29.13.42.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Aug 2016 13:42:19 -0700 (PDT) Received-SPF: pass (google.com: domain of newlib-return-14074-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of newlib-return-14074-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=newlib-return-14074-patch=linaro.org@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=tIeoT+0HYWKOCLnv+GKCgfGJAOChK+G8JgP8cwfo4wBDhtGogM31E m0QQ8iX+3ZdoGBZBoCOl92fMd8my3HDCpX0gLVM5KZZu+Vm4EdcBl60wccCDB7S5 IM1LXGIxKEHEArJzBnO4UyjHNQr9O05uLLDMfsvUC8hzcyMxunnNPQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; s=default; bh=1CioBvz79THwVeQ5oac6fpD1pX0=; b=FQSAeaYXlcr3779xaK0bpX97RKFj Wx8KN3PMsbj00oCasmukon6SR86HQ9ACTpkwuQZoP0xAADhi8srOsQjY4zTX/lMI Jo6mVwwX5RoXnRXDmDXI8AqdUmXxH5KCfl38j9jidl56UHx45N5f3XcG5tVweLQl Uouee4GkFisDNqw= Received: (qmail 34918 invoked by alias); 29 Aug 2016 20:42:11 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Delivered-To: mailing list newlib@sourceware.org Received: (qmail 34901 invoked by uid 89); 29 Aug 2016 20:42:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sk:yselkow, Hx-languages-length:944 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 29 Aug 2016 20:42:09 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E5C56384D for ; Mon, 29 Aug 2016 20:42:07 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-17.rdu2.redhat.com [10.10.116.17]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7TKg6xJ008184 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 29 Aug 2016 16:42:07 -0400 From: Yaakov Selkowitz To: newlib@sourceware.org Subject: [PATCH] Fix off_t typedef on Cygwin64 Date: Mon, 29 Aug 2016 15:41:54 -0500 Message-Id: <20160829204154.11844-1-yselkowi@redhat.com> While both long and long long are 64-bits on x86_64, they are distinct types, and long was used prior to commit 477463a2011ba81907a753df9ce7a71b6563db54. Changing this breaks the linking of previously compiled C++ functions with off_t arguments on 64-bit Cygwin with newly compiled code, as the mangling of long (l) and long long (x) differ. Signed-off-by: Yaakov Selkowitz --- newlib/libc/include/sys/_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.8.3 diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h index 4bf2bc4..98b93ce 100644 --- a/newlib/libc/include/sys/_types.h +++ b/newlib/libc/include/sys/_types.h @@ -94,7 +94,7 @@ typedef __uint32_t __mode_t; __extension__ typedef long long _off64_t; #endif -#ifdef __CYGWIN__ +#if defined(__CYGWIN__) && !defined(__LP64__) typedef _off64_t __off_t; #else typedef _off_t __off_t;