Re: TCL-UDP: Problems compiling a modified version (by the developer) of the package
- From: Alexandre Ferrieux <alexandre.ferrieux@xxxxxxxxx>
- Date: Thu, 30 Aug 2007 21:57:58 -0000
Daniel,
When looking for portability hints, a good source is ... the Tcl
source :-)
Try grepping for FIONBIO in Tcl. There you'll find various workarounds
which are put together depending on autoconf-detected conditions, like
the presence and usability of sys/filio.h, etc.
A cursory look shows at least 3 situations:
- either use fcntl(FIONBIO) from sys/filio.h
- or find it in sys/ioctl.h
- or emulate it with ioctl(F_GETFL/F_SETFL), setting the O_NONBLOCK
bit in between
must be more in a position to decide what is the simplest of the threeFrom there I'd suggest to ask TclUDP's developer a hand, because he
given the rest of his code and his culture about portability.
If this fails, another option would be to remove entirely the part
needing non-blocking IO, since your use is only of UDP, where recv()
amply covers the kind of "half-blocking" needed to receive individual
packets in the Tcl event loop. Ugly, but easier...
HTH,
-Alex
.
- Follow-Ups:
- References:
- Prev by Date: figuring out a filename from it's handle...
- Next by Date: Re: Need header file to compile tcludp package
- Previous by thread: TCL-UDP: Problems compiling a modified version (by the developer) of the package
- Next by thread: Re: TCL-UDP: Problems compiling a modified version (by the developer) of the package
- Index(es):
Relevant Pages
|