Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-04

Porting jcl to fpc on linux : Status and some questions

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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

Reply by email

Marco van de Voort
to Michael Ring
Show quoted text 23 lines
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.

Reply by email