This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add xdr support


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]