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

2006-09-08 Thread Jonas Maebe
On 8 sep 2006, at 00:09, Robert Reimiller wrote: The biggest problem I'm having is that FPC is different from both Win32 and Posix so it hasn't been straight forward. FPC's *nix interface is pretty much entirely based on Posix, only with a few naming conventions: * all Posix functions

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

2006-09-08 Thread Marco van de Voort
Marco van de Voort wrote: P.s. Note that Indy10 clients work on OS X (powerpc) But Indy is entirely blocking-oriented. It depends on what the OP's intentions are. He asked for non-blocking sockets, but that could be a result of porting some lib for which LNet or Indy could be a substitute,

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

2006-09-08 Thread Robert Reimiller
On Fri, 08 Sep 2006 11:21:51 -, Jonas Maebe [EMAIL PROTECTED] wrote: FPC's *nix interface is pretty much entirely based on Posix, only with a few naming conventions: * all Posix functions are prefixed with fp (to avoid naming clashes between e.g. Pascal's close and Posix' close) * the

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

2006-09-08 Thread Marco van de Voort
On Fri, 08 Sep 2006 11:21:51 -, Jonas Maebe between e.g. Pascal's close and Posix' close) * the things Marco mentioned In quite a few cases var parameters are used instead of pointers, that's the other major difference I found when porting from delphi. Maybe those were in the

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

2006-09-08 Thread Robert Reimiller
On Fri, 08 Sep 2006 20:27:37 -, Marco van de Voort [EMAIL PROTECTED] wrote: On Fri, 08 Sep 2006 11:21:51 -, Jonas Maebe between e.g. Pascal's close and Posix' close) * the things Marco mentioned In quite a few cases var parameters are used instead of pointers, that's the other major

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

2006-09-08 Thread Robert Reimiller
On Fri, 08 Sep 2006 20:27:37 -, Marco van de Voort [EMAIL PROTECTED] wrote: fpgetsockopt uses pointers. getsocketoptions is an older (1.0.x) compability function. Must of have missed it, too many choices Got the program working (it's about 2 lines of code) with the MD5 causing me

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

2006-09-08 Thread Martin Schreiber
On Saturday 09 September 2006 04.07, Robert Reimiller wrote: I don't know how you can keep all those different operating systems and processors straight in your mind, an amazing feat. I think I was initially supporting 3 or 4 operating systems back when I was doing 6809 Pascal (and later in

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

2006-09-07 Thread Robert Reimiller
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

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

2006-09-07 Thread Aleš Katona
On Št, 2006-09-07 at 12:52 +, Robert Reimiller wrote: 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

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

2006-09-07 Thread Marco van de Voort
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: Functions are prefixed by fp, to avoid possible conflicts, and errorcodes with esys. Constants and stuctures are not prefixed. FIONBIO

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

2006-09-07 Thread Micha Nelissen
Marco van de Voort wrote: P.s. Note that Indy10 clients work on OS X (powerpc) But Indy is entirely blocking-oriented. Micha ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

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

2006-09-07 Thread Robert Reimiller
On Thu, 07 Sep 2006 16:52:20 -, Marco van de Voort [EMAIL PROTECTED] wrote: FIONBIO is defined in unit termio (these are not just for sockets under *nix). I would have never guessed :) IOCTLs are per definition non standard, so don't expect them (all) to be portable. Also Windows