+2001-10-28 Albert Chin-A-Young <china@thewrittenword.com>
+
+ * ltdl.c: change some types to size_t from int because
+ strlen() returns size_t. argz_len changed to size_t in
+ foreach_dirinpath() because argzize_path() takes 3rd
+ argument as size_t, not int. Based on lint run from
+ Bob Friesenhahn <bfriesen@simple.dallas.tx.us>.
+
2001-10-27 Gary V. Vaughan <gary@gnu.org>
* libtool.m4 (_LT_AC_TAGCONFIG): Cray sed does not allow character
lt_ptr ptr;
size_t size;
{
- if (size <= 0)
+ if (size == 0)
{
/* For zero or less bytes, free the original memory */
if (ptr != 0)
{
int result = 0;
int filenamesize = 0;
- int lenbase = LT_STRLEN (base_name);
- int argz_len = 0;
+ size_t lenbase = LT_STRLEN (base_name);
+ size_t argz_len = 0;
char *argz = 0;
char *filename = 0;
char *canonical = 0;
char *dir_name = 0;
while ((dir_name = argz_next (argz, argz_len, dir_name)))
{
- int lendir = LT_STRLEN (dir_name);
+ size_t lendir = LT_STRLEN (dir_name);
if (lendir +1 +lenbase >= filenamesize)
{
/* remove the leading and trailing "'" from str
and store the result in dest */
const char *end = strrchr (str, '\'');
- int len = LT_STRLEN (str);
+ size_t len = LT_STRLEN (str);
char *tmp;
LT_DLFREE (*dest);
char * deplibs = 0;
char * line = 0;
size_t line_len;
- int i;
/* if we can't find the installed flag, it is probably an
installed libtool archive, produced with an old version
}
/* canonicalize the module name */
- for (i = 0; i < ext - base_name; ++i)
- {
- if (isalnum ((int)(base_name[i])))
- {
- name[i] = base_name[i];
- }
- else
- {
- name[i] = '_';
- }
- }
- name[ext - base_name] = LT_EOS_CHAR;
+ {
+ size_t i;
+ for (i = 0; i < ext - base_name; ++i)
+ {
+ if (isalnum ((int)(base_name[i])))
+ {
+ name[i] = base_name[i];
+ }
+ else
+ {
+ name[i] = '_';
+ }
+ }
+ name[ext - base_name] = LT_EOS_CHAR;
+ }
- /* Now try to open the .la file. If there is no directory name
- component, try to find it first in user_search_path and then other
- prescribed paths. Otherwise (or in any case if the module was not
- yet found) try opening just the module name as passed. */
+ /* Now try to open the .la file. If there is no directory name
+ component, try to find it first in user_search_path and then other
+ prescribed paths. Otherwise (or in any case if the module was not
+ yet found) try opening just the module name as passed. */
if (!dir)
{
const char *search_path;
/* read the .la file */
while (!feof (file))
{
- if (!fgets (line, line_len, file))
+ if (!fgets (line, (int) line_len, file))
{
break;
}
while (line[LT_STRLEN(line) -1] != '\n')
{
line = LT_DLREALLOC (char, line, line_len *2);
- if (!fgets (&line[line_len -1], line_len +1, file))
+ if (!fgets (&line[line_len -1], (int) line_len +1, file))
{
break;
}
lt_dlhandle handle = 0;
char * tmp = 0;
char * ext = 0;
- int len;
+ size_t len;
int errors = 0;
if (!filename)
lt_dlhandle handle;
const char *symbol;
{
- int lensym;
+ size_t lensym;
char lsym[LT_SYMBOL_LENGTH];
char *sym;
lt_ptr address;