]> git.proxmox.com Git - qemu.git/commit
arch_init: Fix AltiVec build on Darwin/ppc
authorAndreas Färber <andreas.faerber@web.de>
Sun, 27 May 2012 14:21:02 +0000 (16:21 +0200)
committerAndreas Färber <afaerber@suse.de>
Tue, 29 May 2012 09:38:07 +0000 (11:38 +0200)
commitf283edc4827f6bfa82240e36433d7184ab106b0f
tree3bca6d14081ed6a94ec9bd97575b9cdd99f78937
parent24f50d7ea5896a30b0e78f68884586bb8b40ff97
arch_init: Fix AltiVec build on Darwin/ppc

Commit f29a56147b66845914d0a645bf9b4c5bb9a6af57 (implement
-no-user-config command-line option (v3)) introduced uses of bool
in arch_init.c. Shortly before that usage is support code for
AltiVec (conditional to __ALTIVEC__).

GCC's altivec.h may in a !__APPLE_ALTIVEC__ code path redefine bool,
leading to type mismatches. altivec.h recommends to #undef for C++
compatibility, but doing so in C leads to bool remaining undefined.

Fix by redefining bool to _Bool as mandated for stdbool.h by POSIX.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
arch_init.c