public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowitz@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] Fix off_t typedef on Cygwin64
Date: Tue, 30 Aug 2016 15:36:00 -0000	[thread overview]
Message-ID: <20160830153639.18070.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=3d3ab829689f2563cfbfb65ce440cff8299a4ae9

commit 3d3ab829689f2563cfbfb65ce440cff8299a4ae9
Author: Yaakov Selkowitz <yselkowi@redhat.com>
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 <yselkowi@redhat.com>

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;


                 reply	other threads:[~2016-08-30 15:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160830153639.18070.qmail@sourceware.org \
    --to=yselkowitz@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).