Discussion:
[fpc-pascal] Porting jcl to fpc on linux : Status and some questions
Michael Ring
2006-04-23 16:54:30 UTC
Permalink
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
Marco van de Voort
2006-04-23 18:29:52 UTC
Permalink
Post by Michael Ring
Now for something I really do not understand, but perhaps I am still too
TRTLCriticalSection): Integer;
...
FCriticalSection: TRTLCriticalSection;
...
constructor TJclIntfCriticalSection.Create;
begin
inherited Create;
Libc.InitializeCriticalSection(FCriticalSection);
end;
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.
Burkhard Carstens
2006-07-08 10:53:24 UTC
Permalink
Post by 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

Loading...