387 |
lt_ptr ptr; |
lt_ptr ptr; |
388 |
size_t size; |
size_t size; |
389 |
{ |
{ |
390 |
if (size <= 0) |
if (size == 0) |
391 |
{ |
{ |
392 |
/* For zero or less bytes, free the original memory */ |
/* For zero or less bytes, free the original memory */ |
393 |
if (ptr != 0) |
if (ptr != 0) |
2164 |
{ |
{ |
2165 |
int result = 0; |
int result = 0; |
2166 |
int filenamesize = 0; |
int filenamesize = 0; |
2167 |
int lenbase = LT_STRLEN (base_name); |
size_t lenbase = LT_STRLEN (base_name); |
2168 |
int argz_len = 0; |
size_t argz_len = 0; |
2169 |
char *argz = 0; |
char *argz = 0; |
2170 |
char *filename = 0; |
char *filename = 0; |
2171 |
char *canonical = 0; |
char *canonical = 0; |
2188 |
char *dir_name = 0; |
char *dir_name = 0; |
2189 |
while ((dir_name = argz_next (argz, argz_len, dir_name))) |
while ((dir_name = argz_next (argz, argz_len, dir_name))) |
2190 |
{ |
{ |
2191 |
int lendir = LT_STRLEN (dir_name); |
size_t lendir = LT_STRLEN (dir_name); |
2192 |
|
|
2193 |
if (lendir +1 +lenbase >= filenamesize) |
if (lendir +1 +lenbase >= filenamesize) |
2194 |
{ |
{ |
2499 |
/* remove the leading and trailing "'" from str |
/* remove the leading and trailing "'" from str |
2500 |
and store the result in dest */ |
and store the result in dest */ |
2501 |
const char *end = strrchr (str, '\''); |
const char *end = strrchr (str, '\''); |
2502 |
int len = LT_STRLEN (str); |
size_t len = LT_STRLEN (str); |
2503 |
char *tmp; |
char *tmp; |
2504 |
|
|
2505 |
LT_DLFREE (*dest); |
LT_DLFREE (*dest); |
2624 |
char * deplibs = 0; |
char * deplibs = 0; |
2625 |
char * line = 0; |
char * line = 0; |
2626 |
size_t line_len; |
size_t line_len; |
|
int i; |
|
2627 |
|
|
2628 |
/* if we can't find the installed flag, it is probably an |
/* if we can't find the installed flag, it is probably an |
2629 |
installed libtool archive, produced with an old version |
installed libtool archive, produced with an old version |
2639 |
} |
} |
2640 |
|
|
2641 |
/* canonicalize the module name */ |
/* canonicalize the module name */ |
2642 |
for (i = 0; i < ext - base_name; ++i) |
{ |
2643 |
{ |
size_t i; |
2644 |
if (isalnum ((int)(base_name[i]))) |
for (i = 0; i < ext - base_name; ++i) |
2645 |
{ |
{ |
2646 |
name[i] = base_name[i]; |
if (isalnum ((int)(base_name[i]))) |
2647 |
} |
{ |
2648 |
else |
name[i] = base_name[i]; |
2649 |
{ |
} |
2650 |
name[i] = '_'; |
else |
2651 |
} |
{ |
2652 |
} |
name[i] = '_'; |
2653 |
name[ext - base_name] = LT_EOS_CHAR; |
} |
2654 |
|
} |
2655 |
|
name[ext - base_name] = LT_EOS_CHAR; |
2656 |
|
} |
2657 |
|
|
2658 |
/* Now try to open the .la file. If there is no directory name |
/* Now try to open the .la file. If there is no directory name |
2659 |
component, try to find it first in user_search_path and then other |
component, try to find it first in user_search_path and then other |
2660 |
prescribed paths. Otherwise (or in any case if the module was not |
prescribed paths. Otherwise (or in any case if the module was not |
2661 |
yet found) try opening just the module name as passed. */ |
yet found) try opening just the module name as passed. */ |
2662 |
if (!dir) |
if (!dir) |
2663 |
{ |
{ |
2664 |
const char *search_path; |
const char *search_path; |
2717 |
/* read the .la file */ |
/* read the .la file */ |
2718 |
while (!feof (file)) |
while (!feof (file)) |
2719 |
{ |
{ |
2720 |
if (!fgets (line, line_len, file)) |
if (!fgets (line, (int) line_len, file)) |
2721 |
{ |
{ |
2722 |
break; |
break; |
2723 |
} |
} |
2727 |
while (line[LT_STRLEN(line) -1] != '\n') |
while (line[LT_STRLEN(line) -1] != '\n') |
2728 |
{ |
{ |
2729 |
line = LT_DLREALLOC (char, line, line_len *2); |
line = LT_DLREALLOC (char, line, line_len *2); |
2730 |
if (!fgets (&line[line_len -1], line_len +1, file)) |
if (!fgets (&line[line_len -1], (int) line_len +1, file)) |
2731 |
{ |
{ |
2732 |
break; |
break; |
2733 |
} |
} |
2949 |
lt_dlhandle handle = 0; |
lt_dlhandle handle = 0; |
2950 |
char * tmp = 0; |
char * tmp = 0; |
2951 |
char * ext = 0; |
char * ext = 0; |
2952 |
int len; |
size_t len; |
2953 |
int errors = 0; |
int errors = 0; |
2954 |
|
|
2955 |
if (!filename) |
if (!filename) |
3339 |
lt_dlhandle handle; |
lt_dlhandle handle; |
3340 |
const char *symbol; |
const char *symbol; |
3341 |
{ |
{ |
3342 |
int lensym; |
size_t lensym; |
3343 |
char lsym[LT_SYMBOL_LENGTH]; |
char lsym[LT_SYMBOL_LENGTH]; |
3344 |
char *sym; |
char *sym; |
3345 |
lt_ptr address; |
lt_ptr address; |