grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix 32 bit compilation on MinGW-w64
@ 2013-12-29 10:10 Andrey Borzenkov
  2014-01-07 13:32 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2014-01-14  3:05 ` [PATCH] Use _W64 to detect MinGW W64-32 instead of _FILE_OFFSET_BITS Andrey Borzenkov
  0 siblings, 2 replies; 6+ messages in thread
From: Andrey Borzenkov @ 2013-12-29 10:10 UTC (permalink / raw)
  To: grub-devel

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.

---
 include/grub/osdep/hostfile_windows.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/grub/osdep/hostfile_windows.h b/include/grub/osdep/hostfile_windows.h
index 36615b2..79efcfa 100644
--- a/include/grub/osdep/hostfile_windows.h
+++ b/include/grub/osdep/hostfile_windows.h
@@ -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
 
-- 
tg: (093dec7..) u/mingw/fseeko (depends on: master)


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-01-18 15:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-29 10:10 [PATCH] fix 32 bit compilation on MinGW-w64 Andrey Borzenkov
2014-01-07 13:32 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-14  3:05 ` [PATCH] Use _W64 to detect MinGW W64-32 instead of _FILE_OFFSET_BITS Andrey Borzenkov
2014-01-18 15:22   ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-18 15:53     ` Andrey Borzenkov
2014-01-18 15:56       ` Vladimir 'φ-coder/phcoder' Serbinenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).