[cfe-dev] Implementation of stdbool.h

Chris Lattner clattner at apple.com
Thu Feb 28 22:13:28 PST 2008


On Feb 28, 2008, at 10:10 PM, Keith Bauer wrote:

> On Fri, Feb 29, 2008 at 6:57 PM, Chris Lattner <clattner at apple.com>  
> wrote:
>> Ok, I'll see what I can do with argv[0].  If this doesn't work on
>> windows, hopefully someone working there can help :)
>
> Unfortunately, the argv[0] thing is fragile -- there's no requirement
> that the invoking process fill either argv[0] or PATH in such a way
> that we can find the executable.
>
> It sounds like Mac OS X, Linux and Windows have good robust
> platform-specific solutions; is there anyone out there who can comment
> on the other OSes (I guess Solaris and various BSDs at least are
> interesting).
>
> Or perhaps we have to admit that POSIX programs hard-code absolute
> paths to their data files with good reason ;)

I can't believe this, there has to be a somewhat decent way, tell me  
it's so! ;-)

> There is also the issue of clang-as-library, where should it look for
> its data files then?  Or is this handled outside that scope?

It is client specific.  All the code I add will be in clang.cpp, not  
one of the libraries.

-Chris 



More information about the cfe-dev mailing list