AugustusHuang / ccons

An interactive console for C, automatically exported from code.google.com/p/ccons
MIT License
0 stars 0 forks source link

Problem with stdarg.h #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try #include <stdarg.h>

What is the expected output? What do you see instead?
stdarg.h should be read and processed, but instead ccons tells a fatal error 
that stdarg.h is not 
found

What version of the product are you using? On what operating system?
llvm svn r71077
clang svn r71065
ccons svn r165

Please provide any additional information below.

Original issue reported on code.google.com by lukh...@gmail.com on 6 May 2009 at 7:39

GoogleCodeExporter commented 9 years ago
One quick hack is to modify /usr/include/stdarg.h and /usr/include/float.h; 
they both look like:

  #if defined(__GNUC__)
  #include_next <stdarg.h>

replace the #include_next with something like:

  #include </Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.2.1/include/stdarg.h>

And now stdarg.h will now be included fine on OS X.

This also enables, among many other things, the loading of sqlite3 and 
CoreFoundation.

Original comment by lukh...@gmail.com on 6 May 2009 at 8:00

GoogleCodeExporter commented 9 years ago
The right thing to do here is to take clang's own headers. This leaves us with 
a runtime 
dependency on clang and we need to find out where these headers are.

The attached patch gets the path from llvm-config and hardcodes it into the 
binary.

Original comment by benny....@gmail.com on 8 Jul 2009 at 10:33

Attachments: