This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] make alloca.h work with xlc


Patch checked in.

-- Jeff J.

jschopp wrote:
The xlc compiler defines alloca internally. Thus when it encounters the definition in alloca.h it isn't very happy. The simple way to fix this is to add an undef alloca unconditionally before defining it. After making the fix I checked and other libc headers do this regularly as well.

Unlike most of my patches this one isn't cell spu specific, but is trivial enough it shouldn't raise any objections.

2006-12-13  Joel Schopp <jschopp@austin.ibm.com>
        * newlib/include/alloca.h: add undef alloca to work with xlc



------------------------------------------------------------------------

Index: newlib-1.14.0/newlib/libc/include/alloca.h
===================================================================
--- newlib-1.14.0.orig/newlib/libc/include/alloca.h
+++ newlib-1.14.0/newlib/libc/include/alloca.h
@@ -10,6 +10,8 @@
#include "_ansi.h"
#include <sys/reent.h>
+#undef alloca
+
#ifdef __GNUC__
#define alloca(size) __builtin_alloca(size)
#else


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]