011fe81
From bb3e1a1e8448f3ea9489b5ebfcec799196bc862f Mon Sep 17 00:00:00 2001
78a3d7d
From: Andrey Borzenkov <arvidjaar@gmail.com>
78a3d7d
Date: Sat, 18 Jan 2014 20:04:11 +0400
58fe9aa
Subject: [PATCH 025/152] Use _W64 to detect MinGW W64-32 instead of
78a3d7d
 _FILE_OFFSET_BITS
78a3d7d
78a3d7d
In 94cee4a4c201bb506377b2c26e072eee8cb19d6f I overlooked that config.h
78a3d7d
unconditionally sets _FILE_OFFSET_BITS, so it cannot be used to detect
78a3d7d
MinGW W64 environment. It looks like Emacs folks already found
78a3d7d
solution; instead of _FILE_OFFSET_BITS use _W64 as suggested in
78a3d7d
http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00723.html
78a3d7d
---
78a3d7d
 ChangeLog                             | 5 +++++
78a3d7d
 include/grub/osdep/hostfile_windows.h | 4 ++--
78a3d7d
 2 files changed, 7 insertions(+), 2 deletions(-)
78a3d7d
78a3d7d
diff --git a/ChangeLog b/ChangeLog
011fe81
index fcbf220..5aac7c1 100644
78a3d7d
--- a/ChangeLog
78a3d7d
+++ b/ChangeLog
78a3d7d
@@ -1,3 +1,8 @@
78a3d7d
+2014-01-18  Andrey Borzenkov <arvidjaar@gmail.com>
78a3d7d
+
78a3d7d
+	* include/grub/osdep/hostfile_windows.h: Use _W64 instead of
78a3d7d
+	FILE_OFFSET_BITS to differentiate between native MinGW and Mingw W64.
78a3d7d
+
78a3d7d
 2014-01-18  Vladimir Serbinenko  <phcoder@gmail.com>
78a3d7d
 
78a3d7d
 	* grub-core/term/terminfo.c: Recognize keys F1-F12.
78a3d7d
diff --git a/include/grub/osdep/hostfile_windows.h b/include/grub/osdep/hostfile_windows.h
78a3d7d
index 79efcfa..bf6451b 100644
78a3d7d
--- a/include/grub/osdep/hostfile_windows.h
78a3d7d
+++ b/include/grub/osdep/hostfile_windows.h
78a3d7d
@@ -69,8 +69,8 @@ enum grub_util_fd_open_flags_t
78a3d7d
 
78a3d7d
 #if defined (__MINGW32__) && !defined (__MINGW64__)
78a3d7d
 
78a3d7d
-/* 32 bit on MinGW-64 already redefines them if _FILE_OFFSET_BITS=64 */
78a3d7d
-#if !defined(_FILE_OFFSET_BITS)
78a3d7d
+/* 32 bit on Mingw-w64 already redefines them if _FILE_OFFSET_BITS=64 */
78a3d7d
+#ifndef _W64
78a3d7d
 #define fseeko fseeko64
78a3d7d
 #define ftello ftello64
78a3d7d
 #endif
78a3d7d
-- 
37b39b7
1.9.3
78a3d7d