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

a85e8e
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
a85e8e
Subject: [PATCH 025/260] Use _W64 to detect MinGW W64-32 instead of
a85e8e
 _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
---
a85e8e
 ChangeLog                             | 5 +++++
a85e8e
 include/grub/osdep/hostfile_windows.h | 4 ++--
a85e8e
 2 files changed, 7 insertions(+), 2 deletions(-)
a85e8e
a85e8e
diff --git a/ChangeLog b/ChangeLog
a85e8e
index fcbf2207b..5aac7c1d8 100644
a85e8e
--- a/ChangeLog
a85e8e
+++ b/ChangeLog
a85e8e
@@ -1,3 +1,8 @@
a85e8e
+2014-01-18  Andrey Borzenkov <arvidjaar@gmail.com>
a85e8e
+
a85e8e
+	* include/grub/osdep/hostfile_windows.h: Use _W64 instead of
a85e8e
+	FILE_OFFSET_BITS to differentiate between native MinGW and Mingw W64.
a85e8e
+
a85e8e
 2014-01-18  Vladimir Serbinenko  <phcoder@gmail.com>
a85e8e
 
a85e8e
 	* 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
a85e8e
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
a85e8e
-- 
a85e8e
2.13.0
a85e8e