kern/169320: [libc] [patch] Enhancement to allow fopen() to set

Jilles Tjoelker jilles at stack.nl
Tue Nov 13 15:00:01 UTC 2012


The following reply was made to PR kern/169320; it has been noted by GNATS.

From: Jilles Tjoelker <jilles at stack.nl>
To: "Jukka A. Ukkonen" <jau at iki.fi>
Cc: bug-followup at 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


More information about the freebsd-bugs mailing list