]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/ltdl.c (lt_argz_insert): Work around newlib
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 14 Sep 2005 16:08:13 +0000 (16:08 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 14 Sep 2005 16:08:13 +0000 (16:08 +0000)
argz_insert bug.
* libltdl/Makefile.am (libltdl_la_LDFLAGS): Bumped revision.
Reported by Eric Blake <ebb9@byu.net>.

ChangeLog
libltdl/Makefile.am
libltdl/ltdl.c

index 8d34f6ceb908b2de5b53cd4352cc53a122af4553..e7429c29d2970aa461ca1d3da35eb884f36a4c75 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-09-14  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+       * libltdl/ltdl.c (lt_argz_insert): Work around newlib
+       argz_insert bug.
+       * libltdl/Makefile.am (libltdl_la_LDFLAGS): Bumped revision.
+       Reported by Eric Blake <ebb9@byu.net>.
+
 2005-09-09  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
 
        * libtool.m4 (_LT_COMPILER_BOILERPLATE, _LT_LINKER_BOILERPLATE)
index 14e8eebe97117fab7fda8099afcbc2665e9ac48d..8baa96f5d4a2305a8f1a250742fc5cdaf1f14ae0 100644 (file)
@@ -18,7 +18,7 @@ endif
 CLEANFILES = libltdl.la libltdlc.la
 
 libltdl_la_SOURCES = ltdl.c
-libltdl_la_LDFLAGS = -no-undefined -version-info 4:2:1
+libltdl_la_LDFLAGS = -no-undefined -version-info 4:3:1
 libltdl_la_LIBADD = $(LIBADD_DL)
 
 libltdlc_la_SOURCES = ltdl.c
index b1a0e38aeb9485c8288ed09c4319612dc119e4f3..bc27b3656bf49951b4affdfcb9aa447bb289cb4e 100644 (file)
@@ -1,5 +1,5 @@
 /* ltdl.c -- system independent dlopen wrapper
-   Copyright (C) 1998, 1999, 2000, 2004  Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2004, 2005  Free Software Foundation, Inc.
    Originally by Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
@@ -3552,7 +3552,14 @@ lt_argz_insert (pargz, pargz_len, before, entry)
 {
   error_t error;
 
-  if ((error = argz_insert (pargz, pargz_len, before, entry)))
+  /* Prior to Sep 8, 2005, newlib had a bug where argz_insert(pargz,
+     pargz_len, NULL, entry) failed with EINVAL.  */
+  if (before)
+    error = argz_insert (pargz, pargz_len, before, entry);
+  else
+    error = argz_append (pargz, pargz_len, entry, 1 + LT_STRLEN (entry));
+
+  if (error)
     {
       switch (error)
        {