Blame SOURCES/0025-Use-_W64-to-detect-MinGW-W64-32-instead-of-_FILE_OFF.patch

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