]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Reenable compilation of libltdl with C++:
authorGary V. Vaughan <gary@gnu.org>
Sun, 24 Jun 2007 19:05:46 +0000 (19:05 +0000)
committerGary V. Vaughan <gary@gnu.org>
Sun, 24 Jun 2007 19:05:46 +0000 (19:05 +0000)
* libltdl/ltdl.c (tryall_dlopen): Rename the try variable to
attempt, and cast explicitly.
(advise_dup): Add explicit cast.

ChangeLog
libltdl/ltdl.c

index bff479437549e81f9151602c3df538268f38355c..2708323d3484bb20abe0d34ed9d9ca4980488898 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-06-24  Gary V. Vaughan  <gary@gnu.org>
+
+       Reenable compilation of libltdl with C++:
+
+       * libltdl/ltdl.c (tryall_dlopen): Rename the try variable to
+       attempt, and cast explicitly.
+       (advise_dup): Add explicit cast.
+
 2007-06-22  Peter O'Gorman  <peter@pogma.com>
 
        * libltdl/config/ltmain.m4sh (version-number) [irix]: Don't subtract
index 79769cc3b0dfa7e2202421e58b93e5839d9c8a3c..a8860aa8c7699d72e7d2bf6cc2dd4aeceb08c321 100644 (file)
@@ -399,7 +399,7 @@ tryall_dlopen (lt_dlhandle *phandle, const char *filename,
        lt__advise *advise_taken = 0;
 
        if (advise)
-         advise_taken = advise_dup (advise);
+         advise_taken = advise_dup ((lt__advise *) advise);
 
        vtable = lt_dlloader_get (loader);
        handle->module = (*vtable->module_open) (vtable->dlloader_data,
@@ -1100,7 +1100,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext,
   char *       base_name       = 0;
   char *       dir             = 0;
   char *       name            = 0;
-  char *        try             = 0;
+  char *        attempt                = 0;
   int          errors          = 0;
   lt_dlhandle  newhandle;
 
@@ -1134,22 +1134,22 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext,
 
   if (ext)
     {
-      try = MALLOC (char, LT_STRLEN (filename) + LT_STRLEN (ext) + 1);
-      if (!try)
+      attempt = MALLOC (char, LT_STRLEN (filename) + LT_STRLEN (ext) + 1);
+      if (!attempt)
        return 1;
 
-      sprintf(try, "%s%s", filename, ext);
+      sprintf(attempt, "%s%s", filename, ext);
     }
   else
     {
-      try = lt__strdup (filename);
-      if (!try)
+      attempt = lt__strdup (filename);
+      if (!attempt)
        return 1;
     }
 
   /* Doing this immediately allows internal functions to safely
      assume only canonicalized paths are passed.  */
-  if (canonicalize_path (try, &canonical) != 0)
+  if (canonicalize_path (attempt, &canonical) != 0)
     {
       ++errors;
       goto cleanup;
@@ -1390,7 +1390,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext,
 
  cleanup:
   FREE (dir);
-  FREE (try);
+  FREE (attempt);
   FREE (name);
   if (!canonical)              /* was MEMREASSIGNed */
     FREE (base_name);
@@ -1495,7 +1495,7 @@ static lt__advise *
 advise_dup (lt__advise *advise)
 {
   lt__advise *dup = (lt__advise *) lt__zalloc (sizeof (lt__advise));
-  return memcpy (dup, advise, sizeof (lt__advise));
+  return (lt__advise *) memcpy (dup, advise, sizeof (lt__advise));
 }
 
 /* Libtool-1.5.x interface for loading a new module named FILENAME.  */