From ced06b73ec7bc03bdbc54d37856c5941463b01b5 Mon Sep 17 00:00:00 2001 From: John Criswell Date: Thu, 2 Dec 2004 19:02:49 +0000 Subject: [PATCH] Reverting revision 1.209. Including alloca.h on Solaris brings in the prototype of strftime(), which breaks compilation of CBE generated code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18435 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/CBackend/CBackend.cpp | 2 +- lib/Target/CBackend/Writer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index ab7a35aad72..45a29b0a493 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -710,7 +710,7 @@ void CWriter::writeOperand(Value *Operand) { static void generateCompilerSpecificCode(std::ostream& Out) { // Alloca is hard to get, and we don't want to include stdlib.h here... Out << "/* get a declaration for alloca */\n" - << "#if defined(__CYGWIN__) || defined(__APPLE__)\n" + << "#if defined(sun) || defined(__CYGWIN__) || defined(__APPLE__)\n" << "extern void *__builtin_alloca(unsigned long);\n" << "#define alloca(x) __builtin_alloca(x)\n" << "#elif defined(__FreeBSD__)\n" diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index ab7a35aad72..45a29b0a493 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -710,7 +710,7 @@ void CWriter::writeOperand(Value *Operand) { static void generateCompilerSpecificCode(std::ostream& Out) { // Alloca is hard to get, and we don't want to include stdlib.h here... Out << "/* get a declaration for alloca */\n" - << "#if defined(__CYGWIN__) || defined(__APPLE__)\n" + << "#if defined(sun) || defined(__CYGWIN__) || defined(__APPLE__)\n" << "extern void *__builtin_alloca(unsigned long);\n" << "#define alloca(x) __builtin_alloca(x)\n" << "#elif defined(__FreeBSD__)\n"