PR binutils/14813

* bfdio.c (struct bfd_iovec <bclose>): Revert 2012-11-06.
	(memory_bclose): Likewise.  Return 0 on success.
	* cache.c (cache_bclose): Likewise.
	* opncls.c (opncls_bclose, bfd_close): Likewise.
	* vms-lib.c (vms_lib_bclose): Likewise.
	* libbfd.h: Regenerate.
This commit is contained in:
Alan Modra 2013-01-14 13:14:08 +00:00
parent 130b4629e4
commit 405bf443e5
6 changed files with 21 additions and 11 deletions

View File

@ -1,3 +1,13 @@
2013-01-14 Alan Modra <amodra@gmail.com>
PR binutils/14813
* bfdio.c (struct bfd_iovec <bclose>): Revert 2012-11-06.
(memory_bclose): Likewise. Return 0 on success.
* cache.c (cache_bclose): Likewise.
* opncls.c (opncls_bclose, bfd_close): Likewise.
* vms-lib.c (vms_lib_bclose): Likewise.
* libbfd.h: Regenerate.
2013-01-13 Alan Modra <amodra@gmail.com>
* elf-bfd.h (struct elf_link_hash_entry): Delete dynamic_weak.

View File

@ -154,7 +154,7 @@ DESCRIPTION
. {* For the following, on successful completion a value of 0 is returned.
. Otherwise, a value of -1 is returned (and <<bfd_error>> is set). *}
. int (*bseek) (struct bfd *abfd, file_ptr offset, int whence);
. bfd_boolean (*bclose) (struct bfd *abfd);
. int (*bclose) (struct bfd *abfd);
. int (*bflush) (struct bfd *abfd);
. int (*bstat) (struct bfd *abfd, struct stat *sb);
. {* Mmap a part of the files. ADDR, LEN, PROT, FLAGS and OFFSET are the usual
@ -576,7 +576,7 @@ memory_bseek (bfd *abfd, file_ptr position, int direction)
return 0;
}
static bfd_boolean
static int
memory_bclose (struct bfd *abfd)
{
struct bfd_in_memory *bim = (struct bfd_in_memory *) abfd->iostream;
@ -586,7 +586,7 @@ memory_bclose (struct bfd *abfd)
free (bim);
abfd->iostream = NULL;
return TRUE;
return 0;
}
static int

View File

@ -359,10 +359,10 @@ cache_bwrite (struct bfd *abfd, const void *where, file_ptr nbytes)
return nwrite;
}
static bfd_boolean
static int
cache_bclose (struct bfd *abfd)
{
return bfd_cache_close (abfd);
return bfd_cache_close (abfd) - 1;
}
static int

View File

@ -871,7 +871,7 @@ struct bfd_iovec
/* For the following, on successful completion a value of 0 is returned.
Otherwise, a value of -1 is returned (and <<bfd_error>> is set). */
int (*bseek) (struct bfd *abfd, file_ptr offset, int whence);
bfd_boolean (*bclose) (struct bfd *abfd);
int (*bclose) (struct bfd *abfd);
int (*bflush) (struct bfd *abfd);
int (*bstat) (struct bfd *abfd, struct stat *sb);
/* Mmap a part of the files. ADDR, LEN, PROT, FLAGS and OFFSET are the usual

View File

@ -508,7 +508,7 @@ opncls_bwrite (struct bfd *abfd ATTRIBUTE_UNUSED,
return -1;
}
static bfd_boolean
static int
opncls_bclose (struct bfd *abfd)
{
struct opncls *vec = (struct opncls *) abfd->iostream;
@ -518,7 +518,7 @@ opncls_bclose (struct bfd *abfd)
if (vec->close != NULL)
status = (vec->close) (abfd, vec->stream);
abfd->iostream = NULL;
return status == 0;
return status;
}
static int
@ -723,7 +723,7 @@ bfd_close (bfd *abfd)
if (! BFD_SEND (abfd, _close_and_cleanup, (abfd)))
return FALSE;
ret = abfd->iovec->bclose (abfd);
ret = abfd->iovec->bclose (abfd) == 0;
if (ret)
_maybe_make_executable (abfd);

View File

@ -1174,11 +1174,11 @@ vms_lib_bwrite (struct bfd *abfd ATTRIBUTE_UNUSED,
return -1;
}
static bfd_boolean
static int
vms_lib_bclose (struct bfd *abfd)
{
abfd->iostream = NULL;
return TRUE;
return 0;
}
static int