Re: [RFC] Cleaning up die() error messages
Show 12 quoted lines
> On 10/10/05, Elfyn McBratney <beu@gentoo.org> wrote:
>
>> int main (int argc, char **argv)
>> {
>> set_prog_name(argv[0]);
>
>
> I'd also use readlink on /proc/self/exe by default (if set_prog_name
> _not_ called).
> It simplifies the code at least on linux, and makes possible very slow
> transition for other platforms. So you don't have to update each and
> every .c file containing "main[[:space:]]*(" ;)It's really better just to put the stuff at the beginning of each main.
If that's too annoying, librarize main and rename your mains "git_main".
-hpa