This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix compilation on the recent glibc CVS snapshot
- From: Jim Blandy <jimb at codesourcery dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 08 Aug 2007 15:04:24 -0700
- Subject: Re: [patch] Fix compilation on the recent glibc CVS snapshot
- References: <20070808205502.GA3058@host0.dyn.jankratochvil.net>
Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> 2007-08-08 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * serial.c (serial_open): Fix OPEN parameter macro expansion.
>
POSIX System Interfaces section 2.1 says, "Any function declared in a
header may also be implemented as a macro defined in the header." I
gather this means that GLIBC is within its rights to make that change
to 'open'. I've learned something new today.
So, this change is approved.
> --- gdb/serial.c 8 Apr 2007 15:20:07 -0000 1.29
> +++ gdb/serial.c 8 Aug 2007 20:32:10 -0000
> @@ -213,7 +213,8 @@ serial_open (const char *name)
> scb->bufp = scb->buf;
> scb->error_fd = -1;
>
> - if (scb->ops->open (scb, open_name))
> + /* `...->open (...)' would get expanded by an the open(2) syscall macro. */
> + if ((*scb->ops->open) (scb, open_name))
> {
> xfree (scb);
> return NULL;