* [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
* Re: [PATCH] fix 32 bit compilation on MinGW-w64
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
1 sibling, 0 replies; 6+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2014-01-07 13:32 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 915 bytes --]
Go ahead
On 29.12.2013 11:10, Andrey Borzenkov wrote:
> 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
>
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Use _W64 to detect MinGW W64-32 instead of _FILE_OFFSET_BITS
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 ` Andrey Borzenkov
2014-01-18 15:22 ` Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 1 reply; 6+ messages in thread
From: Andrey Borzenkov @ 2014-01-14 3:05 UTC (permalink / raw)
To: grub-devel
In 94cee4a4c201bb506377b2c26e072eee8cb19d6f I overlooked that config.h
unconditionally sets _FILE_OFFSET_BITS, so it cannot be used to detect
MinGW W64 environment. It looks like Emacs folks already found
solution; instead of _FILE_OFFSET_BITS use _W64 as suggested in
http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00723.html
---
include/grub/osdep/hostfile_windows.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/grub/osdep/hostfile_windows.h b/include/grub/osdep/hostfile_windows.h
index 79efcfa..bf6451b 100644
--- a/include/grub/osdep/hostfile_windows.h
+++ b/include/grub/osdep/hostfile_windows.h
@@ -69,8 +69,8 @@ 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)
+/* 32 bit on Mingw-w64 already redefines them if _FILE_OFFSET_BITS=64 */
+#ifndef _W64
#define fseeko fseeko64
#define ftello ftello64
#endif
--
tg: (0776112..) u/mingw/use-_w64-for-mingw-w64 (depends on: master)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Use _W64 to detect MinGW W64-32 instead of _FILE_OFFSET_BITS
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
0 siblings, 1 reply; 6+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2014-01-18 15:22 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 147 bytes --]
On 14.01.2014 04:05, Andrey Borzenkov wrote:
> +/* 32 bit on Mingw-w64 already redefines them if _FILE_OFFSET_BITS=64 */
Do you mean 64-bit ?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 274 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Use _W64 to detect MinGW W64-32 instead of _FILE_OFFSET_BITS
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
0 siblings, 1 reply; 6+ messages in thread
From: Andrey Borzenkov @ 2014-01-18 15:53 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 529 bytes --]
В Sat, 18 Jan 2014 16:22:21 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> On 14.01.2014 04:05, Andrey Borzenkov wrote:
> > +/* 32 bit on Mingw-w64 already redefines them if _FILE_OFFSET_BITS=64 */
> Do you mean 64-bit ?
>
No, I mean exactly 32 bit. 'Mingw w64" is project (toolchain) name; it
can produce both 32 bit and 64 bit programs. 64 bit is already covered
by __MINGW64__, but in 32 bit case we need to differentiate between
native MinGW and Mingw w64 building for 32 bit.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Use _W64 to detect MinGW W64-32 instead of _FILE_OFFSET_BITS
2014-01-18 15:53 ` Andrey Borzenkov
@ 2014-01-18 15:56 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 6+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2014-01-18 15:56 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 785 bytes --]
On 18.01.2014 16:53, Andrey Borzenkov wrote:
> В Sat, 18 Jan 2014 16:22:21 +0100
> Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
>
>> On 14.01.2014 04:05, Andrey Borzenkov wrote:
>>> +/* 32 bit on Mingw-w64 already redefines them if _FILE_OFFSET_BITS=64 */
>> Do you mean 64-bit ?
>>
>
> No, I mean exactly 32 bit. 'Mingw w64" is project (toolchain) name; it
> can produce both 32 bit and 64 bit programs. 64 bit is already covered
> by __MINGW64__, but in 32 bit case we need to differentiate between
> native MinGW and Mingw w64 building for 32 bit.
>
I see.
Go ahead.
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 274 bytes --]
^ permalink raw reply [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).