This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR binutils/14813: Wrong return type for opncls_bclose
On Tue, Nov 6, 2012 at 5:07 PM, Alan Modra <amodra@gmail.com> wrote:
> On Tue, Nov 06, 2012 at 04:30:07PM -0800, H.J. Lu wrote:
>> Hi,
>>
>> This patch changes return type of bclose to bfd_boolean. It fixes
>> binutils/bfdtest2. OK to install?
>
> Not without checking gdb code too.
>
Sure. Here is the GDB patch. OK to install?
--
H.J.
---
2012-11-06 H.J. Lu <hongjiu.lu@intel.com>
* jit.c (mem_bfd_iovec_close): Change return type to bfd_boolean.
* remote.c (remote_bfd_iovec_close): Likewise.
* solib-spu.c (spu_bfd_iovec_close): Likewise.
* spu-linux-nat.c (bfd_boolean): Likewise.
diff --git a/gdb/jit.c b/gdb/jit.c
index 9e8f295..98a92a3 100644
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -85,11 +85,11 @@ mem_bfd_iovec_open (struct bfd *abfd, void *open_closure)
/* Closing the file is just freeing the base/size pair on our side. */
-static int
+static bfd_boolean
mem_bfd_iovec_close (struct bfd *abfd, void *stream)
{
xfree (stream);
- return 1;
+ return TRUE;
}
/* For reading the file, we just need to pass through to target_read_memory and
diff --git a/gdb/remote.c b/gdb/remote.c
index 24bb9bc..0af4265 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -9774,7 +9774,7 @@ remote_bfd_iovec_open (struct bfd *abfd, void
*open_closure)
return stream;
}
-static int
+static bfd_boolean
remote_bfd_iovec_close (struct bfd *abfd, void *stream)
{
int fd = *(int *)stream;
@@ -9786,7 +9786,7 @@ remote_bfd_iovec_close (struct bfd *abfd, void *stream)
connection was already torn down. */
remote_hostio_close (fd, &remote_errno);
- return 1;
+ return TRUE;
}
static file_ptr
diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c
index f62d96c..1c4f450 100644
--- a/gdb/solib-spu.c
+++ b/gdb/solib-spu.c
@@ -282,11 +282,11 @@ spu_bfd_iovec_open (bfd *nbfd, void *open_closure)
return open_closure;
}
-static int
+static bfd_boolean
spu_bfd_iovec_close (bfd *nbfd, void *stream)
{
xfree (stream);
- return 1;
+ return TRUE;
}
static file_ptr
diff --git a/gdb/spu-linux-nat.c b/gdb/spu-linux-nat.c
index 1932aae..5d2f752 100644
--- a/gdb/spu-linux-nat.c
+++ b/gdb/spu-linux-nat.c
@@ -273,11 +273,11 @@ spu_bfd_iovec_open (struct bfd *nbfd, void *open_closure)
return open_closure;
}
-static int
+static bfd_boolean
spu_bfd_iovec_close (struct bfd *nbfd, void *stream)
{
xfree (stream);
- return 1;
+ return TRUE;
}
static file_ptr