Re: TCL-UDP: Problems compiling a modified version (by the developer) of the package
- From: dkushner99@xxxxxxxxx
- Date: Thu, 30 Aug 2007 15:57:22 -0700
On Aug 30, 2:57 pm, Alexandre Ferrieux <alexandre.ferri...@xxxxxxxxx>
wrote:
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
From there I'd suggest to ask TclUDP's developer a hand, because he
must be more in a position to decide what is the simplest of the three
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
Alex,
I got it to compile!! I replaced the #include ioctl.h with #include
ioctls.h and
added a couple more #inclues. I don'ty know how to use the new feature
yet, but I'll work on it,
Thanks,
- Daniel
.
- References:
- TCL-UDP: Problems compiling a modified version (by the developer) of the package
- From: dkushner99
- Re: TCL-UDP: Problems compiling a modified version (by the developer) of the package
- From: Alexandre Ferrieux
- TCL-UDP: Problems compiling a modified version (by the developer) of the package
- Prev by Date: Re: Need header file to compile tcludp package
- Next by Date: Re: Need header file to compile tcludp package
- Previous by thread: Re: TCL-UDP: Problems compiling a modified version (by the developer) of the package
- Next by thread: figuring out a filename from it's handle...
- Index(es):
Relevant Pages
|