Date: Tue, 13 Nov 2012 15:00:01 GMT From: Jilles Tjoelker <jilles@stack.nl> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/169320: [libc] [patch] Enhancement to allow fopen() to set Message-ID: <201211131500.qADF01dS015202@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/169320; it has been noted by GNATS. From: Jilles Tjoelker <jilles@stack.nl> To: "Jukka A. Ukkonen" <jau@iki.fi> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211131500.qADF01dS015202>