I've made some changes to the cygserver code to "harmonize" the debugging output. I've created a new header file, woutsup.h (and sorry for the bad pun), for cygserver files compiled w/o __INSIDE_CYGWIN__ (i.e. outside the cygwin dll).
This defines the same set of XXX_printf macros as does sys/strace.h: of these, system_printf maps to a printf on stderr and the others ditto if the DEBUGGING flag is given (i.e. --enable-debugging) and no-ops otherwise. They also use __PRETTY_FUNCTION__ to give more information about the problem location. I've also added more debugging calls into the code, whenever I got really lost, basically :-) Apart from that, just a couple of minor changes to a pthread_once_t initialisation and some pure virtual functions on the cygserver_transport_base class. I hope this is all fine (Robert et al). I'll continue with some more hacking around fun. Umm . . . sorry, make that "careful development" :-) Cheers. // Conrad p.s. I've attached the new "woutsup.h" file separately as I couldn't convince cvs diff to put it into the patch file. I thought the -N flag should do it, but I had no luck. Could someone give me a hint? Thanks. 2002-06-10 Conrad Scott <[EMAIL PROTECTED]> * cygserver.cc: Move to "woutsup.h". Use new XXX_printf functions throughout. * cygserver_client.cc: Ditto. * cygserver_process.cc: Ditto. (process_init): Initialise with PTHREAD_ONCE_INIT. * cygserver_shm.cc: Move to "woutsup.h". Use new XXX_printf functions throughout. * cygserver_transport.cc: Ditto. (transport_layer_base::transport_layer_base): Removed (redundant). (transport_layer_base::listen): Now pure virtual. (transport_layer_base::accept): Ditto. (transport_layer_base::close): Ditto. (transport_layer_base::read): Ditto. (transport_layer_base::write): Ditto. (transport_layer_base::connect): Ditto. * cygserver_transport_pipes.cc: Move to "woutsup.h". Use new XXX_printf functions throughout. * cygserver_transport_sockets.cc: Ditto. * threaded_queue.cc: Ditto. * woutsup.h: New file. * include/cygwin/cygserver_transport.h (transport_layer_base::transport_layer_base): Removed (redundant). (transport_layer_base::listen): Now pure virtual. (transport_layer_base::accept): Ditto. (transport_layer_base::close): Ditto. (transport_layer_base::read): Ditto. (transport_layer_base::write): Ditto. (transport_layer_base::connect): Ditto.
winsup.patch
Description: Binary data
woutsup.h
Description: Binary data
2002-06-10 Conrad Scott <[EMAIL PROTECTED]>
* cygserver.cc: Move to "woutsup.h". Use new XXX_printf functions
throughout.
* cygserver_client.cc: Ditto.
* cygserver_process.cc: Ditto.
(process_init): Initialise with PTHREAD_ONCE_INIT.
* cygserver_shm.cc: Move to "woutsup.h". Use new XXX_printf
functions throughout.
* cygserver_transport.cc: Ditto.
(transport_layer_base::transport_layer_base): Removed (redundant).
(transport_layer_base::listen): Now pure virtual.
(transport_layer_base::accept): Ditto.
(transport_layer_base::close): Ditto.
(transport_layer_base::read): Ditto.
(transport_layer_base::write): Ditto.
(transport_layer_base::connect): Ditto.
* cygserver_transport_pipes.cc: Move to "woutsup.h". Use new
XXX_printf functions throughout.
* cygserver_transport_sockets.cc: Ditto.
* threaded_queue.cc: Ditto.
* woutsup.h: New file.
* include/cygwin/cygserver_transport.h
(transport_layer_base::transport_layer_base): Removed (redundant).
(transport_layer_base::listen): Now pure virtual.
(transport_layer_base::accept): Ditto.
(transport_layer_base::close): Ditto.
(transport_layer_base::read): Ditto.
(transport_layer_base::write): Ditto.
(transport_layer_base::connect): Ditto.
