/[libtool]/libtool/libltdl/ltdl.c
ViewVC logotype

Diff of /libtool/libltdl/ltdl.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.146 by gary, Mon Aug 13 19:51:34 2001 UTC revision 1.147 by gary, Mon Aug 13 22:53:39 2001 UTC
# Line 1944  tryall_dlopen_module (handle, prefix, di Line 1944  tryall_dlopen_module (handle, prefix, di
1944    if (!filename)    if (!filename)
1945      return 1;      return 1;
1946    
1947    sprintf (filename, "%.*s/%s", dirname_len, dirname, dlname);    sprintf (filename, "%.*s/%s", (int) dirname_len, dirname, dlname);
1948    
1949    /* Now that we have combined DIRNAME and MODULENAME, if there is    /* Now that we have combined DIRNAME and MODULENAME, if there is
1950       also a PREFIX to contend with, simply recurse with the arguments       also a PREFIX to contend with, simply recurse with the arguments
# Line 1971  find_module (handle, dir, libdir, dlname Line 1971  find_module (handle, dir, libdir, dlname
1971       const char *old_name;       const char *old_name;
1972       int installed;       int installed;
1973  {  {
   int   error;  
   char  *filename;  
   
1974    /* Try to open the old library first; if it was dlpreopened,    /* Try to open the old library first; if it was dlpreopened,
1975       we want the preopened version of it, even if a dlopenable       we want the preopened version of it, even if a dlopenable
1976       module is available.  */       module is available.  */
# Line 1985  find_module (handle, dir, libdir, dlname Line 1982  find_module (handle, dir, libdir, dlname
1982    /* Try to open the dynamic library.  */    /* Try to open the dynamic library.  */
1983    if (dlname)    if (dlname)
1984      {      {
       size_t len;  
   
1985        /* try to open the installed module */        /* try to open the installed module */
1986        if (installed && libdir)        if (installed && libdir)
1987          {          {
# Line 2200  find_file_callback (filename, data1, dat Line 2195  find_file_callback (filename, data1, dat
2195      {      {
2196        char *dirend = strrchr (filename, '/');        char *dirend = strrchr (filename, '/');
2197    
       LT_DLFREE (*pdir);  
       *pdir    = filename;  
       filename = 0;  
   
2198        if (dirend > filename)        if (dirend > filename)
2199          *dirend   = LT_EOS_CHAR;          *dirend   = LT_EOS_CHAR;
2200    
2201        is_done = 1;        LT_DLFREE (*pdir);
2202          *pdir   = lt_estrdup (filename);
2203          is_done = (*pdir == 0) ? -1 : 1;
2204      }      }
2205    
2206    return is_done;    return is_done;

Legend:
Removed from v.1.146  
changed lines
  Added in v.1.147

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26