[Spice-devel] [PATCH 5/6] mingw: don't try to redefine alloca

Christophe Fergeau cfergeau at redhat.com
Wed Feb 29 10:01:58 PST 2012


mingw already has a #define alloca __builtin_alloca so trying to
redefine it triggers a warning.
---
 common/mem.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/common/mem.h b/common/mem.h
index 980ea13..af89ba6 100644
--- a/common/mem.h
+++ b/common/mem.h
@@ -41,7 +41,9 @@ extern "C" {
 #ifdef HAVE_ALLOCA_H
 # include <alloca.h>
 #elif defined __GNUC__
+#if !defined alloca
 # define alloca __builtin_alloca
+#endif
 #elif defined _AIX
 # define alloca __alloca
 #elif defined _MSC_VER
-- 
1.7.7.6



More information about the Spice-devel mailing list