From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11998 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] stdio: implement fopencookie(3) Date: Tue, 10 Oct 2017 22:08:08 -0400 Message-ID: <20171011020808.GK1627@brightrain.aerifal.cx> References: <20171010180356.11352-1-nenolod@dereferenced.org> <20171010205117.3deabfc7@inria.fr> <20171010205654.GJ1627@brightrain.aerifal.cx> <20171010234015.774c6ddd@inria.fr> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1507687701 14959 195.159.176.226 (11 Oct 2017 02:08:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 11 Oct 2017 02:08:21 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-12011-gllmg-musl=m.gmane.org@lists.openwall.com Wed Oct 11 04:08:17 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1e26RT-0003Di-LP for gllmg-musl@m.gmane.org; Wed, 11 Oct 2017 04:08:15 +0200 Original-Received: (qmail 3333 invoked by uid 550); 11 Oct 2017 02:08:20 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 3312 invoked from network); 11 Oct 2017 02:08:20 -0000 Content-Disposition: inline In-Reply-To: <20171010234015.774c6ddd@inria.fr> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:11998 Archived-At: 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 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