From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18130 invoked by alias); 30 Aug 2016 15:36:40 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 18072 invoked by uid 9642); 30 Aug 2016 15:36:39 -0000 Date: Tue, 30 Aug 2016 15:36:00 -0000 Message-ID: <20160830153639.18070.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Yaakov Selkowitz To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Fix off_t typedef on Cygwin64 X-Act-Checkin: newlib-cygwin X-Git-Author: Yaakov Selkowitz X-Git-Refname: refs/heads/master X-Git-Oldrev: de8b81950dcf0418f5412cfeab7bd6950c296905 X-Git-Newrev: 3d3ab829689f2563cfbfb65ce440cff8299a4ae9 X-SW-Source: 2016-q3/txt/msg00077.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=3d3ab829689f2563cfbfb65ce440cff8299a4ae9 commit 3d3ab829689f2563cfbfb65ce440cff8299a4ae9 Author: Yaakov Selkowitz Date: Mon Aug 29 15:30:59 2016 -0500 Fix off_t typedef on Cygwin64 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 Diff: --- newlib/libc/include/sys/_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;