]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Tweak for libtool=1.5 behaviour on HP-UX.
authorBruno Haible <bruno@clisp.org>
Fri, 2 May 2003 10:20:37 +0000 (10:20 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:10:25 +0000 (12:10 +0200)
gettext-tools/lib/ChangeLog
gettext-tools/lib/progname.c

index 6be89207cd14dfa811bdf669bea475dc6db7383a..1c4507cd108b21ee8aa33e68adcf3e47a03ab106 100644 (file)
@@ -1,8 +1,8 @@
-2003-04-24  Bruno Haible  <bruno@clisp.org>
+2003-05-02  Bruno Haible  <bruno@clisp.org>
 
        Support for libtool-1.5.
-       * progname.c (set_program_name): Remove a leading "<dirname>/lt-",
-       not only "lt-".
+       * progname.c (set_program_name): Remove a leading "<dirname>/.libs/lt-"
+       or "<dirname>/.libs/", not only "lt-".
 
 2003-04-12  Bruno Haible  <bruno@clisp.org>
 
index 03913c840a95c45377b62953781e991f71eebf42..ff8424524aa74f0f37111041f1b8a008b86ebee6 100644 (file)
@@ -38,14 +38,16 @@ const char *program_name;
 void
 set_program_name (const char *argv0)
 {
-  /* libtool creates a temporary executable whose name is prefixed with
-     "lt-".  It also makes argv[0] absolute.  Remove this "<dirname>/lt-"
-     prefix here.  */
+  /* libtool creates a temporary executable whose name is sometimes prefixed
+     with "lt-" (depends on the platform).  It also makes argv[0] absolute.
+     Remove this "<dirname>/.libs/" or "<dirname>/.libs/lt-" prefix here.  */
   const char *slash;
   const char *base;
 
   slash = strrchr (argv0, '/');
   base = (slash != NULL ? slash + 1 : argv0);
+  if (base - argv0 >= 7 && memcmp (base - 7, "/.libs/", 7) == 0)
+    argv0 = base;
   if (strncmp (base, "lt-", 3) == 0)
     argv0 = base + 3;
   program_name = argv0;