[cfe-dev] Implementation of stdbool.h

Keith Bauer onesadcookie at gmail.com
Thu Feb 28 22:10:15 PST 2008


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 ;)

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?

-Keith



More information about the cfe-dev mailing list