This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: Add xdr support
- From: Charles Wilson <cygwin at cwilson dot fastmail dot fm>
- To: cygwin-patches at cygwin dot com
- Date: Sat, 13 Feb 2010 10:20:20 -0500
- Subject: Re: Add xdr support
- References: <4B764A1F.6060003@cwilson.fastmail.fm> <20100213113509.GJ5683@calimero.vinschen.de>
Corinna Vinschen wrote:
> On Feb 13 01:43, Charles Wilson wrote:
>> The attached patch(es) add XDR support to cygwin
>
> Cool.
>
>> 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).
--
Chuck