Henrik Bach
2004-Sep-19 00:26 UTC
[LLVMdev] Need for HAVE_MALLOC_H and a rewrite of../Config/alloca.h to handle this define
Hi On win32 the alloca function is prototyped in <malloc.h>. The configure script checks the precence of this header file: ----------------------- ... checking malloc.h usability... yes checking malloc.h presence... yes checking for malloc.h... yes ... ----------------------- Later in the configure script, it checks: ----------------------- ... checking for working alloca.h... no checking for alloca... yes ... ----------------------- It also checks for presence of stdlib: ----------------------- ... checking for stdlib.h... yes ... ----------------------- This gives us these defines in llvm/Config/config.h: ----------------------- #define HAVE_ALLOCA 1 #define HAVE_STDLIB_H 1 ----------------------- On the mingw platform it results in that we get this error when compiling: ----------------------- C:/MinGW/msys/local/src/llvm/lib/Support/FileUtilities.cpp: In function `bool llvm::CheckMagic(const std::string&, const std::string&)': C:/MinGW/msys/local/src/llvm/lib/Support/FileUtilities.cpp:33: error: `alloca' undeclared (first use this function) ----------------------- I don't know whether on certain unix systems that the alloc function is prototyped in stdlib.h. But, when HAVE_STDLIB_H is set on mingw systems we get above error rather than this: ----------------------- The function alloca() is required but not found! ----------------------- This leaves us, that we need a test in the configure script that gives us a define like: HAVE_MALLOC_H and to rewrite llvm/Config/alloca.h to handle this define appropriately. Henrik _________________________________________________________________ F� alle de nye og sjove ikoner med MSN Messenger http://messenger.msn.dk/
Seemingly Similar Threads
- [LLVMdev] Need for HAVE_MALLOC_H and a rewrite of../Config/alloca.hto handle this define
- [LLVMdev] /usr/local/src/llvm/include/Config/alloca.h:42:17:#error "The function alloca()
- [LLVMdev] /usr/local/src/llvm/include/Config/alloca.h:42:17: #error "The function alloca()
- [LLVMdev] Need for HAVE_MALLOC_H and a rewriteof../Config/alloca.hto handle this define
- R 2.0.1 install problem on Solaris 9