On Tue, Oct 18, 2016 at 3:32 PM, Bruno Haible <br...@clisp.org> wrote:
> Hi Jim,
> 2016-10-18 Bruno Haible <br...@clisp.org>
> getprogname tests: Avoid failure in packages that use libtool.
> * tests/test-getprogname.c (main): Strip "lt-" prefix.
> Based on a patch by Jim Meyering.
> diff --git a/tests/test-getprogname.c b/tests/test-getprogname.c
> index b39ab37..103b58c 100644
> --- a/tests/test-getprogname.c
> +++ b/tests/test-getprogname.c
> @@ -27,6 +27,13 @@ main (void)
> char const *p = getprogname ();
> + /* libtool creates a temporary executable whose name is sometimes prefixed
> + with "lt-" (depends on the platform). But the name of the temporary
> + executable is a detail that should not be visible to the end user and to
> + the test suite. Remove this "lt-" prefix here. */
> + if (strncmp (p, "lt-", 3) == 0)
> + p = p + 3;
You are welcome to push that, even though I prefer the more concise "p += 3;"