Re: [PATCH] Extend runtime prefix computation
- From
- Michael Weiser <m.weiser@science-computing.de>
- Date
- Nov 30, 2012, 10:45 UTC
- Message-ID
- <20121130104532.GC2640@science-computing.de>
- In-Reply-To
- <CABPQNSYhscHdnTFLye=oif_R84kpdaVsrCK+-174v7Ugrae_yQ@mail.gmail.com>
Hello Erik,
On Fri, Nov 30, 2012 at 11:20:52AM +0100, Erik Faye-Lund wrote:
Show 12 quoted lines
> > +#if defined(__linux__)
> > + struct stat st;
> > + if (!stat("/proc/self/exe", &st)) {
> > + abs_argv0 = xstrdup(real_path("/proc/self/exe"));
> > + }
> > +#elif defined(__APPLE__)
> > + /* Mac OS X has realpath, which incidentally allocates its own
> > + * memory, which in turn is why we do all the xstrdup's in the
> > + * other cases. */
> > + abs_argv0 = realpath(argv0, NULL);
> > +#endif
> ...perhaps a "GetModuleFileName(NULL, ...)" for Windows is in place here?Agreed. However, I do not use git on Windows and don't have a Windows devel toolchain in place. So I guess this should be added in a separate patch by someone actually in need of it and in a position to develop and test it?
Thanks,
--
Michael Weiser science + computing ag
Senior Systems Engineer Geschaeftsstelle Duesseldorf
Martinstrasse 47-55, Haus A
phone: +49 211 302 708 32 D-40223 Duesseldorf
fax: +49 211 302 708 50 www.science-computing.de
--
Vorstandsvorsitzender/Chairman of the board of management:
Gerd-Lothar Leonhart
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Michael Heinrichs,
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Philippe Miltin
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196