On Tue, Jun 09, 2009 at 07:12:24PM +0200, Joerg Sonnenberger wrote: > On Tue, Jun 09, 2009 at 10:37:29AM -0600, Theo de Raadt wrote: > > The fact that you had to modify standards compliant code already in > > the tree to make it work indicates a rather major problem. > > The changes for stdout / stderr / stdin at least are valid, > the standard doesn't guarantee that they can be used that way. > > ISO C explicitly defines them as "extern FILE *stderr" etc. > > It is possible to mostly hide the FILE internals and the breakage is not > as big as portrait in that thread. It is still quite painful as a lot of > programs want to look at the inner workings though. > > There are a number of open issues with the public API for certain > operations mandated by SUS, e.g. the combination of file pointer > position for buffered files when sharing the file between processes etc.
> Joerg Well, I remember just doing some stupid extension for locale support, and spending a *lot* of time getting things to work afterwards... and this definitely was less invasive than hiding FILE internals.... The devil lies in the BOATLOAD of details...