From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12001 Path: news.gmane.org!.POSTED!not-for-mail From: Jens Gustedt Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] stdio: implement fopencookie(3) Date: Wed, 11 Oct 2017 07:51:17 +0200 Message-ID: References: <20171010180356.11352-1-nenolod@dereferenced.org> <20171010205117.3deabfc7@inria.fr> <20171010205654.GJ1627@brightrain.aerifal.cx> <20171010234015.774c6ddd@inria.fr> <20171011020808.GK1627@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1507701092 13367 195.159.176.226 (11 Oct 2017 05:51:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 11 Oct 2017 05:51:32 +0000 (UTC) User-Agent: K-9 Mail for Android To: musl@lists.openwall.com,Rich Felker Original-X-From: musl-return-12014-gllmg-musl=m.gmane.org@lists.openwall.com Wed Oct 11 07:51:28 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 1e29vR-0002sG-Kt for gllmg-musl@m.gmane.org; Wed, 11 Oct 2017 07:51:25 +0200 Original-Received: (qmail 5715 invoked by uid 550); 11 Oct 2017 05:51:30 -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 5689 invoked from network); 11 Oct 2017 05:51:30 -0000 X-IronPort-AV: E=Sophos;i="5.43,360,1503352800"; d="scan'208";a="295601720" In-Reply-To: <20171011020808.GK1627@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:12001 Archived-At: Am 11=2E Oktober 2017 04:08:08 MESZ schrieb Rich Felker = : >On Tue, Oct 10, 2017 at 11:40:15PM +0200, Jens Gustedt wrote: >> Hello Rich, >>=20 >> On Tue, 10 Oct 2017 16:56:54 -0400 Rich Felker >wrote: >>=20 >> > 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=2E are safe due to the parentheses=2E >>=20 >> They would only be safe in the header=2E They are not safe on the using >> side, I think=2E Something like >>=20 >> toto->read =3D whatever; >>=20 >> or >>=20 >> *toto =3D (cookie_io_functions_t){ =2Eread =3D another, } >>=20 >> can't be protected by parenthesis=2E > >It doesn't have to be, because it doesn't have the token ( immediately >following it=2E I meant this as an example where an object-like macro would hurt=2E "read"= is a bad example, because it is reserved=2E But if an application had an o= bject-like macro "seek" it would be screwed=2E Jens=20 --=20 Jens Gustedt - INRIA & ICube, Strasbourg, France