[fpc-devel] Non-blocking sockets on Mac OS X

Robert Reimiller certgrps at certsoft.com
Thu Sep 7 14:52:35 CEST 2006


Having some trouble porting some code from Delphi to FreePascal running
on MAC OS X (power pc). On Delphi to set a socket non-blocking I would
normally do:

       flag := 1 ;
       ioctl (cpath, FIONBIO, flag) ;

However the compiler doesn't seem to recognize FIONBIO or ioctl. Another  
standard
Unix method would be :

       flag := 1 ;
       fcntl (cpath, FNDELAY, flag) ;

Again, those aren't recognized. I've tried adding baseunix and unix to the  
uses
clause (along with sockets) with no effect. Other common items not  
recognized are
EWOULDBLOCK and ECONNRESET socket error codes (among others I would think).

Anyone know where I can find this functionality?

Thanks,

Bob





More information about the fpc-devel mailing list