* 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-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.
. {* 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
return 0;
}
-static bfd_boolean
+static int
memory_bclose (struct bfd *abfd)
{
struct bfd_in_memory *bim = (struct bfd_in_memory *) abfd->iostream;
free (bim);
abfd->iostream = NULL;
- return TRUE;
+ return 0;
}
static int
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
/* 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
return -1;
}
-static bfd_boolean
+static int
opncls_bclose (struct bfd *abfd)
{
struct opncls *vec = (struct opncls *) abfd->iostream;
if (vec->close != NULL)
status = (vec->close) (abfd, vec->stream);
abfd->iostream = NULL;
- return status == 0;
+ return status;
}
static int
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);
return -1;
}
-static bfd_boolean
+static int
vms_lib_bclose (struct bfd *abfd)
{
abfd->iostream = NULL;
- return TRUE;
+ return 0;
}
static int