]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Change return type of bclose to bfd_boolean
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 7 Nov 2012 00:55:04 +0000 (00:55 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 7 Nov 2012 00:55:04 +0000 (00:55 +0000)
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.

bfd/ChangeLog
bfd/bfdio.c
bfd/cache.c
bfd/libbfd.h
bfd/opncls.c
bfd/vms-lib.c

index fa89e15f32c16d2cbf3b1e36f39d3f3c505b37c9..530ef7d61bc72dd33308fba6d374d35380802c3f 100644 (file)
@@ -1,3 +1,14 @@
+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):
index 43a7684d7badefd2a4184efc1c74f1fe7180f614..a80cd4f47db4f8452041f4b6a53a43f18d7c3a4c 100644 (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);
-.  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
@@ -576,7 +576,7 @@ memory_bseek (bfd *abfd, file_ptr position, int direction)
   return 0;
 }
 
-static int
+static bfd_boolean
 memory_bclose (struct bfd *abfd)
 {
   struct bfd_in_memory *bim = (struct bfd_in_memory *) abfd->iostream;
index 88f89b169aabf956cd16d8c4061ebf7b310c7e58..b1dcd5a745b63f282308066ce98df7cc20baba27 100644 (file)
@@ -359,7 +359,7 @@ cache_bwrite (struct bfd *abfd, const void *where, file_ptr nbytes)
   return nwrite;
 }
 
-static int
+static bfd_boolean
 cache_bclose (struct bfd *abfd)
 {
   return bfd_cache_close (abfd);
index fe126e6be8ed8cad67995f3b53a4c06a86b44d9f..0458e399f00373d92eb96323891e15099386938d 100644 (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);
-  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
index 8fd9ac86a9710b80f82e8e240b19b43144737e37..728b2b02a6327b129300df51eaee2b50c3d95a02 100644 (file)
@@ -508,7 +508,7 @@ opncls_bwrite (struct bfd *abfd ATTRIBUTE_UNUSED,
   return -1;
 }
 
-static int
+static bfd_boolean
 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;
+  return status == 0;
 }
 
 static int
index 56b80ad58ce07dd1a6d8efe33d49ae3f1d131b19..8f15419fa38011f4cb8a3e79c450d03d3923b79a 100644 (file)
@@ -1174,11 +1174,11 @@ vms_lib_bwrite (struct bfd *abfd ATTRIBUTE_UNUSED,
   return -1;
 }
 
-static int
+static bfd_boolean
 vms_lib_bclose (struct bfd *abfd)
 {
   abfd->iostream = NULL;
-  return 0;
+  return TRUE;
 }
 
 static int