qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block/raw-posix.c: Avoid nonstandard LONG_LONG_MAX
@ 2014-05-23 16:15 Peter Maydell
  2014-05-26 11:58 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2014-05-23 16:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Peter Bartoli, Andreas Färber, Stefan Hajnoczi,
	patches

In the MacOSX specific code in raw-posix.c we use the define
LONG_LONG_MAX. This is actually a non-standard pre-C99 define;
switch to using the standard LLONG_MAX instead.

This apparently fixes a compilation failure with certain
compiler/OS versions (though it is unclear which).

Reported-by: Peter Bartoli <peter@bartoli.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 block/raw-posix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/raw-posix.c b/block/raw-posix.c
index 6586a0c..b7f0f26 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -1192,7 +1192,7 @@ again:
         if (size == 0)
 #endif
 #if defined(__APPLE__) && defined(__MACH__)
-        size = LONG_LONG_MAX;
+        size = LLONG_MAX;
 #else
         size = lseek(fd, 0LL, SEEK_END);
 #endif
-- 
1.8.5.4

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

* Re: [Qemu-devel] [PATCH] block/raw-posix.c: Avoid nonstandard LONG_LONG_MAX
  2014-05-23 16:15 [Qemu-devel] [PATCH] block/raw-posix.c: Avoid nonstandard LONG_LONG_MAX Peter Maydell
@ 2014-05-26 11:58 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2014-05-26 11:58 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Kevin Wolf, Peter Bartoli, Andreas Färber, qemu-devel,
	patches

On Fri, May 23, 2014 at 05:15:41PM +0100, Peter Maydell wrote:
> In the MacOSX specific code in raw-posix.c we use the define
> LONG_LONG_MAX. This is actually a non-standard pre-C99 define;
> switch to using the standard LLONG_MAX instead.
> 
> This apparently fixes a compilation failure with certain
> compiler/OS versions (though it is unclear which).
> 
> Reported-by: Peter Bartoli <peter@bartoli.org>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  block/raw-posix.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

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

end of thread, other threads:[~2014-05-26 11:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-23 16:15 [Qemu-devel] [PATCH] block/raw-posix.c: Avoid nonstandard LONG_LONG_MAX Peter Maydell
2014-05-26 11:58 ` Stefan Hajnoczi

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).