From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12446 Path: news.gmane.org!.POSTED!not-for-mail From: Alexander Monakov Newsgroups: gmane.linux.lib.musl.general Subject: Re: Why are stdin/stdout/stderr `FILE *const` in musl? Date: Fri, 2 Feb 2018 17:13:06 +0300 (MSK) Message-ID: References: <1E109BA9-57C0-42DB-9B43-8ADE27F9E76C@hanauska.name> <20180202145427.11f0c0b0@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 1517580684 19935 195.159.176.226 (2 Feb 2018 14:11:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 2 Feb 2018 14:11:24 +0000 (UTC) User-Agent: Alpine 2.20.13 (LNX 116 2015-12-14) To: musl@lists.openwall.com Original-X-From: musl-return-12462-gllmg-musl=m.gmane.org@lists.openwall.com Fri Feb 02 15:11:20 2018 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 1ehc3f-0004jZ-Hi for gllmg-musl@m.gmane.org; Fri, 02 Feb 2018 15:11:15 +0100 Original-Received: (qmail 19669 invoked by uid 550); 2 Feb 2018 14:13:18 -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 19646 invoked from network); 2 Feb 2018 14:13:18 -0000 In-Reply-To: <20180202145427.11f0c0b0@inria.fr> Xref: news.gmane.org gmane.linux.lib.musl.general:12446 Archived-At: On Fri, 2 Feb 2018, Jens Gustedt wrote: > > stderr > > stdin > > stdout > > which are expressions of type "pointer to FILE" that point to the FILE objects associated, respectively, > > which clearly states that these are "expressions" not lvalues, and so > your code Note that musl's stdio.h can prevent abuse a bit harder by doing #define stdin (stdin+0) (making the expansion an rvalue and &stdin diagnosed with an error) Alexander