]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
fix 32 bit compilation on MinGW-w64
authorAndrey Borzenkov <arvidjaar@gmail.com>
Tue, 7 Jan 2014 14:43:02 +0000 (18:43 +0400)
committerAndrey Borzenkov <arvidjaar@gmail.com>
Tue, 7 Jan 2014 14:44:51 +0000 (18:44 +0400)
Use _FILE_OFFSET_BITS macro to distinguish between native MinGW and
32 bit under MinGW-64. The latter does not require fseeko/ftello
redefinition which it already does in case of _FILE_OFFSET_BITS=64.

ChangeLog
include/grub/osdep/hostfile_windows.h

index 8c1ececa1ed6b1e2ef1db3545409644ab329ca98..e87f0a7a4a4e78f9b2207c97abc8c9d0cdb0f188 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-01-07  Andrey Borzenkov <arvidjaar@gmail.com>
+
+       * include/grub/osdep/hostfile_windows.h: Do not redefine fseeko/ftello
+       on MinGW-64 when compiling for 32 bits.
+
 2013-12-30  Andrey Borzenkov <arvidjaar@gmail.com>
 
        * grub-core/Makefile.core.def: strip .eh_frame section for arm64-efi.
index 36615b2c451bc60fcab1458842f6f69abb84189f..79efcfa50841f4dc950a7eebefd71ef9faf6a8d7 100644 (file)
@@ -69,8 +69,11 @@ 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)
 #define fseeko fseeko64
 #define ftello ftello64
+#endif
 
 #endif