bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getprogname and libtool


From: Jim Meyering
Subject: Re: getprogname and libtool
Date: Tue, 18 Oct 2016 16:29:07 -0700

On Tue, Oct 18, 2016 at 3:32 PM, Bruno Haible <address@hidden> wrote:
> Hi Jim,
...
> 2016-10-18  Bruno Haible  <address@hidden>
>
>         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;

Thank you.
You are welcome to push that, even though I prefer the more concise "p += 3;"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]