nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone
0dc71c
From afda7f47601f36a98074d8d21ffb640256f02267 Mon Sep 17 00:00:00 2001
0dc71c
From: Andrey Borzenkov <arvidjaar@gmail.com>
0dc71c
Date: Tue, 7 Jan 2014 18:43:02 +0400
0dc71c
Subject: [PATCH 012/143] fix 32 bit compilation on MinGW-w64
0dc71c
0dc71c
Use _FILE_OFFSET_BITS macro to distinguish between native MinGW and
0dc71c
32 bit under MinGW-64. The latter does not require fseeko/ftello
0dc71c
redefinition which it already does in case of _FILE_OFFSET_BITS=64.
0dc71c
---
0dc71c
 ChangeLog                             | 5 +++++
0dc71c
 include/grub/osdep/hostfile_windows.h | 3 +++
0dc71c
 2 files changed, 8 insertions(+)
0dc71c
0dc71c
diff --git a/ChangeLog b/ChangeLog
0dc71c
index 8c1ecec..e87f0a7 100644
0dc71c
--- a/ChangeLog
0dc71c
+++ b/ChangeLog
0dc71c
@@ -1,3 +1,8 @@
0dc71c
+2014-01-07  Andrey Borzenkov <arvidjaar@gmail.com>
0dc71c
+
0dc71c
+	* include/grub/osdep/hostfile_windows.h: Do not redefine fseeko/ftello
0dc71c
+	on MinGW-64 when compiling for 32 bits.
0dc71c
+
0dc71c
 2013-12-30  Andrey Borzenkov <arvidjaar@gmail.com>
0dc71c
 
0dc71c
 	* grub-core/Makefile.core.def: strip .eh_frame section for arm64-efi.
0dc71c
diff --git a/include/grub/osdep/hostfile_windows.h b/include/grub/osdep/hostfile_windows.h
0dc71c
index 36615b2..79efcfa 100644
0dc71c
--- a/include/grub/osdep/hostfile_windows.h
0dc71c
+++ b/include/grub/osdep/hostfile_windows.h
0dc71c
@@ -69,8 +69,11 @@ enum grub_util_fd_open_flags_t
0dc71c
 
0dc71c
 #if defined (__MINGW32__) && !defined (__MINGW64__)
0dc71c
 
0dc71c
+/* 32 bit on MinGW-64 already redefines them if _FILE_OFFSET_BITS=64 */
0dc71c
+#if !defined(_FILE_OFFSET_BITS)
0dc71c
 #define fseeko fseeko64
0dc71c
 #define ftello ftello64
0dc71c
+#endif
0dc71c
 
0dc71c
 #endif
0dc71c
 
0dc71c
-- 
0dc71c
1.9.3
0dc71c