Re: [fpc-devel] How to call (access) to an external procedure!

2006-01-31 Thread Tomas Stejskal
I think better OO solution is to create wrapper method around the external function. function getenv(const Name: PChar): PChar; cdecl; external 'c'; TEnvironment = class(TObject) public function GetEnvironment(const AName: String): String; end; function TEnvironment.GetEnvironment(const

Re: [fpc-devel] How to call (access) to an external procedure!

2006-01-31 Thread Amir Aavani
Thanks Geno that works, but could you tell me what should i do for an external variable, var environ: ppchar; cvar; external; Geno Roupsky wrote: This particular function could be declared as this: TEnvironment = class public class function GetEnvironment(const Name: PChar): PChar;

[fpc-devel] FreeBSD/kqueue

2006-01-31 Thread Ales Katona
These files add kqueue to the FreeBSD rtl. the new FreeBSD.pas file will need to be put in rtl/freebsd dir. I think the kqueue.inc files should be in common BSD dir as 3 out of 4 major bsds (darwin being one) now support it. demo-kqueue1.pas is a simple process watching example. Ales P.S:

Re: [fpc-devel] FreeBSD/kqueue

2006-01-31 Thread Michael Van Canneyt
On Tue, 31 Jan 2006, Ales Katona wrote: These files add kqueue to the FreeBSD rtl. the new FreeBSD.pas file will need to be put in rtl/freebsd dir. I think the kqueue.inc files should be in common BSD dir as 3 out of 4 major bsds (darwin being one) now support it. demo-kqueue1.pas is a

RE: [fpc-devel] FreeBSD/kqueue

2006-01-31 Thread peter green
if 3 out of the 4 major bsds support it shouldn't it be in a generic bsd unit? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ales Katona Sent: 31 January 2006 16:05 To: FPC developers' list Subject: [fpc-devel] FreeBSD/kqueue These files add

Re: [fpc-devel] FreeBSD/kqueue

2006-01-31 Thread Ales Katona
peter green wrote: if 3 out of the 4 major bsds support it shouldn't it be in a generic bsd unit? It should be split into include which belong to BSD and specific OS units which belong to specific OS dirs which use those includes. Ales ___

RE: [fpc-devel] FreeBSD/kqueue

2006-01-31 Thread peter green
i disagree, thats forcing unnessacery extra ifdefs into user code for no good reason. imho if something is availible on muliple operating systems it should be availible in the same unit if at all possible. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of

Re: [fpc-devel] FreeBSD/kqueue

2006-01-31 Thread Ales Katona
It will force users into {$ifdefs} anyhow because older versions (especialy macosX where it's only since 10.3) won't work with it. Ales ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] FreeBSD/kqueue

2006-01-31 Thread Marco van de Voort
On Tue, 31 Jan 2006, Ales Katona wrote: These files add kqueue to the FreeBSD rtl. the new FreeBSD.pas file will need to be put in rtl/freebsd dir. I think the kqueue.inc files should be in common BSD dir as 3 out of 4 major bsds (darwin being one) now support it. demo-kqueue1.pas

Re: [fpc-devel] FreeBSD/kqueue

2006-01-31 Thread Marco van de Voort
It will force users into {$ifdefs} anyhow because older versions (especialy macosX where it's only since 10.3) won't work with it. If you drive this too far, you end up with a unit per function. Moreover, in time, the BSDs without it will get more rare.