Porting jcl to fpc on linux : Status and some questions

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Porting jcl to fpc on linux : Status and some questions

Michael Ring
I've started porting, so far I have ported about 50% of jcl.

Right now I am stuck with a few questions:

fpc 2.1.1 does have better support for WideStrings. Any idea when a
stable version will be released, because no code needs to be implemented
for JclWideStrings to work (Next 6 Month, This Year, Next Year)??

Also, it seems to me that Delphi7 compatibility is far better in 2.1.1

Does it make sense to define RTL150_UP in jedi.inc or is it too early?

I've found out that a declaration for popen is missing in Libc. Is it
missing on purpose? If not, could someone please add the definition
because I do not think it is a good idea to define the function in jcl's
sources.

Now for something I really do not understand, but perhaps I am still too
inexperienced with fpc to find out what is going wrong here:

pthread.inc:
Function InitializeCriticalSection(var lpCriticalSection:
TRTLCriticalSection): Integer;

JclSysUtils.pas:
...
FCriticalSection: TRTLCriticalSection;
...
constructor TJclIntfCriticalSection.Create;
begin
  inherited Create;
  Libc.InitializeCriticalSection(FCriticalSection);
end;

Now I get the following compile Error:

JclSysUtils.pas(2969,50) Error: Call by var parameters have to match
exactly: Got "TRTLCriticalSection" expected "pthread_mutex_t"

How can I find out what is going wrong here?

Thanks in advance,

Michael

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Porting jcl to fpc on linux : Status and some questions

Marco van de Voort
> Now for something I really do not understand, but perhaps I am still too
> inexperienced with fpc to find out what is going wrong here:
>
> pthread.inc:
> Function InitializeCriticalSection(var lpCriticalSection:
> TRTLCriticalSection): Integer;
>
> JclSysUtils.pas:
> ...
> FCriticalSection: TRTLCriticalSection;
> ...
> constructor TJclIntfCriticalSection.Create;
> begin
>   inherited Create;
>   Libc.InitializeCriticalSection(FCriticalSection);
> end;
>
> Now I get the following compile Error:
>
> JclSysUtils.pas(2969,50) Error: Call by var parameters have to match
> exactly: Got "TRTLCriticalSection" expected "pthread_mutex_t"
>
> How can I find out what is going wrong here?

Probably libc.trtlcrit... and the system own TRTLCritsection.

Keep in mind that libc is only a Kylix compat library in FPC, and not meant for new
development. Ordinary FPC programs (and FPC, Lazarus) do no use it, it is
not portable.

It would be wiser to base JCL4FPC on the  FPC native unix libs like baseunix
and unix, and not on the linux (/x86) specific unit libc.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Porting jcl to fpc on linux : Status and some questions

Burkhard Carstens-3
In reply to this post by Michael Ring
Am Sonntag, 23. April 2006 18:54 schrieb Michael Ring:
> I've started porting, so far I have ported about 50% of jcl.
[..]

What is the status if the port? Can I download it somewhere?
Are there any docs, about how to use it in fpc?

Regards,
 Burkhard

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal