DJGPP specific fix for struct serial_ops in ser-go32.c
Commit Message
This is a fix for the DJGPP port of gdb.
I do not know when this has changed but the numbers of arguments passed to
setparity of struct serial_ops no longer match the number of arguments of
dos_noop. The patch below fixes the issue providing a new dummy function.
Is there some one on this list that is member on the gdb bug mailing list?
I have tried to submitte this mail to bug-gdb@gnu.org but it has been bounced.
Regards,
Juan M. Guerrero
2016-01-10 Juan Manuel Guerrero <juan.guerrero@gmx.de>
* gdb/ser-go32.c: New function dos_setparity_noop.
Comments
> Date: Mon, 11 Jan 2016 19:48:01 +0100
> From: Juan Manuel Guerrero <juan.guerrero@gmx.de>
>
> This is a fix for the DJGPP port of gdb.
> I do not know when this has changed but the numbers of arguments passed to
> setparity of struct serial_ops no longer match the number of arguments of
> dos_noop. The patch below fixes the issue providing a new dummy function.
Any objections, anyone? The patch looks obviously correct to me, so
I'd like to commit it.
Thanks.
On 01/15/2016 08:30 AM, Eli Zaretskii wrote:
>> Date: Mon, 11 Jan 2016 19:48:01 +0100
>> From: Juan Manuel Guerrero <juan.guerrero@gmx.de>
>>
>> This is a fix for the DJGPP port of gdb.
>> I do not know when this has changed but the numbers of arguments passed to
>> setparity of struct serial_ops no longer match the number of arguments of
>> dos_noop. The patch below fixes the issue providing a new dummy function.
>
> Any objections, anyone? The patch looks obviously correct to me, so
> I'd like to commit it.
I think the intention is to install ser_base_setparity, which is itself
a dummy function, when the feature is not supported:
ser-mingw.c: ser_base_setparity,
ser-mingw.c: ser_base_setparity,
ser-pipe.c: ser_base_setparity,
ser-tcp.c: ser_base_setparity,
Thanks,
Pedro Alves
@@ -593,10 +593,16 @@ dos_close (struct serial *scb)
}
static int
+dos_setparity_noop (struct serial *scb, int parity)
+{
+ return 0; /* GO32 doesn't support this */
+}
+
+static int
dos_noop (struct serial *scb)
{
return 0;
}
@@ -862,11 +868,11 @@ static const struct serial_ops dos_ops =
dos_set_tty_state,
dos_print_tty_state,
dos_noflush_set_tty_state,
dos_setbaudrate,
dos_setstopbits,
- dos_noop,
+ dos_setparity_noop,
dos_noop, /* Wait for output to drain. */
(void (*)(struct serial *, int))NULL /* Change into async mode. */
};
int