diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-11-07 00:55:04 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-11-07 00:55:04 +0000 |
commit | 9053b70efaad3b15547d74badd23cc9a32330cdd (patch) | |
tree | f012a5fd2850ea313d006ac8f61f81906b95b3b3 /bfd | |
parent | ed86b3506230d2b4e4d1da1948d047914eefa16b (diff) | |
download | gdb-9053b70efaad3b15547d74badd23cc9a32330cdd.zip gdb-9053b70efaad3b15547d74badd23cc9a32330cdd.tar.gz gdb-9053b70efaad3b15547d74badd23cc9a32330cdd.tar.bz2 |
Change return type of bclose to bfd_boolean
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.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 11 | ||||
-rw-r--r-- | bfd/bfdio.c | 4 | ||||
-rw-r--r-- | bfd/cache.c | 2 | ||||
-rw-r--r-- | bfd/libbfd.h | 2 | ||||
-rw-r--r-- | bfd/opncls.c | 4 | ||||
-rw-r--r-- | bfd/vms-lib.c | 4 |
6 files changed, 19 insertions, 8 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index fa89e15..530ef7d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -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): diff --git a/bfd/bfdio.c b/bfd/bfdio.c index 43a7684..a80cd4f 100644 --- a/bfd/bfdio.c +++ b/bfd/bfdio.c @@ -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; diff --git a/bfd/cache.c b/bfd/cache.c index 88f89b1..b1dcd5a 100644 --- a/bfd/cache.c +++ b/bfd/cache.c @@ -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); diff --git a/bfd/libbfd.h b/bfd/libbfd.h index fe126e6..0458e39 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -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 diff --git a/bfd/opncls.c b/bfd/opncls.c index 8fd9ac8..728b2b0 100644 --- a/bfd/opncls.c +++ b/bfd/opncls.c @@ -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 diff --git a/bfd/vms-lib.c b/bfd/vms-lib.c index 56b80ad..8f15419 100644 --- a/bfd/vms-lib.c +++ b/bfd/vms-lib.c @@ -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 |