]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR binutils/14813
authorAlan Modra <amodra@gmail.com>
Mon, 14 Jan 2013 13:14:08 +0000 (13:14 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 14 Jan 2013 13:14:08 +0000 (13:14 +0000)
* 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.

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

index bd8d01bbea822a6fc3413867c14c98c72b950129..c296b465036ce1615447364d84b8d0dc405af2a7 100644 (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.
index a80cd4f47db4f8452041f4b6a53a43f18d7c3a4c..be05581aeb4026addd3f4caf2b185ae73d893a24 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);
-.  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
index b1dcd5a745b63f282308066ce98df7cc20baba27..52268162c268ebf01486208b49e0a1b223d5e065 100644 (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
index d548143c4cee4c22b5f4016eda8e91928af75d6a..7c78d9b05e02f3c9455d3d54f93a747bc94c6b3c 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);
-  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
index cbdb46e1b7a0bb92e5a316accb599af90957eab0..c18d08af38844629df113a2e258ebbbaba25360b 100644 (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);
index 8aa0e9a7f4009f5836df35095dc60d3f69468095..b553570d80a902f452ee9a8631e558a89c8813cf 100644 (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