Ralf Wildenhues wrote:
> I think that an lt-program* outside [._]libs/ would be a bug.
Thanks for this statement. On platforms where gnulib is used, the
directory name is '.libs', not '_libs'. I'm doing as Paul suggested,
but with a simpler patch (less micro-optimizations -> easier to understand).
2008-01-07 Bruno Haible <[EMAIL PROTECTED]>
* lib/progname.c (set_program_name): Don't strip off a leading
"lt-" prefix outside a .libs directory.
Suggested by Paul Eggert.
*** lib/progname.c.orig 2008-01-08 02:12:52.000000000 +0100
--- lib/progname.c 2008-01-08 02:11:32.000000000 +0100
***************
*** 1,5 ****
/* Program name management.
! Copyright (C) 2001-2003, 2005-2007 Free Software Foundation, Inc.
Written by Bruno Haible <[EMAIL PROTECTED]>, 2001.
This program is free software: you can redistribute it and/or modify
--- 1,5 ----
/* Program name management.
! Copyright (C) 2001-2003, 2005-2008 Free Software Foundation, Inc.
Written by Bruno Haible <[EMAIL PROTECTED]>, 2001.
This program is free software: you can redistribute it and/or modify
***************
*** 42,49 ****
slash = strrchr (argv0, '/');
base = (slash != NULL ? slash + 1 : argv0);
if (base - argv0 >= 7 && strncmp (base - 7, "/.libs/", 7) == 0)
! argv0 = base;
! if (strncmp (base, "lt-", 3) == 0)
! argv0 = base + 3;
program_name = argv0;
}
--- 42,51 ----
slash = strrchr (argv0, '/');
base = (slash != NULL ? slash + 1 : argv0);
if (base - argv0 >= 7 && strncmp (base - 7, "/.libs/", 7) == 0)
! {
! argv0 = base;
! if (strncmp (base, "lt-", 3) == 0)
! argv0 = base + 3;
! }
program_name = argv0;
}