[fpc-pascal]Synapse for FPC

Marco van de Voort marcov at stack.nl
Tue Jul 22 14:16:42 CEST 2003


> > I looked at the unit (mainly the synsock unit), and I see a Delphi project
> > patched for Kylix, which is patched for FPC/Linux.
> 
> In all library is very small 'IFDEFs' except synsock.pas. However lot of
> 'IFDEFS' is only for FPC incompatbility with Borlands compilers!

And the other way around. The main problem with Borland is that it only 
supports one and a half platform on one processor.

If you want more than that, you'll have to use the (rather large) common
subset between FPC and Borland, and design modularly to accomodate for
changes. A bit of compromising. Not a Borland product with FPC compability
bolted on, and not the other way around.

> Current Synapse is not final state of my developing! This is not firts
> version and this is not last version.

Don't take it personally. It is meant as constructive criticism for the long
run. However if you are aware of the issues it is easier to work in the
direction

> First I create working version and then I do optimalisations.

That's what I'm talking about too. But a working version on most FPC targets.

> For example, I plan rewrite synasock.pas to unit with common thinks and
> with two include files.. one for Win32 thinks and second for linux thinks.
> I rewrite dynamic loading stuffs (where is lot of incompatibilities in
> FPC) into form used in synassl.pas. Etc.

Using a unit like dynlibs is the right way for that, you alraedy do that.

However with just win32 and Linux you are only halfway there. You have to
differentiate Linux into 
1) Unix and linux
2) x86 specific and not.
 
> > - Try to get as many of these structures etc from generic units as Linux/Unix
> >       sockets etc.
> 
> this is step back in features of Synapse. In old times it is used by this
> way. However now Synapse can use ANY socket library by dynamic loading.

How? How do I load FPC sockets unit, and avoid compiling in the non working
Linux kernel structuers in e.g. BSD? 

> For example, you create your own socket library and synapse can call them
> instead Libc!

I'd rather use the readily available one :-)




More information about the fpc-pascal mailing list