Message ID | 1320088682-12958-3-git-send-email-andreas.faerber@web.de |
---|---|
State | New |
Headers | show |
Am 31.10.2011 20:42, schrieb Peter Maydell: > On 31 October 2011 19:18, Andreas Färber <andreas.faerber@web.de> wrote: >> --- a/fpu/softfloat.h >> +++ b/fpu/softfloat.h >> @@ -54,6 +54,9 @@ these four paragraphs for those parts of this code that are retained. >> | to the same as `int'. >> *----------------------------------------------------------------------------*/ >> typedef uint8_t flag; >> +#ifdef __APPLE__ >> +#define uint16 qemu_uint16 >> +#endif >> typedef uint8_t uint8; >> typedef int8_t int8; >> #ifndef _AIX > > I hate this, but I don't think I quite hate it enough to leave compilation > on Macs broken in 1.0... > > Ideally we should just make a decision about whether we want option > (1) or (2) from > http://permalink.gmane.org/gmane.comp.emulators.qemu/115848 That's what "more general solution" refers to. At this point in time though I'd much prefer to commit a non-intrusive three-line quickfix (which we can easily remove later on) than no solution at all or than to refactor lots of softfloat code. Andreas
On 31 October 2011 19:18, Andreas Färber <andreas.faerber@web.de> wrote: > --- a/fpu/softfloat.h > +++ b/fpu/softfloat.h > @@ -54,6 +54,9 @@ these four paragraphs for those parts of this code that are retained. > | to the same as `int'. > *----------------------------------------------------------------------------*/ > typedef uint8_t flag; > +#ifdef __APPLE__ > +#define uint16 qemu_uint16 > +#endif > typedef uint8_t uint8; > typedef int8_t int8; > #ifndef _AIX I hate this, but I don't think I quite hate it enough to leave compilation on Macs broken in 1.0... Ideally we should just make a decision about whether we want option (1) or (2) from http://permalink.gmane.org/gmane.comp.emulators.qemu/115848 -- PMM
diff --git a/fpu/softfloat.h b/fpu/softfloat.h index 07c2929..5320945 100644 --- a/fpu/softfloat.h +++ b/fpu/softfloat.h @@ -54,6 +54,9 @@ these four paragraphs for those parts of this code that are retained. | to the same as `int'. *----------------------------------------------------------------------------*/ typedef uint8_t flag; +#ifdef __APPLE__ +#define uint16 qemu_uint16 +#endif typedef uint8_t uint8; typedef int8_t int8; #ifndef _AIX
In file included from ./bswap.h:7, from ./qemu-common.h:106, from ./qemu-aio.h:17, from ./Block.h:4, from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:28, from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:218, from /System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20, from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21, from /System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:17, from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:81, from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12, from ui/cocoa.m:25: /Users/andreas/QEMU/qemu/fpu/softfloat.h:60: error: conflicting types for ‘uint16’ /System/Library/Frameworks/Security.framework/Headers/cssmconfig.h:73: error: previous declaration of ‘uint16’ was here make: *** [ui/cocoa.o] Error 1 Apple's FSEvents.h has #include <Block.h>, which wants /usr/include/Block.h but due to case-insensitive file system and include path jungle gets QEMU's ./block.h, which in turn includes softfloat.h indirectly. Therefore work around the conflict in softfloat.h itself by renaming specifically uint16 on Darwin to qemu_uint16. This fixes the build until we have a more general solution. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Cc: Juan Pineda <juan@logician.com> Cc: Peter Maydell <peter.maydell@linaro.org> --- fpu/softfloat.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)