return nwrite;
}
-static int
+static bfd_boolean
cache_bclose (struct bfd *abfd)
{
return bfd_cache_close (abfd);
{
*map_addr = ret;
*map_len = pg_len;
- ret += offset & pagesize_m1;
+ ret = (char *) ret + (offset & pagesize_m1);
}
}
#endif
{
case read_direction:
case no_direction:
- abfd->iostream = (PTR) real_fopen (abfd->filename, FOPEN_RB);
+ abfd->iostream = real_fopen (abfd->filename, FOPEN_RB);
break;
case both_direction:
case write_direction:
if (abfd->opened_once)
{
- abfd->iostream = (PTR) real_fopen (abfd->filename, FOPEN_RUB);
+ abfd->iostream = real_fopen (abfd->filename, FOPEN_RUB);
if (abfd->iostream == NULL)
- abfd->iostream = (PTR) real_fopen (abfd->filename, FOPEN_WUB);
+ abfd->iostream = real_fopen (abfd->filename, FOPEN_WUB);
}
else
{
if (stat (abfd->filename, &s) == 0 && s.st_size != 0)
unlink_if_ordinary (abfd->filename);
#endif
- abfd->iostream = (PTR) real_fopen (abfd->filename, FOPEN_WUB);
+ abfd->iostream = real_fopen (abfd->filename, FOPEN_WUB);
abfd->opened_once = TRUE;
}
break;