Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 10 Oct 2017 22:08:08 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] stdio: implement fopencookie(3)

On Tue, Oct 10, 2017 at 11:40:15PM +0200, Jens Gustedt wrote:
> Hello Rich,
> 
> On Tue, 10 Oct 2017 16:56:54 -0400 Rich Felker <dalias@...c.org> wrote:
> 
> > Also note that while standard functions in POSIX can additionally be
> > defined as function-like macros, they can't be object-like macros, so
> > (*read), etc. are safe due to the parentheses.
> 
> They would only be safe in the header. They are not safe on the using
> side, I think. Something like
> 
>     toto->read = whatever;
> 
> or
> 
>     *toto = (cookie_io_functions_t){ .read = another, }
> 
> can't be protected by parenthesis.

It doesn't have to be, because it doesn't have the token ( immediately
following it.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.