]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* TODO, libltdl/lt_error.h, libltdl/ltdl.c, libltdl/ltdl.h:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 22 Oct 2004 13:07:44 +0000 (13:07 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 22 Oct 2004 13:07:44 +0000 (13:07 +0000)
Undo accidental commit.

ChangeLog
TODO
libltdl/lt_error.h
libltdl/ltdl.c
libltdl/ltdl.h

index af11cdcb0ab1994d05472ebb2e3d843a3b12d4f4..1bf6f15dbfda6e4a14dce21dfaf40227f18f5dbe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-10-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       * TODO, libltdl/lt_error.h, libltdl/ltdl.c, libltdl/ltdl.h:
+       Undo accidental commit.
+
        * Makefile.maint: Fix typo.
 
 2004-10-22  Gary V. Vaughan  <gary@gnu.org>
diff --git a/TODO b/TODO
index d1043ca9066ae51e2c846c6d7e32257f8e1473ad..2e211479edc8b3f1e888b19860deb3eea686efc7 100644 (file)
--- a/TODO
+++ b/TODO
@@ -51,8 +51,6 @@ GNU Libtool
 1.2. libtldl
 ------------
 
-* Adjust version-info of libltdl before next release.
-
 * Fix the following bugs in libltdl:
  - error reporting of tryall_dlopen():
    if the file actually doesn't exist (stat() fails or it wasn't dlpreopened)
@@ -64,16 +62,6 @@ GNU Libtool
    Also report dlerror() for dlclose and dlsym if available
  - Make sure that the dependency_libs of a dlpreopened module won't be loaded.
 
-* Split out get_line as getline, preferably cooperate with gnulib's version.
-  Otherwise have it use ssize_t for correctness (this needs adding a ssize_t
-  check to m4/ltdl.m4).
-
-* Implement even stricter checking of .la file structure.
-  Especially leading and trailing white space in the right hand side of a
-  variable assignment need checking (in ltdl as well as libtool).
-  Also, add a way of communicating parse errors more verbosely.
-  Add regression tests.
-
 
 2. In the future
 ================
index 722ad26675f9abafc117739a17679b6e79abfc23..4283b4385d110ac4d732e1e23cd6beeef423fb39 100644 (file)
@@ -57,8 +57,7 @@ LT_BEGIN_C_DECLS
     LT_ERROR(SHUTDOWN,             "library already shutdown")         \
     LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module")     \
     LT_ERROR(INVALID_MUTEX_ARGS,    "internal error (code withdrawn)")  \
-    LT_ERROR(INVALID_POSITION,     "invalid search path insert position") \
-    LT_ERROR(INVALID_LALIB,        "malformed library file")
+    LT_ERROR(INVALID_POSITION,     "invalid search path insert position")
 
 /* Enumerate the symbolic error names. */
 enum {
index 9322c616e54c8e00af979d9104bc916b16e5217f..1beca9f0131d923aaf6ed01d18af8a3a06d5be1d 100644 (file)
@@ -1831,7 +1831,7 @@ lt_dlpath_insertdir (char **ppath, char *before, const char *dir)
   size_t argz_len      = 0;
 
   assert (ppath);
-  assert (dir && *dir);                /* Without DIR, don't call this function!  */
+  assert (dir && *dir);
 
   if (canonicalize_path (dir, &canonical) != 0)
     {
@@ -1845,8 +1845,9 @@ lt_dlpath_insertdir (char **ppath, char *before, const char *dir)
   if (*ppath == 0)
     {
       assert (!before);                /* BEFORE cannot be set without PPATH.  */
+      assert (dir);            /* Without DIR, don't call this function!  */
 
-      *ppath = lt__strdup (canonical);
+      *ppath = lt__strdup (dir);
       if (*ppath == 0)
        ++errors;
 
@@ -1874,7 +1875,7 @@ lt_dlpath_insertdir (char **ppath, char *before, const char *dir)
       before = before - *ppath + argz;
     }
 
-  if (lt_argz_insert (&argz, &argz_len, before, canonical) != 0)
+  if (lt_argz_insert (&argz, &argz_len, before, dir) != 0)
     {
       ++errors;
       goto cleanup;
@@ -1891,13 +1892,21 @@ lt_dlpath_insertdir (char **ppath, char *before, const char *dir)
 }
 
 int
-lt_dladdsearchdir (const char *search_path)
+lt_dladdsearchdir (const char *search_dir)
 {
-  return lt_dlinsertsearchdir (NULL, search_path);
+  int errors = 0;
+
+  if (search_dir && *search_dir)
+    {
+      if (lt_dlpath_insertdir (&user_search_path, 0, search_dir) != 0)
+       ++errors;
+    }
+
+  return errors;
 }
 
 int
-lt_dlinsertsearchdir (const char *before, const char *search_path)
+lt_dlinsertsearchdir (const char *before, const char *search_dir)
 {
   int errors = 0;
 
@@ -1911,10 +1920,10 @@ lt_dlinsertsearchdir (const char *before, const char *search_path)
        }
     }
 
-  if (search_path && *search_path)
+  if (search_dir && *search_dir)
     {
       if (lt_dlpath_insertdir (&user_search_path,
-                              (char *) before, search_path) != 0)
+                              (char *) before, search_dir) != 0)
        {
          ++errors;
        }
@@ -1926,15 +1935,29 @@ lt_dlinsertsearchdir (const char *before, const char *search_path)
 int
 lt_dlsetsearchpath (const char *search_path)
 {
+  int   errors     = 0;
+
   FREE (user_search_path);
 
-  return lt_dlinsertsearchdir(NULL, search_path);
+  if (!search_path || !LT_STRLEN (search_path))
+    {
+      return errors;
+    }
+
+  if (canonicalize_path (search_path, &user_search_path) != 0)
+    ++errors;
+
+  return errors;
 }
 
 const char *
 lt_dlgetsearchpath (void)
 {
-  return user_search_path;
+  const char *saved_path;
+
+  saved_path = user_search_path;
+
+  return saved_path;
 }
 
 int
index 7c8588c7037f502d7fd227ba3ecc1025dcaaa2cf..dcf88b2d25367700522608a07459d2b120c24aae 100644 (file)
@@ -52,9 +52,9 @@ LT_SCOPE int      lt_dlinit           (void);
 LT_SCOPE int       lt_dlexit           (void);
 
 /* Module search path manipulation.  */
-LT_SCOPE int       lt_dladdsearchdir    (const char *search_path);
+LT_SCOPE int       lt_dladdsearchdir    (const char *search_dir);
 LT_SCOPE int       lt_dlinsertsearchdir (const char *before,
-                                                 const char *search_path);
+                                                 const char *search_dir);
 LT_SCOPE int       lt_dlsetsearchpath   (const char *search_path);
 LT_SCOPE const char *lt_dlgetsearchpath         (void);
 LT_SCOPE int       lt_dlforeachfile     (