Add xdr support
Sat Feb 13 15:20:00 GMT 2010
Corinna Vinschen wrote:
> On Feb 13 01:43, Charles Wilson wrote:
>> The attached patch(es) add XDR support to cygwin
>> The cygwin components are basically just adding the
>> new exports, and providing a callback function for the error reporting
>> framework in the xdr implementation, that uses (in effect) debug_printf().
> Is it really necessary to do that in init.cc? Shouldn't it be sufficient
> to set it in dll_crt0_1?
Yes, I just wasn't sure /where/ it should be done. It needs to be
early, before anything would try to use XDR. If you think dll_crt0_1 is
more appropriate, that's fine with me.
Alternatively, the newlib code could be changed so that the error
reports go /nowhere/ until a caller sets up a reporting mechanism.
Then, I suppose, it's much less important how early cygwin does that.
Right now, the newlib code defaults to using stderr.
I'd have to make the 'set up error reporting' function public, in that
case. (Right now, it is sorta hidden: that's why cygxdr.h has to declare
the setter function itself).
More information about the Cygwin-patches