grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@gmail.com>
To: grub-devel@gnu.org
Subject: [PATCH] Use _W64 to detect MinGW W64-32 instead of _FILE_OFFSET_BITS
Date: Tue, 14 Jan 2014 07:05:46 +0400	[thread overview]
Message-ID: <1389668746-1117-1-git-send-email-arvidjaar@gmail.com> (raw)
In-Reply-To: <1388311800-27081-1-git-send-email-arvidjaar@gmail.com>

In 94cee4a4c201bb506377b2c26e072eee8cb19d6f I overlooked that config.h
unconditionally sets _FILE_OFFSET_BITS, so it cannot be used to detect
MinGW W64 environment. It looks like Emacs folks already found
solution; instead of _FILE_OFFSET_BITS use _W64 as suggested in
http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00723.html

---
 include/grub/osdep/hostfile_windows.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/grub/osdep/hostfile_windows.h b/include/grub/osdep/hostfile_windows.h
index 79efcfa..bf6451b 100644
--- a/include/grub/osdep/hostfile_windows.h
+++ b/include/grub/osdep/hostfile_windows.h
@@ -69,8 +69,8 @@ enum grub_util_fd_open_flags_t
 
 #if defined (__MINGW32__) && !defined (__MINGW64__)
 
-/* 32 bit on MinGW-64 already redefines them if _FILE_OFFSET_BITS=64 */
-#if !defined(_FILE_OFFSET_BITS)
+/* 32 bit on Mingw-w64 already redefines them if _FILE_OFFSET_BITS=64 */
+#ifndef _W64
 #define fseeko fseeko64
 #define ftello ftello64
 #endif
-- 
tg: (0776112..) u/mingw/use-_w64-for-mingw-w64 (depends on: master)


  parent reply	other threads:[~2014-01-14  3:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-29 10:10 [PATCH] fix 32 bit compilation on MinGW-w64 Andrey Borzenkov
2014-01-07 13:32 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-14  3:05 ` Andrey Borzenkov [this message]
2014-01-18 15:22   ` [PATCH] Use _W64 to detect MinGW W64-32 instead of _FILE_OFFSET_BITS Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-18 15:53     ` Andrey Borzenkov
2014-01-18 15:56       ` Vladimir 'φ-coder/phcoder' Serbinenko

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=1389668746-1117-1-git-send-email-arvidjaar@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.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 NNTP newsgroup(s).