[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] cygwin/mingw: binary wrapper fails when invoked via $PATH
From: |
Bob Friesenhahn |
Subject: |
Re: [PATCH] cygwin/mingw: binary wrapper fails when invoked via $PATH |
Date: |
Mon, 14 Jul 2003 17:20:33 -0500 (CDT) |
Charles,
These changes to ltmain.in seem pretty complex. For Windows isn't it
easier and more reliable to use the GetModuleFileName() function?
This allows using a single line of code:
GetModuleFileName(0,path,PATHLENGTH);
to obtain the full path to the binary wrapper.
Bob
On Sat, 12 Jul 2003, Charles Wilson wrote:
> On cygwin/mingw, libtool creates an binary wrapper which invokes the
> shell-script wrapper (which sets up the environment and invokes the real
> binary).
>
> However, to locate the shell script, the binary wrapper prepends
> getcwd() to argv[0]. This works fine if the binary wrapper is invoked
> directly via a relative path -- but not if one sets $PATH and then
> invokes the wrapper via path lookup.
>
> This problem cropped up in gettext-0.12.1's test suite.
>
> Anyway, here's a patch that corrects the problem, and causes no
> testsuite regressions on cygwin.
>
> --
> Chuck
>
======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen