This is the mail archive of the
mailing list for the Cygwin project.
Obtaining pointer to underlying Winsock for Cygwin Unix Socket?
- From: "Sarah Lanham" <sarahlanum at hotmail dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 04 Sep 2002 15:08:14 +0000
- Subject: Obtaining pointer to underlying Winsock for Cygwin Unix Socket?
- Reply-to: readmySignature at hotmail dot com
How do I obtain the pointer to the Winsock that corresponds to a Cygwin
I am porting a Unix program from a Linux environment to an NT box with
Cygwin and a vendor-supplied X-Windows development kit. This is legacy
code, and there is a LOT of it (close to 1M lines C/C++). Our code
makes extensive use of Unix sockets and we are applying them in ways
that are not compatible with Winsock usage (for instance, we mix our
socket file descriptors with standard file descriptors for purposes of
"select", "read" and "write"). The X-Windows tool kit vendor CLAIMS
Cygwin compatibility, but the tool fails when I send a Unix-style socket
file descriptor where a socket would be used. I have issued my bug
report, but am having little luck getting a patch from them. They agree
that this is a bug, but the only "help" they have offered is to tell me
that their code is looking for a Winsock, not the Unix socket I am
I thought about replacing the X-Windows tool kit with something that
might *actually work* but there is precious little out there.
XFree86/LessTif understands Unix sockets, but XFree86/LessTif does not
support Motif UIL files, and we've got lots of them. The
vendor-supplied solution was selected precisely for the Motif support
our development needs. I am unaware of another NT/Cygwin compatible
Because I cannot just sit still and let my wheels spin, I'm trying to
figure out a work-around. I am aware that Cygwin Unix sockets are built
on top of Winsock sockets, so there must be a Winsock socket handle
somewhere. If I could just get a pointer to the Winsock, I could send
that pointer to the vendor's API and get ON with it. I recognize that
retrieving the Winsock socket and using it in its native form violates
ALL KINDS of OOD practice, but my back is up against the proverbial
I've been searching the web and found nothing that would help me with
this problem. Your help with this is greatly appreciated.
SarahLanum at HOTMAIL dot COM
(sorry for the bad signature, but I *hate* spam)
Send and receive Hotmail on your mobile device: http://mobile.msn.com
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html