+2012-11-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/14813
+ * bfdio.c (bfd_iovec): Change return type of bclose to
+ bfd_boolean.
+ (memory_bclose): Change return type to bfd_boolean.
+ * cache.c (cache_bclose): Likewise.
+ * opncls.c (opncls_bclose): Likewise. Return TRUE on success.
+ * vms-lib.c (vms_lib_bclose): Likewise. Return TRUE.
+ * libbfd.h: Regenerated.
+
2012-11-06 Tristan Gingold <gingold@adacore.com>
* coff-x86_64.c (_bfd_generic_find_nearest_line_discriminator):
. {* 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);
-. int (*bclose) (struct bfd *abfd);
+. bfd_boolean (*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 int
+static bfd_boolean
memory_bclose (struct bfd *abfd)
{
struct bfd_in_memory *bim = (struct bfd_in_memory *) abfd->iostream;
return nwrite;
}
-static int
+static bfd_boolean
cache_bclose (struct bfd *abfd)
{
return bfd_cache_close (abfd);
/* 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);
- int (*bclose) (struct bfd *abfd);
+ bfd_boolean (*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 int
+static bfd_boolean
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;
+ return status == 0;
}
static int
return -1;
}
-static int
+static bfd_boolean
vms_lib_bclose (struct bfd *abfd)
{
abfd->iostream = NULL;
- return 0;
+ return TRUE;
}
static int