This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix compilation on the recent glibc CVS snapshot


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]