Sign in Join

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

Mailing lists / fpc-pascal / 2009-08

TItimerSpec

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Unknown author

Hi,

I am trying to port a delphi source code to FPC on a 64 bit system.

In the delphi code there's a TITimerSpec variable declaration. I found it in:

fgrep -R -i
"titimerspec" *

                libc/src/timeh.inc:  TITimerSpec = itimerspec;

so it's declared somewhere, but I cannot use it:

fpc NativeTimer.pas
Free Pascal Compiler version 2.2.2-8 [2009/01/08] for x86_64 Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Linux for x86-64
Compiling NativeTimer.pas
NativeTimer.pas(73,37) Error: Identifier not found "TITimerSpec"

Tomas Hajny

On Fri, August 14, 2009 10:26, wrote:

Hi,

Show quoted text 18 lines
I am trying to port a delphi source code to FPC on a 64 bit system. In the delphi code there's a TITimerSpec variable declaration. I found it in: fgrep -R -i "titimerspec" * libc/src/timeh.inc: TITimerSpec = itimerspec; so it's declared somewhere, but I cannot use it: fpc NativeTimer.pas Free Pascal Compiler version 2.2.2-8 [2009/01/08] for x86_64 Copyright (c) 1993-2008 by Florian Klaempfl Target OS: Linux for x86-64 Compiling NativeTimer.pas NativeTimer.pas(73,37) Error: Identifier not found "TITimerSpec"

See FAQ - this is part of unit libc, which is a Kylix compatibility unit only provided for i386-linux target. The associated base type seems to be provided in unit unixtype, so if necessary, you can redefine this for your purposes (based on the declaration in timeh.inc). Obviously, the more important question would be whether the type definition would be sufficient for your porting efforts, or whether there are other problems anyway which may lead to using other (native) types instead.

Tomas