[cfe-dev] diff for clang environment variables/paths

Benoit Boissinot bboissin at gmail.com
Wed Aug 22 17:04:01 PDT 2007

On 8/22/07, Kelly Wilson <wilsonk at cpsc.ucalgary.ca> wrote:
> Hello fellow clangers ;)
> I am just sending a quick diff for a couple clang.cpp "FIXME"'s. Not sure
> if the use of the system()/getenv() calls are appropriate but I just
> wanted this to work for my setup. Let me know if this is not an
> acceptable patch.
> Not really tested on Mac OS X but the syscalls exist and 'gcc -v' replies
> with the correct info, I think.

Using fork, execv("cpp", ["cpp", "-v"]) and reading stderr, you might
be able to have the same functionality without creating a tempfile
with a fixed name and using system().



More information about the cfe-dev mailing list