From owner-freebsd-bugs@FreeBSD.ORG Tue Nov 13 15:00:01 2012 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 96051FE5 for ; Tue, 13 Nov 2012 15:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 79BA48FC15 for ; Tue, 13 Nov 2012 15:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qADF01id015203 for ; Tue, 13 Nov 2012 15:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qADF01dS015202; Tue, 13 Nov 2012 15:00:01 GMT (envelope-from gnats) Date: Tue, 13 Nov 2012 15:00:01 GMT Message-Id: <201211131500.qADF01dS015202@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Jilles Tjoelker Subject: Re: kern/169320: [libc] [patch] Enhancement to allow fopen() to set X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Jilles Tjoelker List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 15:00:01 -0000 The following reply was made to PR kern/169320; it has been noted by GNATS. From: Jilles Tjoelker To: "Jukka A. Ukkonen" Cc: bug-followup@FreeBSD.org Subject: Re: kern/169320: [libc] [patch] Enhancement to allow fopen() to set Date: Tue, 13 Nov 2012 15:53:17 +0100 On Thu, Nov 08, 2012 at 09:39:20AM +0200, Jukka A. Ukkonen wrote: > Quoting Jilles Tjoelker: > > I have written a patch almost entirely from scratch, though. I think > > blindly accepting any order restricts future possibilities too much > > (perhaps we want to put key/value pairs in the mode string at some > > point, for example) and not necessary. C11 is very clear that the 'x' > > option must come after any '+' or 'b' options. I decided that the 'e' > > option must come after any '+, 'b' or 'x' options. > Key value pairs have nothing to do with the order of the flags as > long as the value always follows the key flag character(s). > Proper free flow left to right parse would be much more flexible. > So, I remain a bit suspicious about strict ordering of the flags. Glibc supports things like fopen("/foo", "r,ccs=utf-8"). Although applications should use such a specification only if it is supported, it seems wrong nevertheless to interpret all the characters in it as flags. -- Jilles Tjoelker