This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] cli/cli-dump.c: Write dump always in binary mode on Cygwin
On Tue, Aug 06, 2002 at 07:42:47AM +0300, Eli Zaretskii wrote:
>
> On Mon, 5 Aug 2002, Michael Snyder wrote:
>
> > do we actually know of any environments
> > where the #if is strictly necessary?
>
> Since GDB requires ISO C, and "wb" is part of the ISO C spec, I think we
> can drop the #if. (Dependance on O_BINARY being defined is not very
> clean anyway, IMHO, since O_BINARY does not belong to `fopen'.)
Well, that changes the patch to:
2002-08-06 Corinna Vinschen <vinschen@redhat.com>
* cli/cli-dump.c (add_dump_command): Explicitely use "b" flag to
write dump file binary.
Index: cli/cli-dump.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-dump.c,v
retrieving revision 1.4
diff -u -p -r1.4 cli-dump.c
--- cli/cli-dump.c 24 May 2002 01:25:52 -0000 1.4
+++ cli/cli-dump.c 6 Aug 2002 08:08:27 -0000
@@ -442,7 +442,7 @@ add_dump_command (char *name, void (*fun
c->completer = filename_completer;
d = XMALLOC (struct dump_context);
d->func = func;
- d->mode = "w";
+ d->mode = "wb";
set_cmd_context (c, d);
c->func = call_dump_func;
@@ -450,7 +450,7 @@ add_dump_command (char *name, void (*fun
c->completer = filename_completer;
d = XMALLOC (struct dump_context);
d->func = func;
- d->mode = "a";
+ d->mode = "ab";
set_cmd_context (c, d);
c->func = call_dump_func;
Is that ok?
Corinna
--
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
mailto:vinschen@redhat.com